Oracle OCP 1Z0 053 Q564(Datafile Recovery with RMAN)
564.Your database has experienced a loss of datafile users_01.dbf, which is associated with a ablespace
called USERS. The database is still running. Which answer properly describes the rder of the steps that
you would use to recover from this error?
1. Shut down the database.
2. Take the users_01.dbf datafile offline with the alter database command.
3. Restore the users_01.dbf datafile from backup media with the required archived redo logs.
4. Restore all users tablespace-related datafiles from backup media.
5. Issue the recover tablespace users command.
6. Issue the recover datafile users_01.dbf command.
7. Start up the database.
8. Bring the users_01.dbf datafile online with the alter database command.
A.1, 3, 6, 7
B.2, 3, 6, 8
C.1, 2,3,6,7
D.1, 2, 3, 6, 7, 8
E.2, 3,6,5,7
Answer: B
SQL> select file#, name from v$datafile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
/u01/app/oracle/oradata/CATDB/datafile/o1_mf_system_cj6ddl2j_.dbf
2
/u01/app/oracle/oradata/CATDB/datafile/o1_mf_sysaux_cj6df32d_.dbf
3
/u01/app/oracle/oradata/CATDB/datafile/o1_mf_undotbs1_cj6dffdr_.dbf
FILE#
----------
NAME
--------------------------------------------------------------------------------
4
/u01/app/oracle/oradata/CATDB/datafile/o1_mf_users_cj6dfx7h_.dbf
5
/u01/app/oracle/oradata/CATDB/datafile/users02.dbf
SQL> host rm /u01/app/oracle/oradata/CATDB/datafile/users02.dbf
SQL> alter tablespace users datafile 5 offline;
alter tablespace users datafile 5 offline
*
ERROR at line 1:
ORA-02142: missing or invalid ALTER TABLESPACE option
SQL> alter tablespace users datafile '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf' offline;
alter tablespace users datafile '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf' offline
*
ERROR at line 1:
ORA-02142: missing or invalid ALTER TABLESPACE option
SQL> alter tablespace users offline;
alter tablespace users offline
*
ERROR at line 1:
ORA-01116: error in opening database file 5
ORA-01110: data file 5: '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> alter database datafile '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf' offline;
Database altered.
----------------------------------
接下來進行恢復:
RMAN> restore datafile 5;
Starting restore at 05-APR-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/CATDB/datafile/users02.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/CATDB/backupset/2016_04_05/o1_mf_nnndf_TAG20160405T131914_cj6lpm64_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/CATDB/backupset/2016_04_05/o1_mf_nnndf_TAG20160405T131914_cj6lpm64_.bkp tag=TAG20160405T131914
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 05-APR-16
RMAN> recover datafile 5;
Starting recover at 05-APR-16
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 05-APR-16
-------------------------------------
恢復完成將資料檔案置為online
SQL> alter database datafile '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf' online;
Database altered.
SQL> alter tablespace users offline;
Tablespace altered.
SQL> alter tablespace users online;
Tablespace altered.
called USERS. The database is still running. Which answer properly describes the rder of the steps that
you would use to recover from this error?
1. Shut down the database.
2. Take the users_01.dbf datafile offline with the alter database command.
3. Restore the users_01.dbf datafile from backup media with the required archived redo logs.
4. Restore all users tablespace-related datafiles from backup media.
5. Issue the recover tablespace users command.
6. Issue the recover datafile users_01.dbf command.
7. Start up the database.
8. Bring the users_01.dbf datafile online with the alter database command.
A.1, 3, 6, 7
B.2, 3, 6, 8
C.1, 2,3,6,7
D.1, 2, 3, 6, 7, 8
E.2, 3,6,5,7
Answer: B
SQL> select file#, name from v$datafile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
/u01/app/oracle/oradata/CATDB/datafile/o1_mf_system_cj6ddl2j_.dbf
2
/u01/app/oracle/oradata/CATDB/datafile/o1_mf_sysaux_cj6df32d_.dbf
3
/u01/app/oracle/oradata/CATDB/datafile/o1_mf_undotbs1_cj6dffdr_.dbf
FILE#
----------
NAME
--------------------------------------------------------------------------------
4
/u01/app/oracle/oradata/CATDB/datafile/o1_mf_users_cj6dfx7h_.dbf
5
/u01/app/oracle/oradata/CATDB/datafile/users02.dbf
SQL> host rm /u01/app/oracle/oradata/CATDB/datafile/users02.dbf
SQL> alter tablespace users datafile 5 offline;
alter tablespace users datafile 5 offline
*
ERROR at line 1:
ORA-02142: missing or invalid ALTER TABLESPACE option
SQL> alter tablespace users datafile '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf' offline;
alter tablespace users datafile '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf' offline
*
ERROR at line 1:
ORA-02142: missing or invalid ALTER TABLESPACE option
SQL> alter tablespace users offline;
alter tablespace users offline
*
ERROR at line 1:
ORA-01116: error in opening database file 5
ORA-01110: data file 5: '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> alter database datafile '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf' offline;
Database altered.
----------------------------------
接下來進行恢復:
RMAN> restore datafile 5;
Starting restore at 05-APR-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/CATDB/datafile/users02.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/CATDB/backupset/2016_04_05/o1_mf_nnndf_TAG20160405T131914_cj6lpm64_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/CATDB/backupset/2016_04_05/o1_mf_nnndf_TAG20160405T131914_cj6lpm64_.bkp tag=TAG20160405T131914
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 05-APR-16
RMAN> recover datafile 5;
Starting recover at 05-APR-16
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 05-APR-16
-------------------------------------
恢復完成將資料檔案置為online
SQL> alter database datafile '/u01/app/oracle/oradata/CATDB/datafile/users02.dbf' online;
Database altered.
SQL> alter tablespace users offline;
Tablespace altered.
SQL> alter tablespace users online;
Tablespace altered.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2075554/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle OCP 1Z0 053 Q505(RMAN DATAFILE BACKUP COPIES)Oracle
- Oracle OCP 1Z0 053 Q507(Rman Recovery)Oracle
- Oracle ocp 1Z0 053 Q402(RECOVER DATAFILE)Oracle
- Oracle OCP 1Z0 053 Q154(Recover Datafile)Oracle
- Oracle OCP 1Z0 053 Q500(Rman)Oracle
- Oracle OCP 1Z0 053 Q389(Recovery Writer Process)Oracle
- Oracle OCP 1Z0 053 Q182(RMAN)Oracle
- Oracle OCP 1Z0 053 Q21(RMAN Duplicate)Oracle
- Oracle OCP 1Z0 053 Q600(RMAN BACKUP)Oracle
- Oracle OCP 1Z0 053 Q700(RMAN Duplicate)Oracle
- Oracle OCP 1Z0 053 Q703(Rman Backup)Oracle
- Oracle OCP 1Z0 053 Q399(block media recovery)OracleBloC
- Oracle OCP 1Z0 053 Q401(Block Media Recovery)OracleBloC
- Oracle OCP 1Z0 053 Q709(Recovery Redo log)Oracle
- Oracle OCP 1Z0 053 Q570( point-in-time recovery)Oracle
- Oracle OCP 1Z0 053 Q134(RMAN SBT PARALLELISM)OracleParallel
- Oracle OCP 1Z0 053 Q342(RMAN BACKUP DURATION)Oracle
- Oracle OCP 1Z0 053 Q62(RMAN&ASM)OracleASM
- Oracle OCP 1Z0-053 Q698(RMAN Recovery)Oracle
- Oracle OCP 1Z0 053 Q613(automatic management of backup and recovery)Oracle
- Oracle OCP 1Z0 053 Q79(RMAN Recover Image Copy)Oracle
- Oracle OCP 1Z0 053 Q197(RMAN Report)Oracle
- Oracle OCP 1Z0 053 Q338(RMAN Expired Backup)Oracle
- Oracle OCP 1Z0 053 Q688(RMAN Backup Compression)Oracle
- Oracle OCP 1Z0-053 Q360(RMAN Disaster Recovery)OracleAST
- Oracle OCP 1Z0 053 Q359(Point-in-time tablespace recovery)Oracle
- Oracle OCP 1Z0 053 Q652(RMAN Configure Rate)Oracle
- Oracle OCP 1Z0 053 Q662(rman change tracking file)Oracle
- Oracle OCP 1Z0 053 Q348(RMAN Minimize Load)Oracle
- Oracle OCP 1Z0 053 Q94(RMAN SET COMMAND ID)Oracle
- Oracle OCP 1Z0-053 Q566(Rman Recovery System Tablespace)Oracle
- Oracle OCP IZ0-053 Q241(RMAN Recovery Catalog Keep)Oracle
- Oracle OCP 1Z0 053 Q78(RMAN&change tracking file)Oracle
- Oracle OCP 1Z0 053 Q264(rman List&Report)Oracle
- Oracle OCP 1Z0 053 Q650Oracle
- Oracle OCP 1Z0 053 Q324Oracle
- Oracle OCP 1Z0 053 Q27Oracle
- Oracle OCP 1Z0 053 Q49Oracle