Mike Ault's thoughts on various topics, Oracle related and not. Note: I reserve the right to delete comments that are not contributing to the overall theme of the BLOG or are insulting or demeaning to anyone. The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer.

Tuesday, April 10, 2012

Home Schooling

I have to admit, when my daughter first said she was going to home school my grandchildren I was a bit hesitant. After all, she doesn't have a degree and wasn't exactly a motivated student for much of her academic career. But I must say I am very pleased with the results so far.

With home schooling you can spend time with the child when it is convenient to learn, indeed the entire day can be a series of learning events. My 5 year old grandson has read a book to me, does basic math and is on the verge of basic algebra. He and his three year old sister are also learning Spanish and other more complex topics through a CO-OP of other home schooling parents. I even helped a little with a science lesson but I need to do more, I just wish they, or we lived closer, it is a 60 minute drive to go visit. Of course, he is also more computer savvy and likes his learning games that he is allowed to play 30 minutes a day.

At a recent consignment sale Michelle picked up a lap harp and a whole pile of music for it, now Mikie loves to play that as well and does a bang-up job too! Once he develops a bit more hand strength and coordination she plans to start him on guitar and dulcimer, he already loves to sing. I guess I need to dust off the woodworking tools and build him a Dulcimer of his own. Of course I have also seen a place where you can get a kit that has cardboard and wood that you can use build your own Dulcimer, maybe he and I can do that as a project once he is old enough.

With all the troubles we hear about in schools these days, I am really starting to like the home-school option, combined with a good CO-OP with other like-minded parents the kids can be taught more, get socialized and in many places even opt to play on regular school's sports teams should they desire.

With home schooling Mikie and his sisters (Hannah and Lily) get to spend lots of quality time with Michelle, and learn to help with home chores. They help tend the chickens, help with house work, and Mikie really likes helping his Dad with the various maintenance tasks around the house. The kids also get plenty of outdoor playtime. One of their gifts this last year partially from us was a really nice wood play set outside where they can climb, swing and role play to their hearts content.

I am looking forward to helping with science and math as Mikie and his sisters progress. Of course it won't be long I fear before they start asking questions I can't answer!

Thursday, April 05, 2012

A Morning Walk

In an attempt to die at the slowest possible rate I have started walking a mile each morning (that I remember). In order to keep from being bored, I try to keep a count on the squirrel population, with the cost of meat these days I may be cataloging future meals, you never know.

Anyway, the average for my mile walk so far is about 20 squirrels now how that compares to national averages I don't know, but they seem happy and healthy and are enjoying the bumper crop of maple seeds this this year. I also watch for interesting birds and anything interesting my neighbors may or may not be doing. To tell you the truth, so far my neighbors are fairly boring, the usual yapping dogs, odd looking cats and over done yards. With the kids out for spring break (remember before the PC era it was called Easter break?) I don't even get to see the latest clothing fads as I pass them at the bus stop.

On my walk this morning I saw a relative rarity (no, not a teenager up before noon) I saw an albino squirrel in the wild. White fur, pink eyes, pale skin, the entire albino genome in a compact package. Of course small albino animals of any ilk are rare because being different makes them stand out from the rest of the herd (or is that a dray or scurry for squirrels?) and makes it hard to hide from predators.

I am sure there is a cosmically important lesson there but I haven't had enough coffee to decipher it from the background noise. Anyway, the brain may actually be awake enough no face AWR and Statspack report analysis now (for those not aware, Oracle databases use these to tell me what is wrong with them) so I will close for today, time to rejoin the scurry!

Tuesday, April 03, 2012

Civics 101

The founding fathers set up the government with three branches: The Legislative, the Executive and the Judicial. These three branches where set up to provide checks and balances against each other to prevent any one branch form getting too much power. The Legislative consists of the Congress and the Senate, the Executive is the President, Vice President and their various helpers and of course the Judicial is the Supreme Court.

The Legislative creates the laws and sets the budget. The Executive has veto power over the laws made, sets policies, deals with foreign powers, etc. and the Judicial makes sure the other two follows the constitution and sets precedents used by lower courts to judge the constitutionality of the various states laws and other issues.

Now we have a POTUS who feels the the Supreme court shouldn't overturn his favorite law because they aren't elected. He actually said it was unprecedented which means that the Supreme court has never overturned laws passed by the legislative branch. As a point of order over 158 laws passed by the Legislative branch were found unconstitutional. It is the job of the Supreme court to overturn unconstitutional laws. Supposedly the POTUS is a constitutional scholar, I wonder which constitution?

Monday, March 26, 2012

A Tragedy Unfolds

Trayvon Martin was killed by a gunshot from George Zimmerman's handgun. This is an undisputed fact. However, what led up to George feeling he had to shoot Trayvon is what is in doubt.

From what we can piece together Zimmerman is a self appointed neighborhood watch that has made over 40 calls to 911 over the last year. Zimmerman has made so many calls he is almost considered a nuisance to the local police. Needless to say this shows a certain zeal for being a neighbor hood watch almost bordering on obsession. Zimmerman reportedly desired to be a policeman according to some reports.

Trayvon Martin (despite the cute 14 year old he is pictured in the press) was 17 years old and black. He was wearing a gang related item of clothing, a hoodie. Now, I have worn hoodies and I am sure many of you have, there is nothing inherently damning by wearing a hoodie. However, would I wear a known gang related item in an area where it might be misconstrued? Probably not. Anyway, Trayvon, according to testimony, had left his fathers house and was walking to a local convenience store to get a few harmless items (tea and candy of some sort)when the shooting occurred.

From what has been pieced together Zimmerman spotted what he considered to be a suspicious person in an area where crime was on the uptick, someone he didn't recognize as a part of the neighborhood. He called 911 and started to follow Martin in his vehicle. Martin, noticing he was being followed pulled his hood up and started moving faster. At this point Zimmerman was told by the 911 operator not to pursue him. He did anyway, after losing him, he parked his vehicle and looked around on foot. What happens next is still not clear.

Zimmerman apparently pursued for a while, then started back to his truck, at which point he was supposedly attacked by Martin from the left rear. Now, does the act of stopping the pursuit then put Zimmerman back under the protection of the Castle law?

Castle law where Zimmerman resides states that when attacked you have no duty to retreat, that you may defend yourself up to and including lethal force from a concealed weapon. Zimmerman had a concealed weapons permit and carried a pistol.

An eyewitness has stated he saw Trayvon on top of Zimmerman, hitting him in the face and pounding his head into the concrete, pleas for help, identified as either coming from Zimmerman or Trayvon are recorded on 911 tapes. The witness went to a different window to get a better view, when he looked back out, he saw Trayvon laying on the ground and Zimmerman by him with the gun. The police showed up 2 minutes later. Zimmerman was bleeding from his nose and the back of head and the back of his clothes were wet from the grass.

So, what happened? Who knows, what you feel happened will be colored by your viewpoint. Both Zimmerman, and I am sure Trayvon, felt justified in whatever they did. Was Castle law to blame? I assume the detractors would have us all run from any confrontation, giving over anything asked us up to and including our money, health and even life before hurting someone else. However, places where you are required to flee until your back is to the wall and only then can you defend yourself, have a terrible record of fatalities. Those places that have a requirement to flee also have strict gun laws thus insuring an unarmed populace not able to defend themselves.

Zimmerman should have stopped following Trayvon as soon as the 911 operator told him to. Since Trayvon was not presenting a threat Zimmerman should have reported him, then gone on about his business. So in pursuing Trayvon, had Trayvon attacked him, Trayvon would be in the right in accordance with the Castle law as Zimmerman had become the aggressor. However, if it happened as Zimmerman has said, and, the physical evidence as presented thus far seems to support, that while he had been pursuing Treyvon, he lost sight of him and was returning to his truck, thus, no longer the aggressor, when he was attacked by Trayvon, then the Castle law comes back to being on Zimmerman's side. If Zimmerman felt that he had no other recourse, then using his concealed weapon was his right under the law.

At 6 foot and 160 pounds to 5'9" (no weight given) Trayvon had reach and possibly strength on his side. At 17 I was only 150 pounds at 5'10" and I could press 200 pounds, run 5 miles, swim a mile and was pretty fast with my hands. If I had attacked an older, out of shape man, I feel I could have won the day. The picture shown of Trayvon is not of a 6 foot 160 pound teenager, it is apparently of a 14 year old that looks maybe 5' 6" and a little over 100 pounds if that. Let's see a current High school picture. Oh, right, that wouldn't garner the same amount of sympathy.

It will be interesting to see how this tragedy unfolds, I would not want to be on the jury if it comes to that. My prayers go out to Trayvon's and George's families as both will suffer from the consequences of this for years to come.

Tuesday, March 20, 2012

Spring is in the air

Spring is in the air, literally here in Atlanta. Our pollen count is at 9000+ and rising and a yellow haze envelopes everything turning all cars into yellow taxi wantabes. With the warmer weather my thoughts turn toward scuba diving. Of course that means I need to get the regulators in for servicing at $90 a pop, see what tanks need to be inspected and which ones hydroed. I guess there is a cost for everything.

I also think about fishing. Standing hip deep in rushing cold water, flipping the fly out into just the right spot and feeling that sudden tug that shows the trout (or any other fish) has taken the challenge and wants to play. Hmmm...fresh caught trout fried with a little butter, dill and lemon juice.

Of course the barbecue season is already in full swing, had friends over already for hamburgers and hotdogs. Cooked some great pork chops the other day and some barbecue chicken. Maybe this weekend I'll pull out the last venison roast and rubbed with olive oil, seasoned with sage and garlic and wrapped in bacon, cook it over a slow fire until it is falling apart...

Also time to start planting the garden. Tomatoes, peppers, maybe some snow peas (if I can keep the neighborhood deer away) also spinach, maybe strawberries...

Well, time is flying by, so must close for now, spring is calling!

Wednesday, March 14, 2012

Working Hard on New Novel

Well, I have 122 manuscript pages single spaced so far, that is about 220 book pages. I seem to be adding about 5-10 pages a week. Things are reaching the climax as the several threads of the story come together. I plan on submitting this one to a small press my good friend and fellow author (Bottom Dwellers) Shane Etter uses. Shane's next book, titled "Forest Dwellers" is going in to the editor shortly and should be available soon.

My new novel will be entitled "Prelude to Darkness" and details the effects of an EMP on the main character, his wife, their neighbors and of course the antagonist...each is a separate story line woven together to reach a climax that should be great I hope!

If you haven't seen my other attempts at novels they are shown on Scubamage and can be purchased there if you are so inclined! Well, enough catching up, I have some writing to do!

Sunday, March 04, 2012

Pondering on a Saturday Morning

I have been keeping up with old interests lately. Reading about the space program (or lack thereof) and potential consequences of continued space exploration and exploitation. Of course I chose the words consequences and exploitation deliberately, as did the writers of the articles I read, as they have a negative connotation to most people. I chose them to demonstrate deliberate slanting, they chose them to do deliberate slanting of their message. They took articles which could have been encouraging and uplifting and made them deliberately negative by simple word usage, essentially damning them by faint praise.

In one article they worried over what would happen should we mine the moon for He3 (supposedly needed for fusion) and pondered our damaging the eco-system of the moon (please, stop laughing, they were serious!) They also questioned whether we should seek to do even limited terra-forming of the moon or Mars, again sighting fears over damaging geologic or microscopic eco-systems. I guess it is better to leave all our eggs in one basket (Earth) and just hope our good intentions will prevent a super-flare or stray asteroid from ending us.

Another article fussed about “What will future generations due if we use up the fossil fools or natural gas?” well, they will do what future generations have always done, find something better! I have always contended that fossil fuels, natural gas and nuclear fission are bridge technologies to get us to future technologies. Whether those future technologies will be based in fusion (cold or hot) or in zero-point energy or in some heretofore unknown technology I don’t know, but future generations will!

The big problem with many people in the media industry is they can’t see past their limited technological education. With science and technology taking such a low rung on the education ladder these days (after all, it makes little Johnnie feel bad to not be smart enough to understand it, so we will skip it) it is no wonder journalists feel so threatened by it. We are all limited by our horizons. The closer and safer we make those horizons the more limited is our world view and the fewer options we have. Many people need a good dose of science fiction! We used to base our future on doing the impossible, climbing the unclimbed mountain, going where no one has gone before, now we don’t even have a space program to speak of unless we go begging off the Russians (President Kennedy is spinning in his grave while Nixon is dancing a jig in whatever of the nine-hells he is in.)

Unless we rekindle the imaginations and invest in the future of our children by doing so, we are in for a rough ride. I fear we may be on the slide down into obscurity here in the USA. Unless we can revitalize speculative thinking we are doomed.

Friday, March 02, 2012

Using Flash Cache

In this final test series we will compare the best result from the memory only, Keep and Recycle and first rows tests with the best result with a flash cache set. Tests were completed comparing using a slightly faster server mounted PCIe flash cache to a flash based san so the results will not be as dramatic as when testing server mounted PCIe flash cache against disk based storage.

The flash cache was sized at the suggested 2X the database cache size (90 gb) and then a run with the flash cache set to zero was run. Note that for the first run appropriate tables and indexes were assigned to be kept in the flash cache, other tables where set to default. Figure 1 shows the results from use of the Smart Flash Cache with Flash as storage.



Figure 1: TPS verses GB in the Flash cache

At least for our testing with the database on a RamSan630 SSD and the flash cache being placed on a RamSan70 PCIe card, the results are not encouraging towards the use of the flash cache with a flash based SAN. Review of the AWR results showed that the flash cache was indeed being used but, due to the small difference in overall latency between the RS630 with IB interfaces and the RS70 in the PCIe slot, the overall effect of the flash cache was negligible. The next figure shows the AWR Top Five Events listing both with and without Flash Cache set.

AWR Results
AWR Results
Flash Cache set at 90 GB:
Avg
wait % DB
Event Waits Time(s) (ms) time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
DB CPU 25,339 53.7
log file sync 11,775,317 13,146 1 27.8 Commit
db flash cache single block ph 3,991,869 3,745 1 7.9 User I/O
db file sequential read 6,192,796 3,588 1 7.6 User I/O
latch: cache buffers chains 169,292 251 1 .5 Concurrenc

Flash Cache Set at 0 GB:
Avg
wait % DB
Event Waits Time(s) (ms) time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
DB CPU 26,414 53.9
log file sync 12,139,355 14,138 1 28.9 Commit
db file sequential read 11,548,371 7,373 1 15.0 User I/O
enq: HW - contention 23,317 859 37 1.8 Configurat
latch free 7,922 402 51 .8 Other

Figure 2: AWR Results with and without Flash cache

Disk with Flash Cache
Since the test with a flash utility against an internal PCIe Flash card proved inconclusive we decided to have the lab hook up some disks and re-run the tests using a disk array containing 24-10k 300gb disks for the tables and indexes. The DB_CACHE_SIZE was increased to 50gb and the DB_FLASH_CACHE_SIZE was set to 300gb. Figure 3 shows the results for a disk array with and without a 300gb flash cache.



Figure 3: Disk verse Disk plus Flash Cache Performance

As you can see from reviewing the graph, the Flash cache definitely helped performance at the all levels of our user range. It also showed that with the same hardware the sustained performance increase could be extrapolated to a larger number of users so in the case of using flash cache with disks, yes, performance is gained.

While running this test I had indication that over 160 gigabytes of data blocks were cached in the flash cache. Figure 4 shows the SQL script used to determine flash usage for a single user and Figure 5 shows an example of its output during test runs.

set lines 132 pages 55
col object format a45
select owner||'.'||object_name object,
sum(case when b.status like 'flash%' then 1 end) flash_blocks,
sum(case when b.status like 'flash%' then 0 else 1 end) cache_blocks,
count(*) total_cached_blocks
from v$bh b join dba_objects o
on (objd=object_id)
where owner = upper('&owner')
group by owner, object_name
order by owner,4 asc;

Figure 4: SQL Script to see cached objects for an owner

OBJECT FLASH_BLOCKS CACHE_BLOCKS TOTAL_CACHED_BLOCKS
------------------------- ------------ ------------ -------------------
TPCC.C_CUSTOMER_I1 15249 0 15249
TPCC.C_STOCK_I1 15863 0 15863
TPCC.C_NEW_ORDER_I1 15875 18108 33983
TPCC.C_ORDER_I1 37838 6308 44146
TPCC.WARECLUSTER 63562 450 64012
TPCC.DISTCLUSTER 59511 4504 64015
TPCC.NORDCLUSTER_QUEUE 45764 56100 101864
TPCC.ORDR_UK 94404 40801 135205
TPCC.C_ORDER 123514 67081 190595
TPCC.C_CUSTOMER_I2 202994 51896 254890
TPCC.C_ORDER_LINE_I1 383833 26284 410117
TPCC.C_ORDER_LINE 873325 64108 937433
TPCC.ORDL_UK 1073711 38760 1112471
TPCC.CUSTCLUSTER 1940874 124103 2064977
TPCC.STOKCLUSTER 5508278 3055117 8563395

Figure 5: Example use of Flash Cache
Just to put things in perspective, let’s put the top pure-Flash database results against these disk and Flash cache results. Look at Figure 6.



Figure 6: Flash only, Disk Only and Disk plus Flash Cache Results

In reviewing Figure 6 you should first note it is a logarithmic plot, which means that for each change on the left axis there is a factor of 10 change. This figure shows that using pure flash far outperforms even the best we can expect from a combination of flash and disk. In this case by nearly a factor of 7. The peak performance we obtained from our disk combined with a Flash cache was 1024 TPS, while the peak we obtained in our flash tests (see next section) was over 7000 TPS. Even in previous testing with larger disk arrays (90+ 10K drives), the peak performance I obtained from disk arrays was only in the 2000 TPS range, again showing that SSD technology is superior to any equivalent disk array.

Tuesday, February 28, 2012

Using KEEP and RECYCLE Pools

We are all familiar with using DB_CACHE_SIZE either directly or by proxy using the SGA* or MEMEORY* automatic memory management settings. We know that generally speaking, adding memory to DB_CACHE_SIZE will improve performance until we have satisfied the memory requirements supporting single block, recursive reads. What happens if we add in KEEP and RECYCLE areas?

To refresh your memories, the KEEP area is a memory cache used to store object blocks that you don’t want to have aged out of the cache. The RECYCLE area is a cache area designed to hold frequently changing or blocks that you don’t want to keep.

In order to effectively use the keep and recycle pool areas, database objects such as tables, indexes and clusters must be assigned to the appropriate pool. The default, understandably, is the DB_CACHE_SIZE controlled (SGA_*, MEMORY_* controlled) pool. For these tests the following objects in a TPC-C schema where assigned as shown:

Cluster: CUSTCLUSTER – RECYCLE
Contains: C_CUSTOMER table
Cluster: DISTCLUSTER – DEFAULT
Contains: C_DISTRICT table
Table: C_HISTORY – RECYCLE (This table is partitioned)
Cluster: ITEMCLUSTER – KEEP
Contains: C_ITEM
Cluster: NORDCLUSTER_QUEUE - DEFAULT
Contains: C_NEW_ORDER table
Table: C_ORDER – DEFAULT
Table: C_ORDER_LINE – DEFAULT
Cluster: STOKCLUSTER – KEEP
Contains: C_STOCK table
Cluster: WARECLUSTER – DEFAULT
Contains: C_WAREHOUSE table

These assignments were made based on how the table was used and if it is frequently changed. Using the cache advisors in the AWR reports from test runs the sizes of the special caches were optimized. Tests were run with the caches turned on and turned off to determine what affects the caches had on performance. With the caches turned off the memory they utilized was returned to the default cache. Using a maximum allocation of 40 gb for Oracle cache areas the basic settings for the memory areas were:

NO_K_R_40:
DB_CACHE_SIZE=40gb
DB_KEEP_CACHE_SIZE=0gb
DB_RECYCLE_CACHE_SIZE=0gb

WITH_K_R:
DB_CACHE_SIZE=30gb
DB_KEEP_CACHE_SIZE=4gb
DB_RECYCLE_CACHE_SIZE=5gb

WITH_K_R_2: (As advised by the cache advisors)
DB_CACHE_SIZE=30gb
DB_KEEP_CACHE_SIZE=7gb
DB_RECYCLE_CACHE_SIZE=3gb

This figure shows the effects of use of the keep and recycle pools on performance.



Figure: TPS verses GB in the Recycle and Keep Caches

NOTE: You cannot use either DB_KEEP_CACHE_SIZE or DB_RECYCLE_CACHE_SIZE with the DB_FLASH_CACHE_SIZE or DB_FLASH_CACHE_FILE settings, if you set up to use both keep and recycle and flash, the flash doesn’t appear to get used.

So, if you have memory available and are in a situation where db file sequential reads are generating waits, assigning appropriate tables and indexes to the KEEP pool can boost performance. If you have large tables that you only want to use a working set from and then discard it, the RECYCLE cache can help.

Friday, February 24, 2012

Don't Forget Optimizer Parameters!

One factor that dramatically affects the processing of Oracle queries is the setting of the OPTIMIZER_MODE initialization parameter. By default this parameter is set to ALL_ROWS which will attempt to optimize the SQL statements to return all rows form the queries in the minimum amount of time. ALL_ROWS will choose full scan options such as sort-merge-join and hash-join over paths that return initial rows the fastest such as a nested-loop. While ALL_ROWS may be a good setting for decision support or data warehouse databases in online transaction processing (OLTP) systems most queries will return very few rows, so one of the settings of the FIRST_ROWS_(n) value for the OPTIMIZER_MODE should be utilized. The (n) settings are 1, 10, 100 and 1000. In my testing using a TPC-C-OLTP type benchmark (using Benchmark Factory), varying the FIRST_ROWS setting from 100 down to 1 changed the results from 4500 up to 6900 tps, nearly a 53% improvement. From ALL_ROWS to a setting of FIRST_ROWS_1 the performance improved from 4200 to 6900 tps, a 64% improvement. This shows that OPTIMIZER_MODE must be set correctly to get the best performance for your system. In this case the TPC-C is a pure OLTP system so a FIRST_ROWS_1 Setting makes sense. The following graph shows the effects of switching the OPTIMIZER_MODE settings.



Figure : Effects of changing OPTIMIZER_MODE

All of these results were generated using a single RamSan630 for all database files. Utilizing a 24-10K rpm disk array the best result obtained was around 600 tps.

Wednesday, February 22, 2012

Basics

A recent problem with the phone company here in Georgia brought to mind that basics are called basics for a reason. I was traveling for a couple of days and the wife was staying with her mother while I was gone. I called to pick up any voice mails that might have been left as I was expecting some important calls. Imagine my shock when I received a message saying “We are sorry, this number has been disconnected” for both the home and home office numbers.

I called the technical support line and after nearly an hour (mostly on hold) I was told the issue would be resolved within 24 hours. Of course you know what happened, in 24 hours I was back on the phone with a different support person who told me the same thing and again the next 24 hours later. On the third call they said there was an order that no one could see that was preventing any further orders from being processed on the account.

In the old days we would have called this order that no one can see a hanging tuple or an orphaned record. This means a record was inserted into the ORDERS table without a corresponding entry in the CUSTOMER table (just taking a swag here). Now when someone tries to insert a new record into the ORDERS table the primary key (probably containing a composite of phone number and something else) keeps them from inserting a new value.

Now, I happen to know this phone company is using Oracle as their support database that logs the support requests and tracks them. In a properly designed database referential integrity between the CUSTOMER and ORDERS would prohibit an entry into the ORDERS table without a corresponding entry residing in the CUSTOMER table. This is if the referential integrity is defined at the database level and enforces with optimized, internalized database triggers.

A few years ago, in tandem with the whole object oriented design paradigm and tied in with the rapid design methodologies and with the “Let’s make it generic so if we have to change databases we can” movement, the referential integrity was moved into the application code. What this did was open the database to the possibility of entering bad data if you didn’t use the application, or, if the application has an error. Now, this is all supposition on my part but it appears either there is a glitch in the application logic (but why would it only effect one customer?) or someone did some manual inserts, updates or deletes on the database bypassing the application logic.

This is what happens when you ignore basics and try to rewrite things into the application layer that should be left to the database engine. So now I am on a full week without home or home office phones. What is that little gizmo you can plug into the computer and get phone service through? I think I have their website here somewhere…

Thursday, November 17, 2011

Book Review – Oracle Information Integration Migration And Consolidation

I recently had the chance to look over the book “Oracle Information Integration Migration and Consolidation” by Jason Williamson, published by PackT Publishing.

The book deals with all aspects of migration to Oracle from various Oracle and non-Oracle sources. In a soup-to-nuts manner, the book covers the major tools to move data into and out of Oracle including OWB, SQLPLUS, EXPDP, IMPDP, RMAN, SQL*DEVELOPER, GoldenGate, and various ETL type tools including some form 3rd party companies.

The book includes many examples and use cases and numerous charts showing what tools should be used for which tasks. The book is written in a down-to-earth style and was easy to read.

I would recommend this book for anyone facing a data migration, platform change or complete system re-write into Oracle from another source.

The book is available here:

http://www.packtpub.com/oracle-information-integration-migration-and-consolidation/book
http://www.amazon.com/Oracle-Information-Integration-Migration-Consolidation/dp/1849682208/ref=sr_1_fkmr0_1?ie=UTF8&qid=1321543957&sr=8-1-fkmr0

Tuesday, October 11, 2011

Minimizing Rebuild Time with Benchmark Factory from Quest

In my job as Oracle Guru for Teas memory Systems I perform a multitude of bechmarks to showcase the performance of our SSD products. One tool I have found invaluable while doing these benchmark tests is the Benchmark Factory from Quest Software, Inc. as it allows TPC-C, TPC-E and TPC-H as well as custom and other recognized benchmarks to be easily performed and provides decent reporting of the results. However, there is one fly in the ointment.

Benchmark factory does great when the benchmark size is small, however, its time to reload the database grows exponentially as the size of the database increases, for example, the creation of a 3000 warehouse TPC-C takes over 4 hours using a 16-CPU server with plenty of memory and SSD for storage, I can only imagine how long it would take with smaller servers using normal hard drive based SAN or JBOD storage. So, how can this obstacle be overcome?

First, I had Quest provide some parallel load scripts which allow me to load all 9 tables independently. Using the standard load utility it loaded them serially and any errors resulted in having to restart the load process from the beginning. With the independent load scripts you can load any combination of the tables, restarting any that may fail due to space or undo problems as needed. These are the load scripts that reduced the time to 4 hours mentioned above. They are available on the Quest website. However, spending 4 hours to refresh a database to perform a 45 minute test seems rather much, is there anything else that can be done to reduce this time further?

The http://www.tpc.org website has the dbgen utility that can be used to create load tables, then you create a set of SQL Loader files to map them into the database and you can load in parallel, this reduces the load time to about an hour, you can also map the external files as external tables. Of course, rather than deal with learning a second utility (which you have to download and link as a C routine) I just loaded the tables using BMF then before messing with them, created a set of external table using simple CTAS and the external table clauses as required. Now my load time is down to about an hour. I could further reduce the load time by parallelizing specific table loads. Note that to use the ORACLE_DATAPUMP as a source to insert from you must set the FILESYSTEMIO_OPTIONS parameter to NONE. Of course what about statistics? Statistics on multi-million row tables can take a couple of hours to generate as well.

Command to create a set of external table build scripts:
(you must use the “create directory” command to create the ext_tab directory entry first)

select 'create table ext_'||table_name||'
organization external (
type oracle_datapump
default directory ext_tab
location ('||chr(39)||'ext_'||table_name||'.ext'||chr(39)||')) AS
select * from '||table_name||';' from user_tables
/

Example result script:

create table ext_C_HISTORY
organization external (
type oracle_datapump
default directory ext_tab
location ('ext_C_HISTORY.ext')) AS
select * from C_HISTORY;

Following the data load and index build I did a statistics collection using DBMS_STATS.GATHER_SCHEMA_STATS then I stored the statistics into a statistics export table. Since I have the statistics stored it is simply a matter of importing the statistics at the conclusion of the reload.

Commands to export statistics:

EXEC DBMS_STATS.CREATE_STAT_TABLE('TPCC', 'STATS_TABLE');
EXEC DBMS_STATS.export_schema_stats('TPCC','STATS_TABLE',NULL,'TPCC');

Command to import statistics:

EXEC DBMS_STATS.import_schema_stats('TPCC','STATS_TABLE',NULL,'TPCC');

So now my data reload simply becomes a set of truncate table commands followed by an insert with the APPEND hint using a SELECT * from the external tables followed by a statistics import. This cuts the turn around time from around 6-8 hours to less than 2 for a 3000 warehouse TPC-C benchmark.

Example INSERT command:

insert /*+append*/ into c_customer select * from ext_c_customer;

Thursday, September 15, 2011

Fun with External Tables

During recent testing, I came upon an interesting error. This is on Oracle Linux in an 11.2.0.2 enterprise database. I am doing TPCC testing and wanted a faster way to reload the tables between the tests rather than using the Benchmark Factory loader, which takes forever! I decided to use a datapump format external table using a CTAS to create it for each table after reloading the data then simply do an insert using an APPEND hint to reload the tables following a test and subsequent table recreation (since some are single table clusters and hash clusters truncate doesn’t work so they must be dropped and rebuilt.)

I used the following to create an external table:

create table ext_C_STOCK
organization external (
type oracle_datapump
default directory ext_tab
location ('ext_C_STOCK.ext')) AS
select * from C_STOCK;

The C_STOCK table is part of a single table cluster.

After a test run I dropped and recreated the C_STOCK cluster and table as an empty table then I tried to reload it from the external table:

insert /*+append*/ into C_STOCK select * from ext_C_STOCK;

To which I received:

insert /*+append*/ into C_STOCK select * from ext_C_STOCK
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-31619: invalid dump file "/mnt/exttables/ext_C_STOCK.ext"
ORA-27072: File I/O error
Linux-x86_64 Error: 22: Invalid argument
Additional information: 4
Additional information: 1
Additional information: -1

The problem turned out to be that the initialization parameter filesystemio_options was set to setall, changing it’s value to NONE fixed the issue.

Friday, July 29, 2011

What Are We Waiting For?

It seems everything but the temperatures are in a slump. The economy, hiring, employment, purchasing, proper government action, all seem to be missing. My question is what are we waiting for? We aren’t the ineffective government, we aren’t the ones making poor decisions, at least for the most part.

Perhaps we need to step forward and start movement. We need to do something positive, each of us. Perhaps it would just be cleaning up our yard, giving a bit more at church or working just a bit harder at our jobs. If everyone ignored Washington and just did a little more for each other I think we could positively effect not only our lives, but everyone else’s as well. If all of us treat each other honestly and fairly maybe it will trickle up.

Maybe instead of charging as much as we can, we just need to charge as much as we need to for goods and services. I am tired of seeing ten cents worth of plastic being sold for several dollars. How many employers could let their employees work from home? Do you really need to watch your employees like hawks to make sure they work? Can’t you tell by results if they are working? I submit that if you can’t trust your employees to do their work if you let them work form home, you can’t trust them to do their work at work either and perhaps you should find new employees!

I guess we need to lead from the bottom, if the entire base of the pyramid moves in the correct direction, the rest has to follow.

Thursday, July 14, 2011

The Times, they are a Changing

For my presentations at VirtaThon least! Here is the latest schedule of my presentations:

Best of Both Worlds: Using SSd and Disks via ASM
Presenter(s):
Michael Ault
Time slot: 17 July 10:00 - 10:55

Room:
Virtual Room # 100
Infrastructure Technologies - Oracle
Target Audience:
All




VirtaThon GoldStar Session!!! 4-Hour Deep-Dive: Got Performance? Statspack and AWR Analysis
Presenter(s):
Michael Ault
Time slot: 18 July 11:00 - 15:25

Room:
Virtual Room # 100
Database - Oracle
Target Audience:
All




The Need for Speed: Using SSDs with Oracle
Presenter(s):
Michael Ault
Time slot: 19 July 13:30 - 14:25

Room:
Virtual Room # 200
Infrastructure Technologies - Oracle
Target Audience:
All





VirtaThon Keynote: Tuning on the Cheap: Oracle tuning Utilities Everyone Has
Presenter(s):
Michael Ault
Time slot: 20 July 12:30 - 13:25

Room:
Virtual Room # 100
Database - Oracle
Target Audience:
All

Looking Forward

Well, looks like I am booked out for the month of July! Starting Saturday (16 July, 2011) I am doing a 4 hour presentation on AWR analysis for VirtaThon http://www.brainsurface.com/virtathon here is the rest of my VirtaThon schedule (all times EDT):

Sunday 17 July, 2011 10:00-11:00 am "Best of Both Worlds: Using SSd and Disks With ASM"
Tuesday 19 July, 2011 4:30-5:30 pm "The Future is Now: A Fully SSD Database System"
Wednesday 20 July, 2011 12:30-1:30 pm " Tuning on the Cheap: Oracle Tuning Utilities Everyone Has"

On Thursday I present at the Twin Cities Oracle User Group in Minnesota: "Data Warehouse Development Techniques and New PL/SQL Features"

On Tuesday July 26 ,2011 12:00-01:00pm "Oracle Exadata X2-8: A Critical Review" (webcast)Check out http://www.ramsan.com/company/events for more information and a link.

On Wednesday, July 27, 2011 I will be doing a joint presentation with Tariq Farooq on "360 Degrees: Everything to know about Virtualization for Oracle DBAs"

Should be a quick end of the month! Hope you can all make it to at least one of the virtual or live events!

To see any of my past Webinars look at http://www.ramsan.com/company/events and http://www.ramsan.com/resources/videos

Friday, July 08, 2011

A Bitter Nostalgia

I remember in grade school and middle school when I was growing up they would roll TVs into the classroom and we would all watch in wonder as the Mercury and then the Saturn V launch vehicles would, with a rumble and roar lift our astronauts into space. With this technology we put the first men on the moon, sent probes into deep space and around the planets in this solar system. They also lifted up young hearts and minds to believe that maybe they could someday walk on the surface of a different world and stare back at the star that gave them birth with wonder.

Today, the last space shuttle mission launched. After the shuttle returns it will be mothballed and with that action, the USA will no longer has the capability to put people into space. Now, with the demise of the space shuttle we will become a beggar nation when it comes to space, just like the third world countries we will have to go begging with hat (and money) in hand to the Russians and Chinese to use their rockets, vehicles and launch facilities. John F. Kennedy will be spinning in his grave.

We have record unemployment, the lowest new job creation numbers and the dollar is at one of its lowest points in relation to other currencies that it has ever been. I don’t know what the future holds but I am worried. I worry that my grandchildren will be burdened with an immense load of debt that they can’t possibly repay. I worry that they will have no jobs and become dependent on the government for their sustenance, not because of lack of desire or ability, but because of the incompetence of our leaders. For the first time the future looks worse than the past.

Perhaps my memories just aren’t correct. I recall affordable housing, cars, gas and food. I recall a time when one income would feed a family and mothers weren’t expected to work outside of the home. I recall when a majority of time children were respectful to their elders, God was allowed in courts, in schools in lives. Many intellectuals wanted change, wanted God out of society, because after all, God was an outmoded concept that modern, thinking, scientific man didn’t need. How is a Godless world working out for you folks? Personally I find it a disturbing and quite a bit a scary place and getting worse as we get further from the basic rules, handed down by God that this country was based on.

Disgusting, violent video games that desensitize our youth to violence and death are authorized by the highest court in the land. Movies you are afraid to attend because you never know what they will contain fill the movie theaters. The basic rights that the country was founded on are perverted because our highest courts are filled with people with no common sense, no moral courage and nothing but empty academic theories instead of wisdom.

I am sorry if I am a bit morose today. The 10 year old with dreams of being an astronaut just died in my soul.

Wednesday, March 09, 2011

JavOraThon Conference

Imagine a conference with top Oracle, Java and related topic presenters that you can attend in your PJs, from home, from your office, or even on your commute! A conference where you don't need to put up with TSA touching things that even your spouse won't touch and possibly having your image as the next TSA pinup of the week. Not to mention saving all those travel expense dollars in this tight economy! Well, imagine no more! The JavOraThon conference is a virtual conference with industry recognized speakers and as long as you have internet connectivity you can attend!

Here is the information for being a presenter if you are interested, I know I will be giving several presentations (yet to be announced) and know of several other experts who will be doing the same. The Conference dates are July 16-21 2011, coming to a computer near you!

Call-for-Papers URLS:

Speaker Registration: http://www.brainsurface.com/javorathon/node.add.speakers/
Propose a Session: http://www.brainsurface.com/javorathon/node.add.session/
View your proposed Sessions: http://www.brainsurface.com/javorathon/program.mysessions.proposed/

Hope to (virtually) see all you fellow Oracle users and Gurus there!

Thursday, January 27, 2011

Class Action Suite

I think there needs to be a class action suite. It seems there are a bunch of folks who took money from a guaranteed fund and replaced it with completely worthless IOUs. Millions of people put money into the fund, in fact, they were forced to. The class action suite would be on behalf of these millions of folks and levied against at least 643 folks who were trusted with the fund.

In case you haven’t guessed, I am talking about the ponzi scheme known as social security. A ponzi scheme is when you take money from investors and then pay back past investors with money from future investors without investing a dime to make more money. It works as long as your new investors exceed the numbers of your old investors. Supposedly the Social Security system was supposed to be a safe investment into a safety net retirement fund it grew into the mandated ponzi scheme it is today because in the 1980’s the government was allowed to borrow from it and pay back using federal bonds supposedly earning 5%/ However, the only way to pay these bonds was through additional tax revenue. Needless to say, any additional tax revenue was just as quickly spent as the money borrowed from Social Security. Shall we stop using euphemisms? The Congress and Senate, aided by the Presidents and Vice Presidents as well as the Fed stole from Social Security with no intention of ever paying it back.

I think that any currently sitting house of senate member and any past or present Presidents or Vice Presidents, in office or not, who ever voted at anytime to approve this thievery should have their pensions stripped from them and they should be jailed just like Bernie Madoff. To deliberately steal money from your constituents knowing you can never pay it back is criminal.

Unfortunately this elected royalty will never have to be punished for what they have done and continue to do. The trillion plus dollars they have stolen will never be paid back and many of the baby boomers who paid more in Social Security than any of their predecessors will end up in soup lines and shelters sleeping on cots when they reach their 90’s. Sometime around 2037 if things stay as they are the Social Security fund will run out of money and it is the fault of the greedy politicians in Washington who couldn’t keep their hands off of the money contributed to Social Security. By then I will be 80 years old, assuming they haven’t confiscated all the guns by then I hope I can still shoot straight.