Friday, May 4, 2018

Recovering the Standby database



 Connect to the standby database (TRAXSP) on SYDDC1TRX01 Server using sqlplus tool and confirm the right database is connected by executing the below SQL command.

SQL> select instance_name,status from v$instance;

2.       Check the missing files in TRAXSP.

a.       To check the number of sequences missing along with the higher and lower sequence:

SQL> select * from v$archive_gap;

b.       To check the missing file sequence number:

SQL> select sequence#,applied,status from v$archived_log where applied='NO';
  1. Using the sequence number, copy the missing file from (/arch/oraarchive/traxp/) MELDC1TRX01 Server to the appropriate location (/arch/oraarchive/traxsp/) in SYDDC1TRX01 Server.

It can be copied by using scp command.

·         Connect to SYDDC1TRX01 server and fire the below command from OS prompt.

scp oracle@meldc1trx01:/arch/oraarchive/traxp/<missing sequence name> /arch/oraarchive/traxsp/

OR

·         Connect to meldc1trx01 server and fire the below command from OS prompt.

scp /arch/oraarchive/traxp/<missing sequence name>  oracle@meldc1trx02:/arch/oraarchive/traxsp/
                                                                                                                                                                            
Provide password when asked.

1.       Stop the automatic applying of archived log files in standby database (TRAXSP) by executing the following command:

SQL> alter database recover managed standby database cancel;

2.       Recover the standby database with the copied missing files:

SQL> recover standby database;

3.       Then give the command

AUTO

This will recover TRAXSP with the unapplied archived log files.

4.       When all the archived log files are applied in TRAXSP, once again start the automatic applying by the following command:

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

5.       Finally, check whether TRAXSP is in sync with TRAXMP.








No comments:

Post a Comment