Oracle 控制文件(CONTROL FILE)(六)

2014-11-24 17:58:23 · 作者: · 浏览: 5
-- Below log names MUST be changed to existing filenames on


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


-- re-create incarnation records.


-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area


-- /ORCL/archivelog/2010_05_20/o1_mf_1_1_%u_.arc';


-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/flash_recovery_area


-- /ORCL/archivelog/2010_05_20/o1_mf_1_1_%u_.arc';


-- 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 '/u01/app/oracle/oradata/orcl/temp01.dbf'


SIZE 26214400 REUSE AUTOEXTEND ON NEXT 655360 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.


-- Data used by Recovery Manager will be lost.


-- The contents of online logs will be lost and all backups will


-- be invalidated. Use this only if online logs are damaged.


-- After mounting the created controlfile, the following SQL


-- statement will place the database in the appropriate


-- protection mode:


-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE


STARTUP NOMOUNT


CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS NOARCHIVELOG


MAXLOGFILES 16


MAXLOGMEMBERS 3


MAXDATAFILES 100


MAXINSTANCES 8


MAXLOGHISTORY 292


LOGFILE


GROUP 1 '/u01/app/oracle/oradata/orcl/redo01.log' SIZE 50M,


GROUP 2 (


'/u01/app/oracle/oradata/orcl/redo02.log',


'/u01/app/oracle/oradata/orcl/redo2.log'


) SIZE 50M,


GROUP 3 (


'/u01/app/oracle/oradata/orcl/redo03.log',


'/u01/app/oracle/oradata/orcl/redo3.log'


) SIZE 100M,


GROUP 4 '/u01/app/oracle/oradata/orcl/redo04.log ' SIZE 50M,


GROUP 7 (


'/u01/app/oracle/oradata/orcl/redo07.log ',


'/u01/app/oracle/oradata/orcl/redo7.log '


) SIZE 50M,


GROUP 8 (


'/u01/app/oracle/oradata/orcl/redo08.log',


'/u01/app/oracle/oradata/orcl/redo8.log'


) SIZE 50M


-- STANDBY LOGFILE


DATAFILE


'/u01/app/oracle/oradata/orcl/system01.dbf',


'/u01/app/oracle/oradata/orcl/undotbs01.dbf',


'/u01/app/oracle/oradata/orcl/sysaux01.dbf',


'/u01/app/oracle/oradata/orcl/users01.dbf',


'/u01/app/oracle/oradata/orcl/example01.dbf',


'/u01/app/oracle/oradata/orcl/tbs1_1.dbf',


'/u01/app/oracle/oradata/orcl/tbs1_2.dbf'


CHARACTER SET WE8ISO8859P1


;


-- Commands to re-create incarnation table


-- Below log names MUST be changed to existing filenames on


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