重建控制文件(二)

2014-11-24 17:00:03 · 作者: · 浏览: 1
.2.0/db_1/dbs/arch'

--LOG_ARCHIVE_DEST_1='MANDATORY NOREOPEN NODELAY'

--LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM EXPEDITE NOVERIFY SYNC'

-- LOG_ARCHIVE_DEST_1='NOREGISTERNOALTERNATE NODEPENDENCY'

--LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'

--LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'

--LOG_ARCHIVE_DEST_STATE_1=ENABLE

--

-- Below are twosets of SQL statements, each of which creates a new

-- control fileand uses it to open the database. The first set opens

-- the databasewith the NORESETLOGS option and should be used only if

-- the currentversions of all online logs are available. The second

-- set opens thedatabase with the RESETLOGS option and should be used

-- if onlinelogs are unavailable.

-- Theappropriate set of statements can be copied from the trace into

-- a scriptfile, edited as necessary, and executed when there is a

-- need tore-create the control file.

--

-- Set #1. NORESETLOGS case

--

-- The followingcommands will create a new control file and use it

-- to open thedatabase.

-- Data used byRecovery Manager will be lost.

-- Additionallogs may be required for media recovery of offline

-- Use this onlyif the current versions of all online logs are

-- available.

-- Aftermounting the created controlfile, the following SQL

-- statementwill place the database in the appropriate

-- protectionmode:

-- ALTER DATABASE SET STANDBY DATABASE TOMAXIMIZE PERFORMANCE

STARTUP NOMOUNT

CREATECONTROLFILE REUSE DATABASE "PROD" NORESETLOGS ARCHIVELOG

MAXLOGFILES 30

MAXLOGMEMBERS 5

MAXDATAFILES 100

MAXINSTANCES 1

MAXLOGHISTORY 292

LOGFILE

GROUP 1 (

'/u01/app/oracle/oradata/PROD/disk1/redo01.log',

'/u01/app/oracle/oradata/PROD/disk2/redo01_b.log'

) SIZE 100M,

GROUP 2 (

'/u01/app/oracle/oradata/PROD/disk1/redo02.log',

'/u01/app/oracle/oradata/PROD/disk2/redo02_b.log'

) SIZE 100M,

GROUP 3 (

'/u01/app/oracle/oradata/PROD/disk1/redo03.log',

'/u01/app/oracle/oradata/PROD/disk2/redo03_b.log'

) SIZE 100M,

GROUP 4 (

'/u01/app/oracle/oradata/PROD/disk1/redo04_a.log',

'/u01/app/oracle/oradata/PROD/disk2/redo04_b.log'

) SIZE100M

-- STANDBYLOGFILE

DATAFILE

'/u01/app/oracle/oradata/PROD/disk1/system01.dbf',

'/u01/app/oracle/oradata/PROD/disk1/undotbs01.dbf',

'/u01/app/oracle/oradata/PROD/disk1/sysaux01.dbf',

'/u01/app/oracle/oradata/PROD/disk1/EXAMPLE_01.dbf',

'/u01/app/oracle/oradata/PROD/disk3/USERS_01.dbf',

'/u01/app/oracle/oradata/PROD/disk5/dds_01.dbf'

CHARACTER SETUS7ASCII

;

-- Commands tore-create incarnation table

-- Below lognames MUST be changed to existing filenames on

-- disk. Any onelog file from each branch can be used to

-- re-createincarnation records.

-- ALTERDATABASE REGISTER LOGFILE'/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_1_842277968.dbf';

-- Recovery isrequired if any of the datafiles are restored backups,

-- or if thelast shutdown was not normal or immediate.

RECOVER DATABASE

-- All logs needarchiving and a log switch is needed.

ALTER SYSTEMARCHIVE LOG ALL;

-- Database cannow be opened normally.

ALTER DATABASEOPEN;

-- Commands toadd tempfiles to temporary tablespaces.

-- Onlinetempfiles have complete space information.

-- Othertempfiles may require adjustment.

ALTER TABLESPACETEMP01 ADD TEMPFILE '/u01/app/oracle/oradata/PROD/disk1/temp01.dbf'

SIZE 20971520 REUSE AUTOEXTEND ON NE