Monday, 15 March 2021

Dataguard : Recover of physical standby database using primary full rman backup

 Dataguard : Recover of physical standby database from scratch using  primary database  full rman backup

  • Take rman full backup.
  • SCP  rman backup to physical standby Dataguard.
  • Restore standby control file from backup
  • Restore and recover database using rman backup

Rman Backup Script:

run

{

allocate channel c1 device type disk format '/u01/backup/Backup_%d_DB_%u_%s_%p_%T';

allocate channel c2 device type disk format '/u01/backup/Backup_%d_DB_%u_%s_%p_%T';

crosscheck backup;

crosscheck archivelog all;

report obsolete;

delete noprompt obsolete;

sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';

BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 0 tag='FULL_BACKUP_WEEKLY' DATABASE INCLUDE CURRENT CONTROLFILE FILESPERSET 1;

BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL;

delete noprompt archivelog all backed up 1 times to disk;

copy current controlfile to '/u01/backup/control_%d_%T_%U.ctl';

backup current controlfile for standby format '/u01/backup/standbycontrol_%d_%T_%U.ctl';

release channel c1;

release channel c2;

}


  • Start physical database in nomount stage either pfile or spfile optional.

[oracle@srv5 backup]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Mon Mar 15 13:20:26 2021


Copyright (c) 1982, 2014, Oracle.  All rights reserved.



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options




SQL> startup nomount pfile='/u01/app/oracle/product/12.1.0.2/db_1/dbs/initzabbixdr2.ora';

ORACLE instance started.


Total System Global Area 1509949440 bytes

Fixed Size                  2924640 bytes

Variable Size            1207963552 bytes

Database Buffers          285212672 bytes

Redo Buffers               13848576 bytes

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


  • Restore standby controlfile using rman backup


[oracle@srv5 backup]$ rman target /


Recovery Manager: Release 12.1.0.2.0 - Production on Mon Mar 15 13:21:45 2021


Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.


connected to target database: ZABBIX (not mounted)


RMAN> restore standby controlfile from '/u01/backup/standbycontrol_ZABBIX_20210315_38vpq6fk_1_1.ctl';


Starting restore at 15-MAR-21

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=23 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/zabbixdr2/control01.ctl

output file name=/u01/app/oracle/fast_recovery_area/zabbixdr2/control02.ctl

Finished restore at 15-MAR-21

  • Open standby database in mount state

RMAN> sql 'alter database mount standby database';


sql statement: alter database mount standby database

released channel: ORA_DISK_1

  • Catalog rman backup location 

RMAN> catalog start with '/u01/backup/';


Starting implicit crosscheck backup at 15-MAR-21

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=38 device type=DISK

Crosschecked 46 objects

Finished implicit crosscheck backup at 15-MAR-21


Starting implicit crosscheck copy at 15-MAR-21

using channel ORA_DISK_1

Crosschecked 6 objects

Finished implicit crosscheck copy at 15-MAR-21


searching for all files in the recovery area

cataloging files...

cataloging done


List of Cataloged Files

=======================

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1082_j4ksh5db_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1086_j4kxvkk7_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1077_j4kl56z7_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1078_j4klg88t_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1079_j4kn6frr_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1069_j4kfwk66_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1072_j4kfwk1c_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1076_j4kjf08g_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1066_j4kfwk4c_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1080_j4koypoh_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1084_j4kwznpx_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1074_j4kjdv65_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1067_j4kfwjxw_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1068_j4kfwk60_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1083_j4kv7g7v_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1075_j4kjdwtj_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1089_j4l346yk_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1073_j4khnpxh_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1065_j4kfwk74_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1081_j4kqpw22_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1071_j4kfwk85_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1085_j4kx517k_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1070_j4kfwk78_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1087_j4kzmo4n_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_10/o1_mf_1_1088_j4l1cyb5_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1116_j4mllx0c_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1133_j4mzcf92_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1119_j4mqvnol_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1132_j4mzcfbs_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1118_j4mp3ddc_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1100_j4lpgx1b_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1092_j4l8dxgh_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1091_j4l6no22_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1095_j4lfonj3_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_5_j4n22226_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1124_j4myt1b3_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1106_j4m10dwz_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1111_j4m9soyd_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1105_j4lz84js_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1097_j4lk65z1_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1093_j4lb56fw_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1110_j4m81dz1_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1121_j4mvd4fj_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1108_j4m4jw86_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1109_j4m694j3_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1123_j4myt1fq_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1135_j4mzg2dv_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1104_j4lxhwq0_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1136_j4mzg4mz_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1102_j4lszgry_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1125_j4mz7kr1_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1107_j4m2rp9s_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1134_j4mzfrpf_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1090_j4l4wdc8_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1098_j4llyd0m_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_2_j4n09855_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1115_j4mjto0s_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1103_j4lvqn7m_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1113_j4mfb6ho_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1128_j4mz8bq9_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1122_j4mx4gob_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1126_j4mz8000_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1120_j4msmxtp_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1112_j4mckxs7_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1_j4n094j5_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_3_j4n09gv3_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1127_j4mz87lp_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1114_j4mh2dnw_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1094_j4lcxghz_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1131_j4mz92qp_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_4_j4n09srf_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1101_j4lr76hp_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1099_j4lnpnmh_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1129_j4mz8ppk_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1096_j4lhfwmh_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1117_j4mnc5yt_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/archivelog/2021_03_11/o1_mf_1_1130_j4mz900b_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1141_j4n0ztx6_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1128_j4n08w4x_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1137_j4n08yjv_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1140_j4n0zqdd_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1129_j4n08wbk_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1146_j4n1qdvf_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1145_j4n1qd0c_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1143_j4n19j2h_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1144_j4n19m5t_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1147_j4n1qkn8_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1132_j4n08wfp_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1133_j4n08whb_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1136_j4n08ygf_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1138_j4n08ygv_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1134_j4n08wjj_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1135_j4n08wl1_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1127_j4n08w4q_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1139_j4n0zpft_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1126_j4n08wfz_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1130_j4n08wd4_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1148_j4n1qks0_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1131_j4n08wdo_.arc

File Name: /u01/app/oracle/fast_recovery_area/ZABBIXDR2/foreign_archivelog/zabbix/2021_03_11/o1_mf_1_1142_j4n19695_.arc


searching for all files that match the pattern /u01/backup/


List of Files Unknown to the Database

=====================================

File Name: /u01/backup/1evpabqv_1_1

File Name: /u01/backup/ZABBIX_0rvp8cid_1_1.bckp

File Name: /u01/backup/ZABBIX_0qvp8cht_1_1.bckp

File Name: /u01/backup/1hvpabru_1_1

File Name: /u01/backup/1cvpabq8_1_1

File Name: /u01/backup/ZABBIX_0ivp8ce4_1_1.bckp

File Name: /u01/backup/ZABBIX_0ovp8cgv_1_1.bckp

File Name: /u01/backup/14vpabmt_1_1

File Name: /u01/backup/ZABBIX_0kvp8cf2_1_1.bckp

File Name: /u01/backup/17vpabns_1_1

File Name: /u01/backup/ZABBIX_0mvp8cg1_1_1.bckp

File Name: /u01/backup/standbycontrol_ZABBIX_20210315_38vpq6fk_1_1.ctl

File Name: /u01/backup/ZABBIX_0hvp8cdl_1_1.bckp

File Name: /u01/backup/ZABBIX_0gvp8cd6_1_1.bckp

File Name: /u01/backup/ZABBIX_0jvp8cej_1_1.bckp

File Name: /u01/backup/ZABBIX_0nvp8cgg_1_1.bckp

File Name: /u01/backup/ZABBIX_0lvp8cfi_1_1.bckp

File Name: /u01/backup/ZABBIX_0fvp8ccn_1_1.bckp

File Name: /u01/backup/19vpaboq_1_1

File Name: /u01/backup/18vpabob_1_1

File Name: /u01/backup/ZABBIX_0tvp8cj3_1_1.bckp

File Name: /u01/backup/ZABBIX_0uvp8cji_1_1.bckp

File Name: /u01/backup/ZABBIX_0svp8cis_1_1.bckp

File Name: /u01/backup/1ivpabs5_1_1

File Name: /u01/backup/16vpabnd_1_1

File Name: /u01/backup/1avpabpa_1_1

File Name: /u01/backup/ZABBIX_0pvp8che_1_1.bckp

File Name: /u01/backup/1fvpabrf_1_1

File Name: /u01/backup/1gvpabrm_1_1

File Name: /u01/backup/1dvpabqo_1_1

File Name: /u01/backup/1bvpabpp_1_1


Do you really want to catalog the above files (enter YES or NO)? yes

cataloging files...

cataloging done


List of Cataloged Files

=======================

File Name: /u01/backup/1evpabqv_1_1

File Name: /u01/backup/ZABBIX_0rvp8cid_1_1.bckp

File Name: /u01/backup/ZABBIX_0qvp8cht_1_1.bckp

File Name: /u01/backup/1hvpabru_1_1

File Name: /u01/backup/1cvpabq8_1_1

File Name: /u01/backup/ZABBIX_0ivp8ce4_1_1.bckp

File Name: /u01/backup/ZABBIX_0ovp8cgv_1_1.bckp

File Name: /u01/backup/14vpabmt_1_1

File Name: /u01/backup/ZABBIX_0kvp8cf2_1_1.bckp

File Name: /u01/backup/17vpabns_1_1

File Name: /u01/backup/ZABBIX_0mvp8cg1_1_1.bckp

File Name: /u01/backup/standbycontrol_ZABBIX_20210315_38vpq6fk_1_1.ctl

File Name: /u01/backup/ZABBIX_0hvp8cdl_1_1.bckp

File Name: /u01/backup/ZABBIX_0gvp8cd6_1_1.bckp

File Name: /u01/backup/ZABBIX_0jvp8cej_1_1.bckp

File Name: /u01/backup/ZABBIX_0nvp8cgg_1_1.bckp

File Name: /u01/backup/ZABBIX_0lvp8cfi_1_1.bckp

File Name: /u01/backup/ZABBIX_0fvp8ccn_1_1.bckp

File Name: /u01/backup/19vpaboq_1_1

File Name: /u01/backup/18vpabob_1_1

File Name: /u01/backup/ZABBIX_0tvp8cj3_1_1.bckp

File Name: /u01/backup/ZABBIX_0uvp8cji_1_1.bckp

File Name: /u01/backup/ZABBIX_0svp8cis_1_1.bckp

File Name: /u01/backup/1ivpabs5_1_1

File Name: /u01/backup/16vpabnd_1_1

File Name: /u01/backup/1avpabpa_1_1

File Name: /u01/backup/ZABBIX_0pvp8che_1_1.bckp

File Name: /u01/backup/1fvpabrf_1_1

File Name: /u01/backup/1gvpabrm_1_1

File Name: /u01/backup/1dvpabqo_1_1

File Name: /u01/backup/1bvpabpp_1_1

  • Configure disk parallelism to speed up process this is optional

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 20 BACKUP TYPE TO BACKUPSET;


new RMAN configuration parameters:

CONFIGURE DEVICE TYPE DISK PARALLELISM 20 BACKUP TYPE TO BACKUPSET;

new RMAN configuration parameters are successfully stored

released channel: ORA_DISK_1

  • Restore and recover DR restore database (For full rman backup restoration if using incremental backup to resysnc logs  do recover option )

RMAN> restore database;   


Starting restore at 15-MAR-21

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=38 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=39 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=40 device type=DISK

allocated channel: ORA_DISK_4

channel ORA_DISK_4: SID=41 device type=DISK

allocated channel: ORA_DISK_5

channel ORA_DISK_5: SID=42 device type=DISK

allocated channel: ORA_DISK_6

channel ORA_DISK_6: SID=43 device type=DISK

allocated channel: ORA_DISK_7

channel ORA_DISK_7: SID=44 device type=DISK

allocated channel: ORA_DISK_8

channel ORA_DISK_8: SID=45 device type=DISK

allocated channel: ORA_DISK_9

channel ORA_DISK_9: SID=46 device type=DISK

allocated channel: ORA_DISK_10

channel ORA_DISK_10: SID=47 device type=DISK

allocated channel: ORA_DISK_11

channel ORA_DISK_11: SID=48 device type=DISK

allocated channel: ORA_DISK_12

channel ORA_DISK_12: SID=49 device type=DISK

allocated channel: ORA_DISK_13

channel ORA_DISK_13: SID=50 device type=DISK

allocated channel: ORA_DISK_14

channel ORA_DISK_14: SID=51 device type=DISK

allocated channel: ORA_DISK_15

channel ORA_DISK_15: SID=52 device type=DISK

allocated channel: ORA_DISK_16

channel ORA_DISK_16: SID=53 device type=DISK

allocated channel: ORA_DISK_17

channel ORA_DISK_17: SID=54 device type=DISK

allocated channel: ORA_DISK_18

channel ORA_DISK_18: SID=55 device type=DISK

allocated channel: ORA_DISK_19

channel ORA_DISK_19: SID=56 device type=DISK

allocated channel: ORA_DISK_20

channel ORA_DISK_20: SID=57 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 /u01/app/oracle/oradata/zabbixdr/system01.dbf

channel ORA_DISK_1: reading from backup piece /u01/backup/Backup_ZABBIX_DB_2ovpq691_88_1_20210315

channel ORA_DISK_2: starting datafile backup set restore

channel ORA_DISK_2: specifying datafile(s) to restore from backup set

channel ORA_DISK_2: restoring datafile 00003 to /u01/app/oracle/oradata/zabbixdr/sysaux01.dbf

channel ORA_DISK_2: reading from backup piece /u01/backup/Backup_ZABBIX_DB_2nvpq690_87_1_20210315

channel ORA_DISK_3: starting datafile backup set restore

channel ORA_DISK_3: specifying datafile(s) to restore from backup set

channel ORA_DISK_3: restoring datafile 00007 to /u01/app/oracle/oradata/zabbixdr/pdbseed/sysaux01.dbf

channel ORA_DISK_3: reading from backup piece /u01/backup/Backup_ZABBIX_DB_2qvpq6bo_90_1_20210315

channel ORA_DISK_4: starting datafile backup set restore

channel ORA_DISK_4: specifying datafile(s) to restore from backup set

channel ORA_DISK_4: restoring datafile 00009 to /u01/app/oracle/oradata/zabbixdr/pdb1/sysaux01.dbf

channel ORA_DISK_4: reading from backup piece /u01/backup/Backup_ZABBIX_DB_2pvpq6bn_89_1_20210315

channel ORA_DISK_5: starting datafile backup set restore

channel ORA_DISK_5: specifying datafile(s) to restore from backup set

channel ORA_DISK_5: restoring datafile 00005 to /u01/app/oracle/oradata/zabbixdr/pdbseed/system01.dbf

channel ORA_DISK_5: reading from backup piece /u01/backup/Backup_ZABBIX_DB_2svpq6cr_92_1_20210315

channel ORA_DISK_6: starting datafile backup set restore

channel ORA_DISK_6: specifying datafile(s) to restore from backup set

channel ORA_DISK_6: restoring datafile 00008 to /u01/app/oracle/oradata/zabbixdr/pdb1/system01.dbf

channel ORA_DISK_6: reading from backup piece /u01/backup/Backup_ZABBIX_DB_2rvpq6cr_91_1_20210315

channel ORA_DISK_7: starting datafile backup set restore

channel ORA_DISK_7: specifying datafile(s) to restore from backup set

channel ORA_DISK_7: restoring datafile 00004 to /u01/app/oracle/oradata/zabbixdr/undotbs01.dbf

channel ORA_DISK_7: reading from backup piece /u01/backup/Backup_ZABBIX_DB_2tvpq6da_93_1_20210315

channel ORA_DISK_8: starting datafile backup set restore

channel ORA_DISK_8: specifying datafile(s) to restore from backup set

channel ORA_DISK_8: restoring datafile 00006 to /u01/app/oracle/oradata/zabbixdr/users01.dbf

channel ORA_DISK_8: reading from backup piece /u01/backup/Backup_ZABBIX_DB_2vvpq6dc_95_1_20210315

channel ORA_DISK_9: starting datafile backup set restore

channel ORA_DISK_9: specifying datafile(s) to restore from backup set

channel ORA_DISK_9: restoring datafile 00010 to /u01/app/oracle/oradata/zabbixdr/pdb1/pdb1_users01.dbf

channel ORA_DISK_9: reading from backup piece /u01/backup/Backup_ZABBIX_DB_30vpq6dd_96_1_20210315

channel ORA_DISK_8: piece handle=/u01/backup/Backup_ZABBIX_DB_2vvpq6dc_95_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_8: restored backup piece 1

channel ORA_DISK_8: restore complete, elapsed time: 00:00:01

channel ORA_DISK_9: piece handle=/u01/backup/Backup_ZABBIX_DB_30vpq6dd_96_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_9: restored backup piece 1

channel ORA_DISK_9: restore complete, elapsed time: 00:00:01

channel ORA_DISK_7: piece handle=/u01/backup/Backup_ZABBIX_DB_2tvpq6da_93_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_7: restored backup piece 1

channel ORA_DISK_7: restore complete, elapsed time: 00:00:07

channel ORA_DISK_5: piece handle=/u01/backup/Backup_ZABBIX_DB_2svpq6cr_92_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_5: restored backup piece 1

channel ORA_DISK_5: restore complete, elapsed time: 00:00:55

channel ORA_DISK_6: piece handle=/u01/backup/Backup_ZABBIX_DB_2rvpq6cr_91_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_6: restored backup piece 1

channel ORA_DISK_6: restore complete, elapsed time: 00:00:55

channel ORA_DISK_3: piece handle=/u01/backup/Backup_ZABBIX_DB_2qvpq6bo_90_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_3: restored backup piece 1

channel ORA_DISK_3: restore complete, elapsed time: 00:01:25

channel ORA_DISK_4: piece handle=/u01/backup/Backup_ZABBIX_DB_2pvpq6bn_89_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_4: restored backup piece 1

channel ORA_DISK_4: restore complete, elapsed time: 00:01:25

channel ORA_DISK_1: piece handle=/u01/backup/Backup_ZABBIX_DB_2ovpq691_88_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:01:55

channel ORA_DISK_2: piece handle=/u01/backup/Backup_ZABBIX_DB_2nvpq690_87_1_20210315 tag=FULL_BACKUP_WEEKLY

channel ORA_DISK_2: restored backup piece 1

channel ORA_DISK_2: restore complete, elapsed time: 00:01:55

Finished restore at 15-MAR-21


RMAN> RECOVER DATABASE NOREDO;


Starting recover at 15-MAR-21

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

using channel ORA_DISK_4

using channel ORA_DISK_5

using channel ORA_DISK_6

using channel ORA_DISK_7

using channel ORA_DISK_8

using channel ORA_DISK_9

using channel ORA_DISK_10

using channel ORA_DISK_11

using channel ORA_DISK_12

using channel ORA_DISK_13

using channel ORA_DISK_14

using channel ORA_DISK_15

using channel ORA_DISK_16

using channel ORA_DISK_17

using channel ORA_DISK_18

using channel ORA_DISK_19

using channel ORA_DISK_20


Finished recover at 15-MAR-21

  • Check MRP0 process and start MRP0 process to make sync.

RMAN> select process,status,sequence# from v$managed_standby;


PROCESS   STATUS        SEQUENCE#

--------- ------------ ----------

ARCH      CONNECTED             0

ARCH      CONNECTED             0

ARCH      CONNECTED             0

ARCH      CLOSING            1351

RFS       IDLE                  0

RFS       IDLE               1352


RMAN> exit



Recovery Manager complete.

[oracle@srv5 backup]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Mon Mar 15 13:35:30 2021


Copyright (c) 1982, 2014, Oracle.  All rights reserved.



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

[oracle@srv5 backup]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Mon Mar 15 13:35:34 2021


Copyright (c) 1982, 2014, Oracle.  All rights reserved.



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


SQL> @/home/oracle/d


NAME      INSTANCE_NAME    DB_UNIQUE_NAME                 OPEN_MODE            DATABASE_ROLE    CURRENT_SCN        FAILOVER_SCN

--------- ---------------- ------------------------------ -------------------- ---------------- ------------------ ----------------------------------------

ZABBIX    zabbixdr2        zabbixdr2                      MOUNTED              PHYSICAL STANDBY NO                 0


SQL> @/home/oracle/standby


NAME      OPEN_MODE            DATABASE_ROLE

--------- -------------------- ----------------

ZABBIX    MOUNTED              PHYSICAL STANDBY



PROCESS   STATUS        SEQUENCE#

--------- ------------ ----------

ARCH      CONNECTED             0

ARCH      CONNECTED             0

ARCH      CONNECTED             0

ARCH      CLOSING            1351

RFS       IDLE                  0

RFS       IDLE               1352


6 rows selected.



    Thread Last Sequence Received Last Sequence Applied Difference

---------- ---------------------- --------------------- ----------

         1                   1351                  1350          1



SQL> alter database recover managed standby database disconnect from session;


Database altered.


SQL> @/home/oracle/standby


NAME      OPEN_MODE            DATABASE_ROLE

--------- -------------------- ----------------

ZABBIX    MOUNTED              PHYSICAL STANDBY



PROCESS   STATUS        SEQUENCE#

--------- ------------ ----------

ARCH      CONNECTED             0

ARCH      CONNECTED             0

ARCH      CONNECTED             0

ARCH      CLOSING            1351

RFS       IDLE                  0

RFS       IDLE               1352

MRP0      APPLYING_LOG       1352

RFS       IDLE                  0


8 rows selected.



    Thread Last Sequence Received Last Sequence Applied Difference

---------- ---------------------- --------------------- ----------

         1                   1351                  1351          0


SQL>

  • Check physical standby Data guard  status using DGMGRL command.
DGMGRL> show configuration;

Configuration - zabbix

  Protection Mode: MaxPerformance
  Members:
  zabbix    - Primary database
    zabbixdr  - Physical standby database
    zabbixdr2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 9 seconds ago)

DGMGRL>

No comments:

Post a Comment