模拟故障 关闭备库

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

模拟插入数据,归档,并且删除归档

SQL> insert into  test  values(23);

1 row created.

SQL> alter system switch logfile;

System altered.

SQL>  insert into  test  values(24);

1 row created.

SQL> alter system switch logfile;

System altered.

SQL> show parameter recover

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /home/oracle/app/fast_recovery
_area
db_recovery_file_dest_size big integer 8196M
db_unrecoverable_scn_tracking boolean TRUE
recovery_parallelism integer 0
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost backup_stage]$ cd /home/oracle/app/fast_recovery_area
[oracle@localhost fast_recovery_area]$ cd NEWTEST/a
archivelog/ autobackup/
[oracle@localhost fast_recovery_area]$ cd NEWTEST/a
archivelog/ autobackup/
[oracle@localhost fast_recovery_area]$ cd NEWTEST/archivelog/2018_03_27
[oracle@localhost 2018_03_27]$ ls -lrt
total 146248
-rw-r-----. 1 oracle dba 44910592 Mar 27 08:13 o1_mf_1_101_fcm35o3w_.arc
-rw-r-----. 1 oracle dba 42871808 Mar 27 13:11 o1_mf_1_102_fcmnm6bn_.arc
-rw-r-----. 1 oracle dba 25376768 Mar 27 20:57 o1_mf_1_103_fcnhyc2c_.arc
-rw-r-----. 1 oracle dba 1024 Mar 27 20:57 o1_mf_1_1_fcnhycyt_.arc
-rw-r-----. 1 oracle dba 472576 Mar 27 20:57 o1_mf_1_2_fcnhyd03_.arc
-rw-r-----. 1 oracle dba 118272 Mar 27 20:57 o1_mf_1_3_fcnhyd4l_.arc
-rw-r-----. 1 oracle dba 116736 Mar 27 20:57 o1_mf_1_4_fcnhyd9o_.arc
-rw-r-----. 1 oracle dba 6144 Mar 27 20:57 o1_mf_1_5_fcnhypd2_.arc
-rw-r-----. 1 oracle dba 1798656 Mar 27 21:10 o1_mf_1_6_fcnjog83_.arc
-rw-r-----. 1 oracle dba 1024 Mar 27 21:10 o1_mf_1_7_fcnjoo5q_.arc
-rw-r-----. 1 oracle dba 54784 Mar 27 21:10 o1_mf_1_8_fcnjoqqs_.arc
-rw-r-----. 1 oracle dba 1536 Mar 27 21:10 o1_mf_1_9_fcnjorkv_.arc
-rw-r-----. 1 oracle dba 105984 Mar 27 21:12 o1_mf_1_10_fcnjsznt_.arc
-rw-r-----. 1 oracle dba 9216 Mar 27 21:12 o1_mf_1_11_fcnjthwc_.arc
-rw-r-----. 1 oracle dba 133120 Mar 27 21:38 o1_mf_1_14_fcnlbhd5_.arc
-rw-r-----. 1 oracle dba 78336 Mar 27 21:40 o1_mf_1_15_fcnlgnvp_.arc
-rw-r-----. 1 oracle dba 531968 Mar 27 21:55 o1_mf_1_16_fcnmbz4p_.arc
-rw-r-----. 1 oracle dba 27835392 Mar 27 22:02 o1_mf_1_17_fcnmrc6y_.arc
-rw-r-----. 1 oracle dba 112640 Mar 27 22:06 o1_mf_1_18_fcnmz623_.arc
-rw-r-----. 1 oracle dba 757248 Mar 27 22:20 o1_mf_1_19_fcnns2vs_.arc
-rw-r-----. 1 oracle dba 329728 Mar 27 22:30 o1_mf_1_20_fcnodzdb_.arc
-rw-r-----. 1 oracle dba 360960 Mar 27 22:40 o1_mf_1_21_fcnoywpj_.arc
-rw-r-----. 1 oracle dba 5632 Mar 27 22:40 o1_mf_1_22_fcnoz5x5_.arc
-rw-r-----. 1 oracle dba 102400 Mar 27 22:44 o1_mf_1_23_fcnp5mtb_.arc
-rw-r-----. 1 oracle dba 71680 Mar 27 22:46 o1_mf_1_24_fcnpb13v_.arc
-rw-r-----. 1 oracle dba 90112 Mar 27 22:47 o1_mf_1_25_fcnpd7jw_.arc
-rw-r-----. 1 oracle dba 93184 Mar 27 22:54 o1_mf_1_28_fcnpsn9b_.arc
-rw-r-----. 1 oracle dba 1633280 Mar 27 23:01 o1_mf_1_29_fcnq70m6_.arc
-rw-r-----. 1 oracle dba 633344 Mar 27 23:09 o1_mf_1_30_fcnqoxpg_.arc
-rw-r-----. 1 oracle dba 452608 Mar 27 23:23 o1_mf_1_31_fcnrh8c9_.arc
-rw-r-----. 1 oracle dba 364032 Mar 27 23:33 o1_mf_1_32_fcns23nn_.arc
-rw-r-----. 1 oracle dba 3584 Mar 27 23:33 o1_mf_1_33_fcns29qs_.arc
-rw-r-----. 1 oracle dba 107520 Mar 27 23:37 o1_mf_1_34_fcns93o6_.arc
-rw-r-----. 1 oracle dba 38400 Mar 27 23:38 o1_mf_1_35_fcnschxk_.arc
-rw-r-----. 1 oracle dba 5120 Mar 27 23:38 o1_mf_1_36_fcnscp74_.arc
-rw-r-----. 1 oracle dba 90624 Mar 27 23:41 o1_mf_1_37_fcnsk7ms_.arc
-rw-r-----. 1 oracle dba 5120 Mar 27 23:41 o1_mf_1_38_fcnskjb3_.arc
[oracle@localhost 2018_03_27]$ mv o1_mf_1_37_fcnsk7ms_.arc o1_mf_1_37_fcnsk7ms_.arc.bak
[oracle@localhost 2018_03_27]$ mv o1_mf_1_38_fcnskjb3_.arc o1_mf_1_38_fcnskjb3_.arc.bak

启动备库

SQL> startup mount
#dgmgrl发现归档日志有断档
[oracle@localhost 2018_03_27]$ dgmgrl /
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production Copyright (c) 2000, 2009, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> SHOW CONFIGURATION; Configuration - dg_newtest Protection Mode: MaxPerformance
Databases:
newtest - Primary database
Error: ORA-16724: cannot resolve gap for one or more standby databases snewtest - Physical standby database Fast-Start Failover: DISABLED Configuration Status:
ERROR

跳断档恢复备机 备库SCN号

SQL> col CURRENT_SCN format 9999999999999999
SQL> SELECT CURRENT_SCN FROM V$DATABASE; CURRENT_SCN
-----------------
4273430

主库SCN号

SQL> col CURRENT_SCN format 9999999999999999
SQL> SELECT CURRENT_SCN FROM V$DATABASE; CURRENT_SCN
-----------
4273865

主库指定备库的SCN做增量备份并传输到备库

RMAN> BACKUP INCREMENTAL FROM SCN 4273430 DATABASE FORMAT '/home/oracle/backup_stage/snewtest_%U' tag 'FOR_STANDBY';

[oracle@12cr2 ~]$ scp sdataguru_* 192.168.16.130:/home/oracle/sdataguru
#主库备份控制文件并传输到备库
SQL> alter database create standby controlfile as '/home/oracle/backup_stage/std_con.ctl'; [oracle@localhost backup_stage]$ scp -o GSSAPIAuthentication=no * 10.10.0.24:/home/oracle/backup_stage/
oracle@10.10.0.24's password:
snewtest_1gsusdtf_1_1 100% 496KB 496.0KB/s 00:00
snewtest_1hsuse04_1_1 100% 10MB 9.8MB/s 00:00
std_con.ctl

关闭备库,进行恢复

SQL> shutdown immediate

备库恢复控制文件

RMAN> startup nomount;

Oracle instance started

Total System Global Area     784998400 bytes

Fixed Size                     2257352 bytes
Variable Size 478154296 bytes
Database Buffers 301989888 bytes
Redo Buffers 2596864 bytes RMAN> restore standby controlfile from '/home/oracle/backup_stage/std_con.ctl'; Starting restore at 28-MAR-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK channel ORA_DISK_1: copied control file copy
output file name=/home/oracle/app/oradata/newtest/control01.ctl
output file name=/home/oracle/app/fast_recovery_area/newtest/control02.ctl
Finished restore at 28-MAR-18 RMAN> alter database mount; database mounted
released channel: ORA_DISK_1 RMAN> catalog start with '/home/oracle/backup_stage'; Starting implicit crosscheck backup at 28-MAR-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK
Crosschecked 4 objects
Finished implicit crosscheck backup at 28-MAR-18 Starting implicit crosscheck copy at 28-MAR-18
using channel ORA_DISK_1
Crosschecked 6 objects
Finished implicit crosscheck copy at 28-MAR-18 searching for all files in the recovery area
cataloging files...
cataloging done List of Cataloged Files
=======================
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/autobackup/2018_03_27/o1_mf_s_971902650_fcnhxtmr_.bkp
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/autobackup/2018_03_27/o1_mf_s_971903551_fcnkh8v3_.bkp
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/autobackup/2018_03_21/o1_mf_s_971393885_fc5009bc_.bkp
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/autobackup/2018_03_26/o1_mf_s_971821139_fcl0yj4q_.bkp
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/autobackup/2018_03_26/o1_mf_s_971825430_fcl55p0w_.bkp
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/autobackup/2018_03_26/o1_mf_s_971822377_fcl1k9x7_.bkp
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/autobackup/2018_03_26/o1_mf_s_971820494_fckzph51_.bkp
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/autobackup/2018_03_26/o1_mf_s_971823735_fcl2vr5m_.bkp
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_24/o1_mf_1_35_fcc5krsp_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_24/o1_mf_1_36_fccdmzb4_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_24/o1_mf_1_37_fcdlmkrv_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_8_fcnjwmw4_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_19_fcnoj5xm_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_102_fcmnos0y_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_7_fcnjwmwv_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_4_fcnj120w_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_15_fcnlkcdd_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_3_fcnht3tp_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_18_fcnn1wsg_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_15_fcnmvlr2_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_14_fcnlf60p_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_28_fcnrl4rk_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_18_fcnoj5wf_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_6_fcnjr490_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_36_fcnsgfnh_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_29_fcnrkzt0_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_25_fcnpgysj_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_15_fcnoj56w_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_30_fcnrkzrk_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_33_fcnsg65w_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_23_fcnpdqr8_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_10_fcnjwoy4_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_28_fcnpwcwd_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_28_fcnqb63q_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_32_fcnsg61y_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_2_fcnhm9vp_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_39_fcnss6wt_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_14_fcnmvlq0_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_1_fcnhm4kc_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_20_fcnohpm2_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_29_fcnq9r66_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_5_fcnj1d8y_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_24_fcnpdr76_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_16_fcnoj57l_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_9_fcnjwmxf_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_11_fcnjx70r_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_30_fcnqrny5_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_14_fcnoj563_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_35_fcnsg7h6_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_19_fcnnvt72_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_31_fcnrkzlw_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_17_fcnmv2qw_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_22_fcnpdqv5_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_34_fcnsg669_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_17_fcnoj5f7_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_11_fcnmvlqk_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_21_fcnpdqvj_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_101_fcm387cc_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_103_fcnhm9wo_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_27/o1_mf_1_16_fcnmvltj_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_21/o1_mf_1_25_fc5049cp_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_21/o1_mf_1_28_fc50bcnc_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_21/o1_mf_1_26_fc504c4n_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_21/o1_mf_1_27_fc509ryf_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_21/o1_mf_1_24_fc5046ps_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_87_fcl39mvt_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_85_fcl2o80h_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_75_fcl1znj6_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_53_fcl02kxc_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_90_fcl3ggcq_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_69_fcl1j76c_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_56_fcl0cvg0_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_91_fcl3gjmx_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_92_fcl3lztc_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_46_fckz6nb6_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_97_fcl4m19w_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_55_fcl0cvt2_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_66_fcl18ykz_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_43_fckhnqmx_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_65_fcl18g5j_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_44_fckz6751_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_88_fcl39nvo_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_59_fcl0dfp4_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_57_fcl0cw6l_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_52_fcl01590_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_74_fcl1znmr_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_78_fcl20q15_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_47_fckz6trg_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_82_fcl2jgl6_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_72_fcl1s610_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_60_fcl0gr2y_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_84_fcl2n93y_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_80_fcl2j93g_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_83_fcl2mpl2_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_94_fcl45p2y_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_89_fcl3gdz2_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_62_fcl14glr_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_71_fcl1s584_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_54_fcl0827q_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_76_fcl1znnf_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_64_fcl14ml6_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_67_fcl1goon_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_86_fcl39ld1_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_68_fcl1j35s_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_51_fckzqtb1_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_48_fckzdl53_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_42_fcjggj1m_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_81_fcl2jc39_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_50_fckzhkc4_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_45_fckz6hyr_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_63_fcl14mdc_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_96_fcl4m17m_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_61_fcl146xk_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_58_fcl0cw9h_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_95_fcl4g7vv_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_49_fckzdn7w_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_100_fcl4mo23_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_99_fcl4m2ry_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_70_fcl1s3sd_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_77_fcl1zsl7_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_93_fcl45nvo_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_79_fcl2j268_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_98_fcl4m1bo_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_26/o1_mf_1_73_fcl1vofd_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_23/o1_mf_1_33_fc9scbc4_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_23/o1_mf_1_31_fc82vmgr_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_23/o1_mf_1_34_fcb5nycb_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_23/o1_mf_1_32_fc8k3qby_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_25/o1_mf_1_40_fcglbs9g_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_25/o1_mf_1_38_fcfcrznd_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_25/o1_mf_1_41_fchf57tf_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_25/o1_mf_1_39_fcft05jc_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_22/o1_mf_1_29_fc6c0myp_.arc
File Name: /home/oracle/app/fast_recovery_area/SNEWTEST/archivelog/2018_03_22/o1_mf_1_30_fc7fs62y_.arc searching for all files that match the pattern /home/oracle/backup_stage List of Files Unknown to the Database
=====================================
File Name: /home/oracle/backup_stage/snewtest_1hsuse04_1_1
File Name: /home/oracle/backup_stage/std_con.ctl
File Name: /home/oracle/backup_stage/snewtest_1gsusdtf_1_1

DG broker会自动启动备机的日志同步,此时需要关闭日志同步

#备库上
SQL> RECOVER MANAGED STANDBY DATABASE CANCEL;
Media recovery complete.

继续恢复备库

#recover 数据库
[oracle@localhost backup_stage]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Wed Mar 28 00:03:15 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: NEWTEST (DBID=1783795369, not open) RMAN> recover database noredo; Starting recover at 28-MAR-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=30 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /home/oracle/app/oradata/newtest/system01.dbf
destination for restore of datafile 00002: /home/oracle/app/oradata/newtest/sysaux01.dbf
destination for restore of datafile 00003: /home/oracle/app/oradata/newtest/undotbs01.dbf
destination for restore of datafile 00004: /home/oracle/app/oradata/newtest/users01.dbf
destination for restore of datafile 00005: /home/oracle/app/oradata/newtest/users02.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/backup_stage/snewtest_1gsusdtf_1_1
channel ORA_DISK_1: piece handle=/home/oracle/backup_stage/snewtest_1gsusdtf_1_1 tag=FOR_STANDBY
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 Finished recover at 28-MAR-18

主库上DG broker enable备库

DGMGRL> enable database snewtest;
Enabled.
DGMGRL> show configuration; Configuration - dg_newtest Protection Mode: MaxPerformance
Databases:
newtest - Primary database
snewtest - Physical standby database Fast-Start Failover: DISABLED Configuration Status:
SUCCESS

打开备库,验证数据

SQL> alter database open;

Database altered.

SQL> select * from test;

		ID
----------
1
2
3
4
5
6
7
8
9
10
11 ID
----------
12
13
14
15
16
16
18
20
21
22
23 ID
----------
24 23 rows selected.

Oracle11gr2_ADG管理之跳归档恢复dg实战的更多相关文章

  1. Oracle DB 执行用户管理的备份和恢复

    • 说明用户管理的备份和恢复与服务器管理的备份和恢复 之间的差异 • 执行用户管理的数据库完全恢复 • 执行用户管理的数据库不完全恢复 备份和恢复的使用类型 数据库备份和恢复的类型包括: • 用户管理 ...

  2. Oracle11gr2_ADG管理之switchover补充

    之前演示的switchver总是提示下面的错误,并且需要人工干预: Oracle11gr2_ADG管理之switchover实战 DGMGRL> switchover to snewtest; ...

  3. 【OGG 故障处理】 丢失归档恢复

    OGG 有两天由于某种原因没有启动,而这段时间的备份文件缺失了一部分归档.恢复过程记录如下: GGSCI (xxxx) > info all Program Status Group Lag a ...

  4. DG:11.2.0.4 RAC在线duplicate恢复DG

    1.环境介绍 测试环境, 在一个双节点的RAC上使用duplicate搭建DG,使用在线的方式搭建 主机 IP 操作系统 实例 db_name db_unique_name db_version 配置 ...

  5. Oracle11gR2_ADG管理之恢复主库的truncate表实战

    备库开启flashback database #关闭备库的同步 SQL> alter database recover managed standby database cancel; Data ...

  6. 05 使用bbed跳过归档恢复数据文件

    5 使用BBED跳过归档 在归档模式下,缺失了一部分的归档日志文件,对数据文件进行恢复 1 开启归档 --shutdown immediate --startup mount --alter data ...

  7. Oracle11gr2_ADG管理之在备库上模拟failover的过程实战

    技术建议和方案. 要求failover后不重建备库,并能够把failover的数据库重新切换回备库 主库为newtest,备库为snewtest 备库上已经开启了闪回 得到一个参考的SCN SQL&g ...

  8. Oracle11gR2_ADG管理之resinstate实战

    主库上打开闪回 SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ YES 模拟断电 SQL> ...

  9. Oracle11gr2_ADG管理之switchover实战

    . 环境 db_primary db_stanby 备注 db版本 11.2.0.4.0 11.2.0.4.0 os版本 centos 6.4 centos 6.4 db_unique_name ne ...

随机推荐

  1. 【ccf2017-12-2】游戏(模拟)

    问题描述 有n个小朋友围成一圈玩游戏,小朋友从1至n编号,2号小朋友坐在1号小朋友的顺时针方向,3号小朋友坐在2号小朋友的顺时针方向,……,1号小朋友坐在n号小朋友的顺时针方向. 游戏开始,从1号小朋 ...

  2. CUDA Samples:Vector Add

    以下CUDA sample是分别用C++和CUDA实现的两向量相加操作,参考CUDA 8.0中的sample:C:\ProgramData\NVIDIA Corporation\CUDA Sample ...

  3. C++使用初始化列表的方式来初始化字段

    几个月之前,接触Android recovery源代码的时候,看ScreenRecoveryUI类的时候,那时候C++基础还不是特别好,一直不明白以下的初始化方式: 下面这个是Recovery的一个构 ...

  4. As3 Practises : use TheMiner do as3 project swf performance profile , find memory leak!

    The second and most universal way is to launch it from the mm.cfg fileTheMiner.swf must be trusted1: ...

  5. 首次尝试LINUX下的ssh命令:登录和退出

    1:我现在本机安装了centos虚拟机,然后在windows桌面下使用SecureCRT ssh客户端登录我的本地虚拟机,再然后 通过centos下的ssh命令登录局域网内测试机192.168.0.1 ...

  6. 没有绝对的cc.ResolutionPolicy.FIXED_WIDTH或cc.ResolutionPolicy.FIXED_HEIGHT

    以做cocos手游的经验来说,为了保证游戏在各种尺寸屏幕完美展现,没有黑边,没有非等比缩放,所以基本上适配机制都是都是cc.ResolutionPolicy.FIXED_WIDTH或cc.Resolu ...

  7. 【前端】JavaScript入门学习

    <button type="button" onclick="alert('hillo!')">Here</button> <sc ...

  8. HiHoCoder1156 彩色的树(树值的记忆化ORZ+map强势出场)

    1156 : 彩色的树 时间限制:2000ms 单点时限:1000ms 内存限制:256MB 描述 给定一棵n个节点的树,节点编号为1, 2, …, n.树中有n - 1条边,任意两个节点间恰好有一条 ...

  9. Window Handle介绍

    HANDLE(句柄)是Windows操作系统中的一个概念.在Windows程序中,有各种各样的资源(窗口.图标.光标等),系统在创建这些资源时会为它们分配内存,并返回标示这些资源的标示号,即句柄.句柄 ...

  10. strftime()和strptime的区别

    strftime()是把时间转成规定格式的字符串 strptime()是把字符串转成时间 转载:http://blog.csdn.net/caimouse/article/details/501986 ...