Thursday, September 16, 2004

Database Configuration Assistant

Now i'm working my way through the "Using DBCA to Create a Database" chapter. I immediately understood why the DBA's at my workplace are so allergic to Hebrew locales: This Windows XP is configured for Israel and DBCA is a "localized" Java application, so while most of the text in the wizard is English, the button names (Next, Previous, OK, etc.) are in Hebrew and all the text is right-aligned, which is annoying. So i tricked it: changed the definitions in Control Panel\Regional and Language Options\Regional Options: i set "Standards and Formats" to "English (United States)" and then customized date appearance to what i'm used to (16/09/2004 15:34 instead of the American 9/16/2004 3:54 PM) and set "Location" to "United States".

The funny thing is that they call the wizard's questions and answers "interview". It makes sense, but it's the first time i see such a thing.

Step 2 of 12: Database templates

The databases templates page itself is pretty straightforward, but the interesting part hides under the "Show Details..." button. I totally love customization and it's hard for me to simply accept "General Purpose". For example, why do i need 2048MB (!!!) for a certain something called "db_recovery_file_dest_size", when i have less than 1MB of data? By the end of my study i should know everything about those templates. Anyway i couldn't stand the temptation and clicked "Custom Database".

Step 3 of 12: Database Identification

I don't know what Database Identification" means, so i clicked the "Help" button, which really helped. I called my database "music10g.sugarcube". "sugarcube" is the WinXP name of my computer and i used it as the domain name. The SID was automatically set to "music10g" and i suppose that it's OK.

Step 4 of 12: Management Options

This page is a little scary at first -- there are quite a lot of buttons and selections to make. I just read the help, which, again was OK.

Now, the documentation says to check "Configure the Database with Enterprise Manager" if i want to use the Enterprise Manager, which is fine with me. But it also asks if i want to use the "Oracle Management Agent" and this option is grayed-out. It took me a minute to understand that it is just not installed and that i have to install it from a separate CD. I couldn't find it on oracle.com. Then i looked in OUI. This was very educational: the installation consists of hundreds of components in a complex tree, which is very repetetetitive. I also understood why i have to download and install whopping 600MB: it includes installations of both Sun's JRE and maybe the whole JDK and also something called Oracle JVM, plus a "Perl interpreter 5.6.1". And what if i have these products already on my computer (and i do)? Which executable Oracle will use? And what if i have different (and newer!) versions? Anyway, i did find "Enterprise Management Agent" there, and now i'm totally confused. This time i just go with the default, which is "Use Database Control for Database Management".

Step 5 of 12: Database Credentials

This was simple: i just entered the same password for all accounts.

Step 6 of 12: Storage Options

"ASM (Automatic Storage Management)" doesn't sound very reliable and if it does work, it just makes the DBA's job unnecessary, which is the last thing i want. "Raw devices" sounds interesting, but for now i'll go for the "File System" option, which seems simpler for now.

Step 7 of 12: Database File Locations

Here i picked "Use Common Location for All Database Files", because i wanted to put the files on a different drive (D:\oracle\music10g\datafiles).

Step 8 of 12: Recovery Configuration

This wasn't too hard, too, i picked a different drive again (E:\oracle\music10g\recovery). The default for "Flash Recovery Area Size" was 2048MB; i changed it to 20MB. I also added two directories for archive files: C:\oracle\music10g\archive and D:\oracle\music10g\archive. I hope i understood the concept well enough. I know that these files are supposed to be on different physical drives, but i don't have so much drives here. It is interesting to notice that there's no "Browse" button at "Archive Log Destinations".

Step 9 of 12: Database Content

Just went for the defaults here.

Step 10 of 12: Initialization Parameters

Memory

I didn't want to go for the typical setting, i just didn't feel right with supplying percentage for memory management. The custom setting, though seemed complicated, so i decided to settle for Custom setting with Automatic Shared Memory Management simply because there were fewer fields to fill out. So, how many megabytes am i going to give it? I opened the Windows Task Manager and it was another educational experience: Apparently Firefox is a memory hog: I had five windows open and it took up 38MB of the memory! So i started closing them and every closed window added to Firefox's memory usage. Is it a memory leak or the mysterious Netscape's "Memory Cache"? It peaked at 48MB before i closed the final window. Upon startup, an empty window uses 18MB; for comparison, iexplore.exe takes up only 15MB (but go figure what kind of Microsoft trickery lies behind it). Curious. Moreover, oracle.exe uses 244MB; i don't know yet if this footprint is configurable or the standard minimum. If it is the latter, it's scary. Two java processes currently running use around 50MB together. One of them is definitely the DBCA, but what is the second? Eventually i settled on the defaults for the memory. I'll learn to customize it someday.

Sizing

Used the defaults, they seemed OK. But i should learn more about blocksize later.

Character sets

This is important: my CD's database includes titles in English, French, Icelandic, Hebrew and Russian, thus it is important to use Unicode. My understanding of Unicode is far from being perfect, but i suppose that UTF-8 is as ubiquitous as it can get, but the question arises: What should i use in Oracle -- AL32UTF8 or UTF8? The help file pointed to "Database Globalization Support Guide", which i easily found on oracle.com. Using the recommendations there i decided to set AL32UTF8 for the database charset and AL16UTF16 for the national charset. I don't completely understand why do i need to define the national charset when i have a Unicode database, but that value appeared in the example, so i just used it. It has something to do with the client applications, but it threw Thai, Arabic and Japanese in the same example so i just went for the default. This is something i really should understand well.

I set the default language to AMERICAN and the default date format to ISRAEL. It seemed like a perfect combination.

Connection Mode

I selected Dedicated Server Mode, because i only have one "server" and really few users, and the required parameters for Shared Server Mode were too complicated.

Step 11 of 12: Database Storage

Now i feel a bit of a fool, because previously i gave a directory name with hardcoded database name in it, and i see that i should have used the variable {DB_NAME} instead. I wonder why can't steps 7, 8 and 11 be combined.

Furthermore, the default file sizes are quite big -- hundreds of MB's, to put it short. And i don't know why; is the space required for SYSTEM really so big -- 300MB? I guess that these are used for various database definitions, but at this point how big they really are. Having enough space on my hard drives, i am just going for the defaults.

Step 12 of 12: Creation Options

I opted not to create the database, because although i have a few GB's to spare, they are not endless. I opted to save the template and generate Database Creation Scripts -- now i'll have some interesting code to browse.

Conclusions

It took me around 5 hours to run the wizard, but i went into detail and documented everything, so i'm content. Overall it seems like a useful tool for beginners and pro's alike. The online help, for the most part is pretty fine. The globalization guide is quite easy to understand, although the national charset stuff was a bit confusing and seemed redundant.

There are several frustrating points:

  1. The "Enterprise Management Agent" issue in step 4 is completely confusing.
  2. Database Content -- this step was not so clear at all. The help explains the meaning of components like OLAP and Oracle Spatial, but what is the meaning of SYSAUX, SYSTEM, USERS, <CREATE_NEW>?
  3. Defining memory usage and data file sizes: The wizard, with its huge defaults seems to be aimed straight at the enterprise, but then what serious enterprise DBA would go for the defaults? I know i wouldn't. The reasons for the recommended value should be presented in the wizard itself or at least in the help.

And i listened to a lot of music, which is always good.

No comments: