# Below are two sets of SQL statements, each of which creates a new # control file and uses it to open the database. The first set opens # the database with the NORESETLOGS option and should be used only if # the current versions of all online logs are available. The second # set opens the database with the RESETLOGS option and should be used # if online logs are unavailable. # The appropriate set of statements can be copied from the trace into # a script file, edited as necessary, and executed when there is a # need to re-create the control file. # # Set #1. NORESETLOGS case # # 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 "TEC" NORESETLOGS NOARCHIVELOG -- SET STANDBY TO MAXIMIZE PERFORMANCE MAXLOGFILES 50 MAXLOGMEMBERS 5 MAXDATAFILES 100 MAXINSTANCES 1 MAXLOGHISTORY 226 LOGFILE GROUP 1 '/oracle/oradata/TEC/redo01.log' SIZE 100M, GROUP 2 '/oracle/oradata/TEC/redo02.log' SIZE 100M, GROUP 3 '/oracle/oradata/TEC/redo03.log' SIZE 100M -- STANDBY LOGFILE DATAFILE '/oracle/oradata/TEC/system01.dbf', '/oracle/oradata/TEC/undotbs01.dbf', '/oracle/oradata/TEC/cwmlite01.dbf', '/oracle/oradata/TEC/drsys01.dbf', '/oracle/oradata/TEC/example01.dbf', '/oracle/oradata/TEC/indx01.dbf', '/oracle/oradata/TEC/odm01.dbf', '/oracle/oradata/TEC/tools01.dbf', '/oracle/oradata/TEC/users01.dbf', '/oracle/oradata/TEC/xdb01.dbf', '/oracle/product/9.2.0.4/dbs/TS_rec_log', '/oracle/product/9.2.0.4/dbs/TS_evt_rep', '/oracle/product/9.2.0.4/dbs/TS_slots_task', '/oracle/product/9.2.0.4/dbs/TS_rest_data', '/oracle/product/9.2.0.4/dbs/TS_indexes' CHARACTER SET WE8ISO8859P1 ; # Configure RMAN configuration record 1 VARIABLE RECNO NUMBER; EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEFAULT DEVICE TYPE TO','''SBT_TAPE'''); # 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 '/oracle/oradata/TEC/temp01.dbf' SIZE 41943040 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M; ALTER TABLESPACE TS_TEC_TEMP ADD TEMPFILE '/oracle/product/9.2.0.4/dbs/TS_tec_temp' SIZE 7340032 REUSE AUTOEXTEND ON NEXT 8192 MAXSIZE 32767M; # End of tempfile additions. # # Set #2. RESETLOGS case # # The following commands will create a new control file and use it # to open the database. # The contents of online logs will be lost and all backups will # be invalidated. Use this only if online logs are damaged. STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "TEC" RESETLOGS NOARCHIVELOG -- SET STANDBY TO MAXIMIZE PERFORMANCE MAXLOGFILES 50 MAXLOGMEMBERS 5 MAXDATAFILES 100 MAXINSTANCES 1 MAXLOGHISTORY 226 LOGFILE GROUP 1 '/oracle/oradata/TEC/redo01.log' SIZE 100M, GROUP 2 '/oracle/oradata/TEC/redo02.log' SIZE 100M, GROUP 3 '/oracle/oradata/TEC/redo03.log' SIZE 100M -- STANDBY LOGFILE DATAFILE '/oracle/oradata/TEC/system01.dbf', '/oracle/oradata/TEC/undotbs01.dbf', '/oracle/oradata/TEC/cwmlite01.dbf', '/oracle/oradata/TEC/drsys01.dbf', '/oracle/oradata/TEC/example01.dbf', '/oracle/oradata/TEC/indx01.dbf', '/oracle/oradata/TEC/odm01.dbf', '/oracle/oradata/TEC/tools01.dbf', '/oracle/oradata/TEC/users01.dbf', '/oracle/oradata/TEC/xdb01.dbf', '/oracle/product/9.2.0.4/dbs/TS_rec_log', '/oracle/product/9.2.0.4/dbs/TS_evt_rep', '/oracle/product/9.2.0.4/dbs/TS_slots_task', '/oracle/product/9.2.0.4/dbs/TS_rest_data', '/oracle/product/9.2.0.4/dbs/TS_indexes' CHARACTER SET WE8ISO8859P1 ; # Configure RMAN configuration record 1 VARIABLE RECNO NUMBER; EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEFAULT DEVICE TYPE TO','''SBT_TAPE'''); # Recovery is required if any of the datafiles are restored backups, # or if the last shutdown was not normal or immediate. RECOVER DATABASE USING BACKUP CONTROLFILE # Database can now be opened zeroing the online logs. ALTER DATABASE OPEN RESETLOGS; # Commands to add tempfiles to temporary tablespaces. # Online tempfiles have complete space information. # Other tempfiles may require adjustment. ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/oradata/TEC/temp01.dbf' SIZE 41943040 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M; ALTER TABLESPACE TS_TEC_TEMP ADD TEMPFILE '/oracle/product/9.2.0.4/dbs/TS_tec_temp' SIZE 7340032 REUSE AUTOEXTEND ON NEXT 8192 MAXSIZE 32767M; # End of tempfile additions. #