Sample Files
Sample oratab File
Listing 3.17 is created by the Oracle installer when you install the Oracle database under Unix operating system. The installer adds the instance name, Oracle home directory, and auto startup flag (Y/N) for the database in the format [SID:ORACLE_HOME:FLAG]. The auto startup flag tells whether the Oracle database should be started automatically when the system is rebooted.
Listing 3.17 oratab
# All the entries in oratab file follow the # following syntax. Each instance listed on a separate line # SID:ORACLE_HOME:Y/N DEV:/u02/oracle/DEV/oracle/8.1.7:N TEST:/u05/oracle/TEST/oracle/8.1.7:N #PREPROD:/u06/oracle/PREPROD/oracle/8.1.7:N
Sample Trace of Control File
Listing 3.18 will have the structure of the database. It lists the data files, control files, and the redo log files and their location. This is useful if you need to recreate the control file. A trace of the control file can be generated by using the alter database backup control file to trace.
Listing 3.18 trace of control file
/u02/oracle/DEV/common/admin/udump/DEV_ora_11817.trc Oracle8i Enterprise Edition Release 8.1.7.1.0 - Production With the Partitioning option JServer Release 8.1.7.1.0 - Production ORACLE_HOME = /u02/oracle/DEV/oracle/8.1.7 System name: SunOS Node name: mking07 Release: 5.6 Version: Generic_105181-25 Machine: sun4u Instance name: DEV Redo thread mounted by this instance: 1 Oracle process number: 10 Unix process pid: 11817, image: oracle@mking07 (TNS V1-V3) *** SESSION ID:(9.13) 2001-05-17 21:15:28.730 *** 2001-05-17 21:15:28.730 # The following commands will create a new control file and use it # to open the database. # Data used by the recovery manager will be lost. Additional logs may # be required for media recovery of offline data files. Use this # only if the current version of all online logs are available. STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "DEV" NORESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 4 MAXDATAFILES 1022 MAXINSTANCES 1 MAXLOGHISTORY 453 LOGFILE GROUP 1 ( '/u03/oracle/DEV/data/log01a.dbf', '/u03/oracle/DEV/data/log01b.dbf' ) SIZE 400M, GROUP 2 ( '/u03/oracle/DEV/data/log02a.dbf', '/u03/oracle/DEV/data/log02b.dbf' ) SIZE 400M, DATAFILE '/u02/oracle/DEV/data/system01.dbf', '/u02/oracle/DEV/data/indx01.dbf', '/u02/oracle/DEV/data/rbs01.dbf', '/u02/oracle/DEV/data/temp01.dbf', '/u02/oracle/DEV/data/users.dbf', CHARACTER SET WE8ISO8859P1 ; # Recovery is required if any of the datafiles are restored backups, # or if the last shutdown was not normal or immediate. RECOVER DATABASE # Database can now be opened normally. ALTER DATABASE OPEN; # Commands to add tempfiles to temporary tablespaces. # Online tempfiles have complete space information. # Other tempfiles may require adjustment. ALTER TABLESPACE TEMP ADD TEMPFILE '/u03/oracle/DEV/data/temp04.dbf' REUSE; ALTER TABLESPACE TEMP ADD TEMPFILE '/u03/oracle/DEV/data/temp03.dbf' REUSE; # End of tempfile additions.#