文档课题:运用增量备份恢复oracle adg gap—主库rac,备库文件系统.
环境介绍:主库为两节点rac + 11.2.0.4,备库为单实例物理dg + 11.2.0.4 + 文件系统.
操作系统:主备均为rhel 7.9
1、异常模拟
1.1、删新增归档文件
--shutdown备库.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
--主库当前归档日志情况.
ASMCMD> ls
thread_1_seq_87.262.1132751133
thread_1_seq_88.263.1132751139
thread_1_seq_89.266.1132751191
thread_1_seq_90.274.1132756789
thread_1_seq_91.275.1132756815
thread_1_seq_92.278.1132756843
thread_1_seq_93.279.1132756943
thread_2_seq_1.261.1132751133
thread_2_seq_2.264.1132751143
thread_2_seq_3.265.1132751189
thread_2_seq_4.273.1132756789
thread_2_seq_5.276.1132756815
thread_2_seq_6.277.1132756843
thread_2_seq_7.280.1132756945
--主库产生归档日志.
--节点1操作.
SQL> create table test as select * from all_objects;
Table created.
SQL> insert into test select * from test;
84423 rows created.
SQL> r
1* insert into test select * from test
168846 rows created.
SQL> r
1* insert into test select * from test
337692 rows created.
SQL> r
1* insert into test select * from test
675384 rows created.
SQL> r
1* insert into test select * from test
1350768 rows created.
SQL> commit;
Commit complete.
--节点2操作.
SQL> insert into test select * from test;
84423 rows created.
SQL> commit;
Commit complete.
SQL> select count(*) from test;
COUNT(*)
----------
2785959
--目前归档文件情况.
ASMCMD> ls
thread_1_seq_100.288.1132760369
thread_1_seq_101.290.1132760377
thread_1_seq_87.262.1132751133
thread_1_seq_88.263.1132751139
thread_1_seq_89.266.1132751191
thread_1_seq_90.274.1132756789
thread_1_seq_91.275.1132756815
thread_1_seq_92.278.1132756843
thread_1_seq_93.279.1132756943
thread_1_seq_94.281.1132760335
thread_1_seq_95.282.1132760351
thread_1_seq_96.283.1132760357
thread_1_seq_97.285.1132760361
thread_1_seq_98.286.1132760363
thread_1_seq_99.287.1132760367
thread_2_seq_1.261.1132751133
thread_2_seq_2.264.1132751143
thread_2_seq_3.265.1132751189
thread_2_seq_4.273.1132756789
thread_2_seq_5.276.1132756815
thread_2_seq_6.277.1132756843
thread_2_seq_7.280.1132756945
thread_2_seq_8.284.1132760359
thread_2_seq_9.289.1132760371
说明:红颜色标出为新增归档日志文件.
--现在删除部分新增归档日志文件.
ASMCMD> rm -rf thread_1_seq_94.281.1132760335
ASMCMD> rm -rf thread_1_seq_95.282.1132760351
ASMCMD> rm -rf thread_1_seq_96.283.1132760357
ASMCMD> rm -rf thread_1_seq_97.285.1132760361
ASMCMD> rm -rf thread_1_seq_98.286.1132760363
ASMCMD> rm -rf thread_1_seq_99.287.1132760367
ASMCMD> rm -rf thread_2_seq_8.284.1132760359
说明:以上归档日志文件未被备库应用.
1.2、新增数据文件
--主库节点1添加12个数据文件.
SQL> select name from v$datafile;
NAME
----------------------------------------------------------
+DATA/orcl/datafile/system.259.1132745549
+DATA/orcl/datafile/sysaux.260.1132745551
+DATA/orcl/datafile/undotbs1.261.1132745553
+DATA/orcl/datafile/undotbs2.263.1132745567
+DATA/orcl/datafile/users.264.1132745567
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> alter tablespace users add datafile '+DATA' size 50m autoextend on;
Tablespace altered.
SQL> col name for a60
SQL> set pagesize 200
SQL> r
1* select name from v$datafile
NAME
------------------------------------------------------------
+DATA/orcl/datafile/system.259.1132745549
+DATA/orcl/datafile/sysaux.260.1132745551
+DATA/orcl/datafile/undotbs1.261.1132745553
+DATA/orcl/datafile/undotbs2.263.1132745567
+DATA/orcl/datafile/users.264.1132745567
+DATA/orcl/datafile/users.274.1132761569
+DATA/orcl/datafile/users.275.1132761599
+DATA/orcl/datafile/users.276.1132761599
+DATA/orcl/datafile/users.277.1132761601
+DATA/orcl/datafile/users.278.1132761603
+DATA/orcl/datafile/users.279.1132761603
+DATA/orcl/datafile/users.280.1132761605
+DATA/orcl/datafile/users.281.1132761607
+DATA/orcl/datafile/users.282.1132761607
+DATA/orcl/datafile/users.283.1132761609
+DATA/orcl/datafile/users.284.1132761609
+DATA/orcl/datafile/users.285.1132761611
17 rows selected.
说明:到此成功模拟出生产环境存在的故障.
2、备库恢复
--现对备库进行恢复,当前备库数据文件信息如下.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/system.259.1132745549
/u01/app/oracle/oradata/sysaux.260.1132745551
/u01/app/oracle/oradata/undotbs1.261.1132745553
/u01/app/oracle/oradata/undotbs2.263.1132745567
/u01/app/oracle/oradata/users.264.1132745567
2.1、停止MRP
--备库停止mrp进程.
SQL> alter database recover managed standby database cancel;
Database altered.
2.2、确认最小SCN
--备库端确认最小scn,以便在主库端进行备份.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
925274
SQL> select min(checkpoint_change#) from v$datafile_header;
MIN(CHECKPOINT_CHANGE#)
-----------------------
925275
说明:In ideal situation the above 2 queries will return the almost same SCN. However if there is huge difference its better to take backup using the SCN from second query (lesser SCN), as one of the datafile may be behind.
2.3、确认新增数据文件
--根据备库查得的最小scn确认主库的新增数据文件.
SQL> select file#,name from v$datafile where creation_change#>925274;
FILE# NAME
---------- ------------------------------------------------------------
6 +DATA/orcl/datafile/users.274.1132761569
7 +DATA/orcl/datafile/users.275.1132761599
8 +DATA/orcl/datafile/users.276.1132761599
9 +DATA/orcl/datafile/users.277.1132761601
10 +DATA/orcl/datafile/users.278.1132761603
11 +DATA/orcl/datafile/users.279.1132761603
12 +DATA/orcl/datafile/users.280.1132761605
13 +DATA/orcl/datafile/users.281.1132761607
14 +DATA/orcl/datafile/users.282.1132761607
15 +DATA/orcl/datafile/users.283.1132761609
16 +DATA/orcl/datafile/users.284.1132761609
17 +DATA/orcl/datafile/users.285.1132761611
12 rows selected.
2.4、备份数据文件和增量备份
--主库备份新增的数据文件.
RMAN> backup datafile 6,7,8,9,10,11,12,13,14,15,16,17 format '/tmp/ForStandby_%U' tag 'FORSTANDBY';
Starting backup at 29-MAR-23
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 instance=orcl1 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=+DATA/orcl/datafile/users.274.1132761569
input datafile file number=00007 name=+DATA/orcl/datafile/users.275.1132761599
input datafile file number=00008 name=+DATA/orcl/datafile/users.276.1132761599
input datafile file number=00009 name=+DATA/orcl/datafile/users.277.1132761601
input datafile file number=00010 name=+DATA/orcl/datafile/users.278.1132761603
input datafile file number=00011 name=+DATA/orcl/datafile/users.279.1132761603
input datafile file number=00012 name=+DATA/orcl/datafile/users.280.1132761605
input datafile file number=00013 name=+DATA/orcl/datafile/users.281.1132761607
input datafile file number=00014 name=+DATA/orcl/datafile/users.282.1132761607
input datafile file number=00015 name=+DATA/orcl/datafile/users.283.1132761609
input datafile file number=00016 name=+DATA/orcl/datafile/users.284.1132761609
input datafile file number=00017 name=+DATA/orcl/datafile/users.285.1132761611
channel ORA_DISK_1: starting piece 1 at 29-MAR-23
channel ORA_DISK_1: finished piece 1 at 29-MAR-23
piece handle=/tmp/ForStandby_071o957m_1_1 tag=FORSTANDBY comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 29-MAR-23
--主库根据最小scn进行增量备份.
RMAN> backup incremental from SCN 925274 database format '/tmp/ForStandby_%U' tag 'FORSTANDBY';
Starting backup at 29-MAR-23
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/orcl/datafile/system.259.1132745549
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.261.1132745553
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.260.1132745551
input datafile file number=00004 name=+DATA/orcl/datafile/undotbs2.263.1132745567
input datafile file number=00006 name=+DATA/orcl/datafile/users.274.1132761569
input datafile file number=00007 name=+DATA/orcl/datafile/users.275.1132761599
input datafile file number=00008 name=+DATA/orcl/datafile/users.276.1132761599
input datafile file number=00009 name=+DATA/orcl/datafile/users.277.1132761601
input datafile file number=00010 name=+DATA/orcl/datafile/users.278.1132761603
input datafile file number=00011 name=+DATA/orcl/datafile/users.279.1132761603
input datafile file number=00012 name=+DATA/orcl/datafile/users.280.1132761605
input datafile file number=00013 name=+DATA/orcl/datafile/users.281.1132761607
input datafile file number=00014 name=+DATA/orcl/datafile/users.282.1132761607
input datafile file number=00015 name=+DATA/orcl/datafile/users.283.1132761609
input datafile file number=00016 name=+DATA/orcl/datafile/users.284.1132761609
input datafile file number=00017 name=+DATA/orcl/datafile/users.285.1132761611
input datafile file number=00005 name=+DATA/orcl/datafile/users.264.1132745567
channel ORA_DISK_1: starting piece 1 at 29-MAR-23
channel ORA_DISK_1: finished piece 1 at 29-MAR-23
piece handle=/tmp/ForStandby_081o9581_1_1 tag=FORSTANDBY comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 29-MAR-23
channel ORA_DISK_1: finished piece 1 at 29-MAR-23
piece handle=/tmp/ForStandby_091o9588_1_1 tag=FORSTANDBY comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 29-MAR-23
--备份控制文件.
RMAN> backup current controlfile for standby format '/tmp/ForStandbyCTRL.bck';
Starting backup at 29-MAR-23
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including standby control file in backup set
channel ORA_DISK_1: starting piece 1 at 29-MAR-23
channel ORA_DISK_1: finished piece 1 at 29-MAR-23
piece handle=/tmp/ForStandbyCTRL.bck tag=TAG20230329T161300 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 29-MAR-23
2.5、传送备份文件
--将主库备份的文件传送到备库.
[oracle@hisdb1 tmp]$ ll ForStandby*
-rw-r----- 1 oracle asmadmin 12713984 Mar 29 16:12 ForStandby_071o957m_1_1
-rw-r----- 1 oracle asmadmin 355901440 Mar 29 16:12 ForStandby_081o9581_1_1
-rw-r----- 1 oracle asmadmin 18841600 Mar 29 16:12 ForStandby_091o9588_1_1
-rw-r----- 1 oracle asmadmin 18841600 Mar 29 16:13 ForStandbyCTRL.bck
[oracle@hisdb1 tmp]$ scp /tmp/ForStandby* oracle@192.168.133.215:/tmp
oracle@192.168.133.215's password:
ForStandby_071o957m_1_1 100% 12MB 68.0MB/s 00:00
ForStandby_081o9581_1_1 100% 339MB 70.4MB/s 00:04
ForStandby_091o9588_1_1 100% 18MB 66.0MB/s 00:00
ForStandbyCTRL.bck 100% 18MB 68.8MB/s 00:00
2.6、备库恢复
2.6.1、恢复控制文件
[oracle@hisdbdg ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Mar 29 16:16:26 2023
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1660526279)
RMAN> shutdown immediate;
using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 2455228416 bytes
Fixed Size 2255712 bytes
Variable Size 620758176 bytes
Database Buffers 1811939328 bytes
Redo Buffers 20275200 bytes
RMAN> restore standby controlfile from '/tmp/ForStandbyCTRL.bck';
Starting restore at 29-MAR-23
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/control01.ctl
Finished restore at 29-MAR-23
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
2.7、注册备份集
RMAN> CATALOG START WITH '/tmp/ForStandby';
Starting implicit crosscheck backup at 29-MAR-23
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=196 device type=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 29-MAR-23
Starting implicit crosscheck copy at 29-MAR-23
using channel ORA_DISK_1
Crosschecked 2 objects
Finished implicit crosscheck copy at 29-MAR-23
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_1_90_l27qcbn9_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_2_6_l27qcc9z_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_2_4_l27qccrq_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_1_92_l27qccvx_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_2_5_l27qdb0w_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_1_91_l27qdg04_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_1_93_l27qgh75_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_2_7_l27qgkby_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_2_9_l27w76vt_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_1_100_l27w76wx_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_1_101_l27w76x8_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_1_102_l27w77v2_.arc
File Name: /u01/app/oracle/fast_recovery_area/ORCLDG/archivelog/2023_03_29/o1_mf_2_10_l27w79bj_.arc
searching for all files that match the pattern /tmp/ForStandby
List of Files Unknown to the Database
=====================================
File Name: /tmp/ForStandby_081o9581_1_1
File Name: /tmp/ForStandby_091o9588_1_1
File Name: /tmp/ForStandbyCTRL.bck
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /tmp/ForStandby_081o9581_1_1
File Name: /tmp/ForStandby_091o9588_1_1
File Name: /tmp/ForStandbyCTRL.bck
2.8、恢复丢失的数据文件
--备库恢复主库新增的数据文件.
RMAN> run
2> {
3> set newname for datafile 6 to '/u01/app/oracle/oradata/users.274.1132761569';
4> set newname for datafile 7 to '/u01/app/oracle/oradata/users.275.1132761599';
5> set newname for datafile 8 to '/u01/app/oracle/oradata/users.276.1132761599';
6> set newname for datafile 9 to '/u01/app/oracle/oradata/users.277.1132761601';
7> set newname for datafile 10 to '/u01/app/oracle/oradata/users.278.1132761603';
8> set newname for datafile 11 to '/u01/app/oracle/oradata/users.279.1132761603';
9> set newname for datafile 12 to '/u01/app/oracle/oradata/users.280.1132761605';
10> set newname for datafile 13 to '/u01/app/oracle/oradata/users.281.1132761607';
11> set newname for datafile 14 to '/u01/app/oracle/oradata/users.282.1132761607';
12> set newname for datafile 15 to '/u01/app/oracle/oradata/users.283.1132761609';
13> set newname for datafile 16 to '/u01/app/oracle/oradata/users.284.1132761609';
14> set newname for datafile 17 to '/u01/app/oracle/oradata/users.285.1132761611';
15> restore datafile 6,7,8,9,10,11,12,13,14,15,16,17;
16> switch datafile all;
17> }
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 29-MAR-23
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 00006 to /u01/app/oracle/oradata/users.274.1132761569
channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/users.275.1132761599
channel ORA_DISK_1: restoring datafile 00008 to /u01/app/oracle/oradata/users.276.1132761599
channel ORA_DISK_1: restoring datafile 00009 to /u01/app/oracle/oradata/users.277.1132761601
channel ORA_DISK_1: restoring datafile 00010 to /u01/app/oracle/oradata/users.278.1132761603
channel ORA_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/users.279.1132761603
channel ORA_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/users.280.1132761605
channel ORA_DISK_1: restoring datafile 00013 to /u01/app/oracle/oradata/users.281.1132761607
channel ORA_DISK_1: restoring datafile 00014 to /u01/app/oracle/oradata/users.282.1132761607
channel ORA_DISK_1: restoring datafile 00015 to /u01/app/oracle/oradata/users.283.1132761609
channel ORA_DISK_1: restoring datafile 00016 to /u01/app/oracle/oradata/users.284.1132761609
channel ORA_DISK_1: restoring datafile 00017 to /u01/app/oracle/oradata/users.285.1132761611
channel ORA_DISK_1: reading from backup piece /tmp/ForStandby_081o9581_1_1
channel ORA_DISK_1: piece handle=/tmp/ForStandby_081o9581_1_1 tag=FORSTANDBY
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 29-MAR-23
datafile 6 switched to datafile copy
input datafile copy RECID=2 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.274.1132761569
datafile 7 switched to datafile copy
input datafile copy RECID=3 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.275.1132761599
datafile 8 switched to datafile copy
input datafile copy RECID=4 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.276.1132761599
datafile 9 switched to datafile copy
input datafile copy RECID=5 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.277.1132761601
datafile 10 switched to datafile copy
input datafile copy RECID=6 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.278.1132761603
datafile 11 switched to datafile copy
input datafile copy RECID=7 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.279.1132761603
datafile 12 switched to datafile copy
input datafile copy RECID=8 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.280.1132761605
datafile 13 switched to datafile copy
input datafile copy RECID=9 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.281.1132761607
datafile 14 switched to datafile copy
input datafile copy RECID=10 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.282.1132761607
datafile 15 switched to datafile copy
input datafile copy RECID=11 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.283.1132761609
datafile 16 switched to datafile copy
input datafile copy RECID=12 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.284.1132761609
datafile 17 switched to datafile copy
input datafile copy RECID=13 STAMP=1132763283 file name=/u01/app/oracle/oradata/users.285.1132761611
2.9、恢复增量数据
--运用新注册的增量备份恢复备库的数据.
RMAN> recover database noredo;
Starting recover at 29-MAR-23
using channel ORA_DISK_1
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: /u01/app/oracle/oradata/system.259.1132745549
destination for restore of datafile 00002: /u01/app/oracle/oradata/sysaux.260.1132745551
destination for restore of datafile 00003: /u01/app/oracle/oradata/undotbs1.261.1132745553
destination for restore of datafile 00004: /u01/app/oracle/oradata/undotbs2.263.1132745567
destination for restore of datafile 00005: /u01/app/oracle/oradata/users.264.1132745567
channel ORA_DISK_1: reading from backup piece /tmp/ForStandby_081o9581_1_1
channel ORA_DISK_1: piece handle=/tmp/ForStandby_081o9581_1_1 tag=FORSTANDBY
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished recover at 29-MAR-23
2.10、重新开启mrp进程
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED
SQL> alter database open;
Database altered.
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
SQL> select count(*) from test;
COUNT(*)
----------
2785959
说明:主备中测试表test记录数恢复一致.