Professional Documents
Culture Documents
Service Restore
Service Restore
ID 1987763.1)
===================================================================================
===================
Pre-check
============
1) Set blackout for DR database in OEM
2) Verify FRA DISK space for RMAN restore.
PRIMARY
=======
alter system set log_Archive_dest_state_2=DEFER;
7 rows selected.
TO_CHAR(CURRENT_SCN)
----------------------------------------
32508983
*******************************************************************************
STANDBY
=======
TO_CHAR(CURRENT_SCN)
----------------------------------------
32508983
FILE_NUM SUBSTR(HXFNM,1,40)
FHSCN
----------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------
--------------------
1 +DATA/DBD00/DATAFILE/system.316.10746403
32510862
2 +DATA/DBD00/DATAFILE/sysaux.258.10746403
32510862
3 +DATA/DBD00/DATAFILE/undotbs1.259.107464
32510862
4 +DATA/DBD00/DATAFILE/undotbs2.306.107464
32510862
5 +DATA/DBD00/DATAFILE/users.263.107464038
32510862
6 +DATA/DBD00/DATAFILE/audit_arch_dat.292.
32510862
7 +DATA/DBD00/DATAFILE/audit_dat.295.10746
32510862
7 rows selected.
The RECOVER … FROM SERVICE command refreshes the standby data files and rolls them
forward to the same point-in-time as the primary.
===================================================================================
===============================================
recover database from service DBD00_ORARACP10 noredo using compressed backupset;
RMAN>
After restored then see the scn number matched with primary
===========================================================
set long 1000
select HXFIL File_num,substr(HXFNM,1,40),fhscn from x$kcvfh;
FILE_NUM
----------
SUBSTR(HXFNM,1,40)
--------------------------------------------------------------------------------
FHSCN
--------------------
1
+DATA/DBD00/DATAFILE/system.316.10746403
32512823
***********************************************************************************
****
Restore controlfile using service(DBD00_ORARACP10) from standby rman
=====================================================================
RESTORE STANDBY CONTROLFILE FROM SERVICE DBD00_ORARACP10;
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
***********************************************************************************
*************************************************
Update the names of the data files and the temp files in the standby control file.
===================================================================================
=====
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
RMAN>
After restore check below query any datafile add while restored. if yes. need to
start catalog
SELECT file# FROM V$DATAFILE WHERE creation_change# >= 32508983;
no rows selected
--- no datafile added here.
RMAN> RUN
2> {
3> SET NEWNAME FOR DATABASE TO '/';
4> RESTORE DATAFILE 21 FROM SERVICE prim;
5> }
**************************************
GROUP#
----------
5
6
7
8
9
Database altered.
Database altered.
Database altered.
Database altered.
Database altered.
Database altered.
Database altered.
Database altered.
Database altered.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.11.0.0.0
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Database altered.
COUNT(*)
----------
0
THREAD# MAX(SEQUENCE#)
---------- --------------
1 496
2 417