Friday, January 14, 2022

Rolling Forward a Physical Standby Using Recover From Service Command in 12c (Doc ID 1987763.1)

Steps to perform for Rolling Forward a Physical Standby Database using RMAN Incremental Backup. (Doc ID 836986.1)


Rolling Forward a Physical Standby Using Recover From Service Command in 12c (Doc ID 1987763.1)



PROD Environment :

DB: ORCL
Server: oracledb.localdomain.com
Oracle Home: /u01/app/oracle/product/19.0.0.0/dbhome_1

DR Environment :

DB: ORCLSB
Server: oraclesb.localdomain.com
Oracle Home: /u01/app/oracle/product/19.0.0.0/dbhome_1


STEP 1: CHECK PRIMARY & STANDBY DATABASE STATUS:

SQL> select db_unique_name,OPEN_MODE,DATABASE_ROLE from v$database;

STEP 2: CHECK ARCHIVE SEQUENCES on PRIMARY & STANDBY:


Primary:
SQL> archive log list
SQL> ALTER SESSION SET nls_date_format='DD-MON-YYYY HH24:MI:SS';
SQL> SELECT sequence#, first_time, next_time, applied FROM v$archived_log ORDER BY sequence#;

STEP 3: CANCEL RECOVERY ON STANDBY:

SQL> select db_unique_name,OPEN_MODE,DATABASE_ROLE from v$database;
SQL> recover managed standby database cancel;


STEP 4: START STANDBY DB IN MOUNT STATE( IF it is ACTIVE DATAGUARD):

SQL> shutdown immediate;
SQL> startup mount;

STEP 5: RECOVER STANDBY USING SERVICE:

$rman target /
RMAN>recover database from service ORCL noredo using compressed backupset;

STEP 6: RESTORE STANDBY CONTROLFILE IN NOMOUNT STAGE:

RMAN>shutdown immediate;
RMAN>startup nomount;
RMAN> restore standby controlfile from service ORCL;
RMAN> alter database mount;

STEP 7: Update the names of the data files and the temp files in the standby control file:

RMAN>catalog start with '<path where the actual standby datafile existed>';

For Example:
RMAN>catalog start with '/u01/app/oracle/oradata/ORCLSB';

RMAN>switch database to copy;

STEP 8: RUN RECOVER DATABASE(IN STANDBY - NOT Mandatory):

RMAN>RECOVER DATABASE;

STEP 9: OPEN THE DATABASE and START  MEDIA RECOVERY:

SQL> alter database open;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE disconnect from session;

Regards,
Mallik

1 comment:

  1. Hii sir..same issue happened on my uat server.. we have 2node pr nd 2node dr.everyweek we cleared FRA .we leave last 3days.. cleared remaining days.. but yesterday I cleared FRA without seeing sync status nd MRP running or not..now my both pr nd Dr are not in sync..what I am doing now please give me some suggestion..if any documents is there please provide me sir

    ReplyDelete

Automation Script | Archivelog Generation Hourly Monitoring

1. List out all the running databases and pic one database where we want to monitore the archive log generation from last 1 month. [oracle@o...