Hi Joe,
Are you trying to recreate a controlfile or ??
What are you trying to archive?
You do :
alter database backup controlfile to trace;
ANd it generate a trace file in your udump subdirectory:
and look like this right??
===
Dump file /opt/app/oracle/admin/DDDTEST3/udump/dddtest3_ora_8011.trc
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production
ORACLE_HOME = /opt/app/oracle/product/8.1.7
System name: SunOS
Node name: db1
Release: 5.9
Version: Generic_112233-03
Machine: sun4u
Instance name: DDDTEST3
Redo thread mounted by this instance: 1
Oracle process number: 9
Unix process pid: 8011, image: oracle_at_db1 (TNS V1-V3)
- SESSION ID:(9.6228) 2006-01-26 21:57:14.644
- 2006-01-26 21:57:14.643
# 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 "DDDTEST3" NORESETLOGS ARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 '/local4/oracle/oradata/DDDTEST3/ddd_redo01.log' SIZE 20M,
GROUP 2 '/local4/oracle/oradata/DDDTEST3/ddd_redo02.log' SIZE 20M,
GROUP 3 '/local4/oracle/oradata/DDDTEST3/ddd_redo03.log' SIZE 20M
DATAFILE
'/local4/oracle/oradata/DDDTEST3/system01.dbf',
'/local4/oracle/oradata/DDDTEST3/rbs01.dbf',
'/local4/oracle/oradata/DDDTEST3/data01_01.dbf',
'/local4/oracle/oradata/DDDTEST3/index01_01.dbf',
'/local4/oracle/oradata/DDDTEST3/perfstat_01.dbf'
CHARACTER SET UTF8
;
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
RECOVER DATABASE
# All logs need archiving and a log switch is needed.
ALTER SYSTEM ARCHIVE LOG ALL;
# 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
'/local4/oracle/oradata/DDDTEST3/temp01.dbf' REUSE;
# End of tempfile additions.
- Usually I copy this trace file to recreate-controlfile.sql
- delete all the lines until
"STARTUP NOMOUNT"
And you have to see what you like to do?
You might have to change
"CREATE CONTROLFILE REUSE DATABASE "DDDTEST3"
NORESETLOGS ARCHIVELOG"
"
CREATE CONTROLFILE SET DATABASE "DDDTEST3"
NORESETLOGS ARCHIVELOG"
It depend what you hope to archive.
3) I usually
sqlplus "/ as sysdba"
startup nomount
@recreate-controlfile.sql
Then you will create new controlfile.
Is it what you hope to test??
Dominica
Received on Thu Jan 26 2006 - 21:01:52 CST