Now that you know the location of the alert log, go to that directory and issue a dir command to see the alert log file, named DiogenesALRT.LOG (Figure A).
Figure A |
|
The location of the Oracle alert log |
When you check the last few lines of the alert log, you’ll see that Oracle9i has logged the OMF operations, and you have a full audit train of the change, as shown in Listing G.
Listing G |
 |
 |
Wed Jul 31 12:02:30 2002
ALTER SYSTEM SET db_create_file_dest='c:/oracle/oradata/diogenes' SCOPE=BOTH;
Wed Jul 31 12:02:42 2002
create tablespace test
Wed Jul 31 12:02:47 2002
Created Oracle managed file C:/ORACLE/ORADATA/DIOGENES/ORA_TEST_YNJ2K200.DBF
Completed: create tablespace test
Wed Jul 31 12:08:26 2002
drop tablespace test
Wed Jul 31 12:08:26 2002
Deleted Oracle managed file C:/ORACLE/ORADATA/DIOGENES/ORA_TEST_YNJ2K200.DBF
Completed: drop tablespace test
|
Using OMF with online redo logs
Oracle9i also lets you use OMF with online redo log files. This feature is especially useful because it removes the tedium from multiplexing and sizing the redo logs. You do this by setting the db_create_online_log_dest_1 through db_create_online_log_dest_5 parameters. The one-through-five notation allows you to specify up to five multiplexed copies of the online redo log file.
Because the redo logs are allocated at database creation time, these parameters must be set in the init.ora file prior to creating the database. When multiplexing, you also need to segregate the online redo logs onto separate disks as protection against disk failure. In this UNIX example, the mount points u01, u02, u03, and u04 all map to different disk spindles.
Using OMF for the redo logs requires several parameters. Here’s a sample init.ora file for Oracle9i OMF for redo logs:
db_create_online_log_dest_1 = ‘/u01/oracle/oradata/diogenes’
db_create_online_log_dest_2 = ‘/u02/oracle/oradata/diogenes’
db_create_online_log_dest_3 = ‘/u03/oracle/oradata/diogenes’
db_create_online_log_dest_4 = ‘/u04/oracle/oradata/diogenes’
Using OMF for redo logs greatly simplifies the syntax you need to create a new database. Before OMF, you had to specify the size and location of the redo logs at database creation time, as shown in Listing H.
Listing H |
 |
 |
create database
"diogenes"
maxinstances 1
maxlogfiles 16
maxloghistory 226
maxlogmembers 2
maxdatafiles 30
noarchivelog
character set "US7ASCII"
SET TIME_ZONE = 'PST';
datafile
'c:/oracle/oradata/system01.dbf' size 246M
logfile
group 1 'c:/oracle/oradata/log01.dbf' size 50K,
group 2 'c:/oracle/oradata/log02.dbf' size 50K,
group 3 'c:/oracle/oradata/log03.dbf' size 50K
;
|
Now, OMF takes care of the details, and database creation is simple, as shown in Listing I
Listing I |
 |
 |
create database
"diogenes"
maxinstances 1
maxlogfiles 16
maxloghistory 226
maxlogmembers 2
maxdatafiles 30
noarchivelog
character set "US7ASCII"
SET TIME_ZONE = 'PST';
datafile
'c:/oracle/oradata/system01.dbf' size 246M
logfile
group 1,
group 2,
group 3
;
|
Who doesn’t like OMF?
OMF is quite popular in large Oracle9i shops that handle hundreds of tablespaces and data files. OMF is also popular for vendor-based applications because vendor install scripts can be sent to all Oracle customers, no matter what their specific file configuration. The downside to OMF is that seasoned database professionals don’t like to use uniform file sizes and obtuse filenames.