Dear
DBA-Mates,
We would
like to share some rough work for "How to Restore DR database" which
can be helpful here for quick reference.
First we
need to set the value for log_archive_dest_state_2 paramater as shown below in
Primary Node.
In Primary Seerver:
SQL>alter
system set log_archive_dest_state_2=DEFER sid='*';
Now, we
should Physically check all the archive, once the full backup completed, as is
available either in primary or in standby.
Then
disable the archive purge cronjob in standby.
Also, Stop
if any 3rd party snapsync jobs is running. In our case we don't have any.
Now, we
will login to Standby and will start restore:
1. We will
restore controlfile from production backup controlfile.
Login rman
as:
$rman
target /
rman>
restore
standby controlfile from
'/rmanbk01/ora-data/backup/PRD_20180621_1919_1_CONTROL';
rman>
2. Start
database in mount stage:
rman>alter
database mount;
3. Start
recovering from catalogs.
rman>catalog
start with '/rmanbk01/PRD/backup/';
4. Restore
the database.
rman>RUN
{
ALLOCATE
CHANNEL c1 DEVICE TYPE disk;
ALLOCATE
CHANNEL c2 DEVICE TYPE disk;
ALLOCATE
CHANNEL c3 DEVICE TYPE disk;
ALLOCATE
CHANNEL c4 DEVICE TYPE disk;
ALLOCATE
CHANNEL c5 DEVICE TYPE disk;
ALLOCATE
CHANNEL c6 DEVICE TYPE disk;
ALLOCATE
CHANNEL c7 DEVICE TYPE disk;
restore
database;
release
channel c1;
release
channel c2;
release
channel c3;
release
channel c4;
release
channel c5;
release
channel c6;
release
channel c7;
}
5. Once
restore completed, we can check archive and start the catalog.
rman>catalog
start with 'path/archivelog';
6. Now, we
can start the MRP process as shown below:
rman>alter
database recover managed standby database disconnect;
7. From
below Query, we can monitor the restore process.
select
SID,OPEN_TIME, (sysdate-open_time)*24*60 ela_time,close_time,filename,
(TOTAL_BYTES/1024/1024/1024)
GBTOBEREAD,(bytes)/1024/1024/1024 GB_sofar
from V$BACKUP_ASYNC_IO where filename like '/path/datafile%';
Some more useful
links:
nice information , keep it up
ReplyDeletecould you please explain ------> filename like '/path/datafile%'; in monitoring script
DeleteDear User,
Thanks for your feedback.
It means the datafiles name with correct path.
e.g /u01/oracle/data/xyz.dbf
Regards,
ora-data Team