IZ0-053 Q575(控制檔案丟失)
575.You have lost all your database control files. To recover them, you are going to use the results of the
alter database backup controlfile to trace command. Your datafiles and your online redo logs are all intact.
Which of the following is true regarding your recovery?
A. You will need to open the database with the resetlogs command.
B. All you need to do is execute the trace file from SQL*Plus and it will perform the recovery for you.
C. You will use the resetlogs version of the create controlfile command.
D. You will use the noresetlogs version of the create controlfile command.
E. You will use the trace file to create a backup control file, and then you will recover the database with the
recover database using backup controlfile command
Answer: D
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database backup controlfile to trace;
Database altered.
SQL> select name from v$diag_info where name = 'Default Trace File';
NAME
----------------------------------------------------------------
Default Trace File
SQL> select value from v$diag_info where name = 'Default Trace File';
VALUE
--------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/inst1/inst1/trace/inst1_ora_2781.trc
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/inst1/control01.ctl
/u01/app/oracle/fast_recovery_area/inst1/control02.ctl
SQL> host rm /u01/app/oracle/oradata/inst1/control01.ctl
SQL> host rm /u01/app/oracle/fast_recovery_area/inst1/control02.ctl
SQL> alter database backup controlfile to trace;
Database altered.
SQL> shutdown immediate
Database closed.
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/inst1/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> select sysdate from scott.emp;
select sysdate from scott.emp
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
SQL> CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 '/u01/app/oracle/oradata/inst1/redo01.log' SIZE 50M BLOCKSIZE 512,
9 GROUP 2 '/u01/app/oracle/oradata/inst1/redo02.log' SIZE 50M BLOCKSIZE 512,
10 GROUP 3 '/u01/app/oracle/oradata/inst1/redo03.log' SIZE 50M BLOCKSIZE 512
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/u01/app/oracle/oradata/inst1/system01.dbf',
14 '/u01/app/oracle/oradata/inst1/sysaux01.dbf',
15 '/u01/app/oracle/oradata/inst1/undotbs01.dbf',
16 '/u01/app/oracle/oradata/inst1/users01.dbf',
17 '/u01/app/oracle/oradata/inst1/example01.dbf'
18 CHARACTER SET UTF8;
CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01100: database already mounted
SQL> alter database nomount;
alter database nomount
*
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
SQL> shutdown
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/inst1/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 '/u01/app/oracle/oradata/inst1/redo01.log' SIZE 50M BLOCKSIZE 512,
9 GROUP 2 '/u01/app/oracle/oradata/inst1/redo02.log' SIZE 50M BLOCKSIZE 512,
10 GROUP 3 '/u01/app/oracle/oradata/inst1/redo03.log' SIZE 50M BLOCKSIZE 512
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/u01/app/oracle/oradata/inst1/system01.dbf',
14 '/u01/app/oracle/oradata/inst1/sysaux01.dbf',
15 '/u01/app/oracle/oradata/inst1/undotbs01.dbf',
16 '/u01/app/oracle/oradata/inst1/users01.dbf',
17 '/u01/app/oracle/oradata/inst1/example01.dbf'
18 CHARACTER SET UTF8
19 /
CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01100: database already mounted
SQL> shutdown
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/inst1/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 413372416 bytes
Fixed Size 2253784 bytes
Variable Size 314575912 bytes
Database Buffers 88080384 bytes
Redo Buffers 8462336 bytes
SQL> CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 '/u01/app/oracle/oradata/inst1/redo01.log' SIZE 50M BLOCKSIZE 512,
9 GROUP 2 '/u01/app/oracle/oradata/inst1/redo02.log' SIZE 50M BLOCKSIZE 512,
10 GROUP 3 '/u01/app/oracle/oradata/inst1/redo03.log' SIZE 50M BLOCKSIZE 512
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/u01/app/oracle/oradata/inst1/system01.dbf',
14 '/u01/app/oracle/oradata/inst1/sysaux01.dbf',
15 '/u01/app/oracle/oradata/inst1/undotbs01.dbf',
16 '/u01/app/oracle/oradata/inst1/users01.dbf',
17 '/u01/app/oracle/oradata/inst1/example01.dbf'
18 CHARACTER SET UTF8
19 /
Control file created.
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01100: database already mounted
SQL> alter database open ^H;
alter database open
*
ERROR at line 1:
ORA-00911: invalid character
SQL> alter database open;
Database altered.
SQL>
alter database backup controlfile to trace產生的trace檔案的內容:
-- Set #1. NORESETLOGS 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.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- available.
-- 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 "INST1" NORESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/inst1/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/inst1/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/app/oracle/oradata/inst1/redo03.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/inst1/system01.dbf',
'/u01/app/oracle/oradata/inst1/sysaux01.dbf',
'/u01/app/oracle/oradata/inst1/undotbs01.dbf',
'/u01/app/oracle/oradata/inst1/users01.dbf',
'/u01/app/oracle/oradata/inst1/example01.dbf'
CHARACTER SET UTF8
;
從重新建立控制檔案的過程中可以看出,不需要使用resetlogs選項
alter database backup controlfile to trace command. Your datafiles and your online redo logs are all intact.
Which of the following is true regarding your recovery?
A. You will need to open the database with the resetlogs command.
B. All you need to do is execute the trace file from SQL*Plus and it will perform the recovery for you.
C. You will use the resetlogs version of the create controlfile command.
D. You will use the noresetlogs version of the create controlfile command.
E. You will use the trace file to create a backup control file, and then you will recover the database with the
recover database using backup controlfile command
Answer: D
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database backup controlfile to trace;
Database altered.
SQL> select name from v$diag_info where name = 'Default Trace File';
NAME
----------------------------------------------------------------
Default Trace File
SQL> select value from v$diag_info where name = 'Default Trace File';
VALUE
--------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/inst1/inst1/trace/inst1_ora_2781.trc
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/inst1/control01.ctl
/u01/app/oracle/fast_recovery_area/inst1/control02.ctl
SQL> host rm /u01/app/oracle/oradata/inst1/control01.ctl
SQL> host rm /u01/app/oracle/fast_recovery_area/inst1/control02.ctl
SQL> alter database backup controlfile to trace;
Database altered.
SQL> shutdown immediate
Database closed.
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/inst1/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> select sysdate from scott.emp;
select sysdate from scott.emp
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
SQL> CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 '/u01/app/oracle/oradata/inst1/redo01.log' SIZE 50M BLOCKSIZE 512,
9 GROUP 2 '/u01/app/oracle/oradata/inst1/redo02.log' SIZE 50M BLOCKSIZE 512,
10 GROUP 3 '/u01/app/oracle/oradata/inst1/redo03.log' SIZE 50M BLOCKSIZE 512
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/u01/app/oracle/oradata/inst1/system01.dbf',
14 '/u01/app/oracle/oradata/inst1/sysaux01.dbf',
15 '/u01/app/oracle/oradata/inst1/undotbs01.dbf',
16 '/u01/app/oracle/oradata/inst1/users01.dbf',
17 '/u01/app/oracle/oradata/inst1/example01.dbf'
18 CHARACTER SET UTF8;
CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01100: database already mounted
SQL> alter database nomount;
alter database nomount
*
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
SQL> shutdown
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/inst1/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 '/u01/app/oracle/oradata/inst1/redo01.log' SIZE 50M BLOCKSIZE 512,
9 GROUP 2 '/u01/app/oracle/oradata/inst1/redo02.log' SIZE 50M BLOCKSIZE 512,
10 GROUP 3 '/u01/app/oracle/oradata/inst1/redo03.log' SIZE 50M BLOCKSIZE 512
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/u01/app/oracle/oradata/inst1/system01.dbf',
14 '/u01/app/oracle/oradata/inst1/sysaux01.dbf',
15 '/u01/app/oracle/oradata/inst1/undotbs01.dbf',
16 '/u01/app/oracle/oradata/inst1/users01.dbf',
17 '/u01/app/oracle/oradata/inst1/example01.dbf'
18 CHARACTER SET UTF8
19 /
CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01100: database already mounted
SQL> shutdown
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/inst1/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 413372416 bytes
Fixed Size 2253784 bytes
Variable Size 314575912 bytes
Database Buffers 88080384 bytes
Redo Buffers 8462336 bytes
SQL> CREATE CONTROLFILE REUSE DATABASE "INST1" NORESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 '/u01/app/oracle/oradata/inst1/redo01.log' SIZE 50M BLOCKSIZE 512,
9 GROUP 2 '/u01/app/oracle/oradata/inst1/redo02.log' SIZE 50M BLOCKSIZE 512,
10 GROUP 3 '/u01/app/oracle/oradata/inst1/redo03.log' SIZE 50M BLOCKSIZE 512
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/u01/app/oracle/oradata/inst1/system01.dbf',
14 '/u01/app/oracle/oradata/inst1/sysaux01.dbf',
15 '/u01/app/oracle/oradata/inst1/undotbs01.dbf',
16 '/u01/app/oracle/oradata/inst1/users01.dbf',
17 '/u01/app/oracle/oradata/inst1/example01.dbf'
18 CHARACTER SET UTF8
19 /
Control file created.
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01100: database already mounted
SQL> alter database open ^H;
alter database open
*
ERROR at line 1:
ORA-00911: invalid character
SQL> alter database open;
Database altered.
SQL>
alter database backup controlfile to trace產生的trace檔案的內容:
-- Set #1. NORESETLOGS 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.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- available.
-- 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 "INST1" NORESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/inst1/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/inst1/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/app/oracle/oradata/inst1/redo03.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/inst1/system01.dbf',
'/u01/app/oracle/oradata/inst1/sysaux01.dbf',
'/u01/app/oracle/oradata/inst1/undotbs01.dbf',
'/u01/app/oracle/oradata/inst1/users01.dbf',
'/u01/app/oracle/oradata/inst1/example01.dbf'
CHARACTER SET UTF8
;
從重新建立控制檔案的過程中可以看出,不需要使用resetlogs選項
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2054509/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 控制檔案丟失恢復
- 【控制檔案丟失恢復】
- 控制檔案丟失恢復(二)
- 恢復丟失的控制檔案
- 控制檔案丟失處理方法
- 控制檔案全部丟失恢復
- 控制檔案全部丟失的恢復
- 控制檔案部分丟失的恢復
- 控制檔案丟失的RMAN恢復
- rman恢復:資料檔案丟失,控制檔案丟失,聯機日誌檔案丟失(非當前使用與當前使用)
- 當前控制檔案全部丟失恢復
- 恢復之丟失全部控制檔案以及備份中的控制檔案
- 模擬控制檔案丟失進行恢復。
- 控制檔案損壞,丟失其中一個
- 引數檔案控制檔案和資料檔案丟失的恢復
- Oracle 11g重建控制檔案——控制檔案全部丟失,從零開始Oracle
- 控制檔案丟失恢復例項(3) - 使用重建控制檔案方式(noresetlogs)
- 新建的表空間(或資料檔案)丟失以及控制檔案丟失,有新建表空間(或資料檔案)前的控制文
- oracle 案例-控制檔案丟失故障處理過程Oracle
- 全部控制檔案丟失後的完全恢復(轉)
- 開啟 控制檔案自動備份下,引數檔案、控制檔案全部丟失恢復
- 找回丟失的檔案
- dds丟失字典檔案
- 丟失一個控制檔案並恢復資料庫資料庫
- 只有rman備份集,控制檔案丟失的恢復
- 探索ORACLE之RMAN_07 控制檔案丟失恢復Oracle
- 備份恢復實驗(1)丟失部分控制檔案
- 非歸檔無備份下控制檔案丟失的恢復
- 無備份丟失部分資料檔案和控制檔案恢復 [轉]
- 恢復案例:無歸檔,丟失全部控制檔案、日誌檔案恢復案例
- 恢復案例:無歸檔,掉電,控制檔案全部丟失恢復
- 控制檔案丟失恢復例項(2) - 控制檔案備份後物理結構未變化
- 控制檔案丟失恢復例項(1) - 控制檔案備份後物理結構發生變化
- undo檔案丟失或損壞
- 資料檔案損壞、丟失
- 模擬資料檔案丟失
- 【備份恢復】 丟失一個控制檔案 之恢復操作
- 丟失全部控制檔案後從RMAN備份集中恢復示例