我是靠谱客的博主 斯文斑马,最近开发中收集的这篇文章主要介绍备份恢复2,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

2.Given the following RMAN commands, choose the option that reflects the order required to restore your

currently operational ARCHIVELOG-mode database.

A. restore database;

B. recover database;

C. shutdown immediate

D. startup

E. restore archivelog all;

F. alter database open

G. a, b, c, d, e, f

H. c, b, a, d, e, f

I. c, b, a, d, f

J. c, a, b, d

K. c, a, e, b, d, f

Answer: E

解释:e,f  不能组合,a,d不能组合

实验:

验证E

RMAN> shutdown immediate

database closed
database dismounted
Oracle instance shut down

RMAN> restore database;

Starting restore at 07-NOV-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/07/2012 02:56:03
RMAN-12010: automatic channel allocation initialization failed
RMAN-06171: not connected to target database

RMAN> startup nomount

connected to target database (not started)
Oracle instance started

Total System Global Area     417546240 bytes

Fixed Size                     2228944 bytes
Variable Size                318770480 bytes
Database Buffers              88080384 bytes
Redo Buffers                   8466432 bytes

RMAN> restore database;

Starting restore at 07-NOV-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/07/2012 02:57:03
ORA-01507: database not mounted

RMAN> startup mount;

database is already started
database mounted
released channel: ORA_DISK_1

RMAN> restore database;

Starting restore at 07-NOV-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK

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 00001 to /home/gyh/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/gyh/oracle/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/gyh/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/gyh/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /home/gyh/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /home/gyh/oracle/oradata/orcl/sde.dbf
channel ORA_DISK_1: restoring datafile 00007 to /home/gyh/oracle/oradata/orcl/arc.dbf
channel ORA_DISK_1: reading from backup piece /home/gyh/oracle/fast_recovery_area/ORCL/backupset/2012_11_07/o1_mf_nnndf_TAG20121107T014751_89ncl7ol_.bkp
channel ORA_DISK_1: piece handle=/home/gyh/oracle/fast_recovery_area/ORCL/backupset/2012_11_07/o1_mf_nnndf_TAG20121107T014751_89ncl7ol_.bkp tag=TAG20121107T014751
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:37
Finished restore at 07-NOV-12

RMAN> restore archivelog all;

Starting restore at 07-NOV-12
using channel ORA_DISK_1

archived log for thread 1 with sequence 3 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_3_89ndmt66_.arc
archived log for thread 1 with sequence 4 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_4_89ndmt0g_.arc
archived log for thread 1 with sequence 5 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_5_89ndmt37_.arc
archived log for thread 1 with sequence 1 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_1_89ndq6rs_.arc
archived log for thread 1 with sequence 2 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_2_89ngprkr_.arc
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/07/2012 03:01:16
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2 and starting SCN of 2370584 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1 and starting SCN of 2367049 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 14 and starting SCN of 2338912 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 13 and starting SCN of 2316550 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 12 and starting SCN of 2316547 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 10 and starting SCN of 2316541 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 9 and starting SCN of 2315616 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 8 and starting SCN of 2315430 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 7 and starting SCN of 2308062 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 6 and starting SCN of 2302232 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5 and starting SCN of 2278212 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 4 and starting SCN of 2255853 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 3 and starting SCN of 2224897 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2 and starting SCN of 2193526 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1 and starting SCN of 2179184 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 1 and starting SCN of 2178837 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 64 and starting SCN of 2176559 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 63 and starting SCN of 2168674 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 62 and starting SCN of 2154249 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 61 and starting SCN of 2140886 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 60 and starting SCN of 2113761 found to restore

RMAN> recover database;

Starting recover at 07-NOV-12
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 4 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_4_89ndmt0g_.arc
archived log for thread 1 with sequence 5 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_5_89ndmt37_.arc
archived log for thread 1 with sequence 1 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_1_89ndq6rs_.arc
archived log for thread 1 with sequence 2 is already on disk as file /home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_2_89ngprkr_.arc
archived log file name=/home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_4_89ndmt0g_.arc thread=1 sequence=4
archived log file name=/home/gyh/oracle/fast_recovery_area/ORCL/archivelog/2012_11_07/o1_mf_1_5_89ndmt37_.arc thread=1 sequence=5
media recovery complete, elapsed time: 00:00:10
Finished recover at 07-NOV-12

RMAN> startup

database is already started
database opened

RMAN> alter database open;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 11/07/2012 03:03:26
ORA-01531: a database already open by the instance

验证D

RMAN> restore database;

Starting restore at 07-NOV-12
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 00001 to /home/gyh/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/gyh/oracle/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/gyh/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/gyh/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /home/gyh/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /home/gyh/oracle/oradata/orcl/sde.dbf
channel ORA_DISK_1: restoring datafile 00007 to /home/gyh/oracle/oradata/orcl/arc.dbf
channel ORA_DISK_1: reading from backup piece /home/gyh/oracle/fast_recovery_area/ORCL/backupset/2012_11_07/o1_mf_nnndf_TAG20121107T014751_89ncl7ol_.bkp
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/07/2012 03:04:14
ORA-19870: error while restoring backup piece /home/gyh/oracle/fast_recovery_area/ORCL/backupset/2012_11_07/o1_mf_nnndf_TAG20121107T014751_89ncl7ol_.bkp
ORA-19573: cannot obtain exclusive enqueue for datafile 1

RMAN> shutdown immediate

database closed
database dismounted
Oracle instance shut down

RMAN> startup mount;

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     417546240 bytes

Fixed Size                     2228944 bytes
Variable Size                318770480 bytes
Database Buffers              88080384 bytes
Redo Buffers                   8466432 bytes

 

RMAN> restore database;

Starting restore at 07-NOV-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK

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 00001 to /home/gyh/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/gyh/oracle/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/gyh/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/gyh/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /home/gyh/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /home/gyh/oracle/oradata/orcl/sde.dbf
channel ORA_DISK_1: restoring datafile 00007 to /home/gyh/oracle/oradata/orcl/arc.dbf
channel ORA_DISK_1: reading from backup piece /home/gyh/oracle/fast_recovery_area/ORCL/backupset/2012_11_07/o1_mf_nnndf_TAG20121107T014751_89ncl7ol_.bkp
channel ORA_DISK_1: piece handle=/home/gyh/oracle/fast_recovery_area/ORCL/backupset/2012_11_07/o1_mf_nnndf_TAG20121107T014751_89ncl7ol_.bkp tag=TAG20121107T014751
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:26
Finished restore at 07-NOV-12

RMAN> startup

database is already started
database opened


 

 


 

最后

以上就是斯文斑马为你收集整理的备份恢复2的全部内容,希望文章能够帮你解决备份恢复2所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部