Professional Documents
Culture Documents
This note describes the process of performing a database refresh of the reporting database using the Data Guard Standby database as the source for the
clone and not the production primary database.
Environment:
Configuration - ttrlDR
Configuration Status:
SUCCESS
Configuration - ttrlDR
Configuration Status:
SUCCESS
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
DATABASE_ROLE
----------------
SNAPSHOT STANDBY
Switch a few log files in the snapshot standby database otherwise we will get an error like the one shown below when we run the RMAN DUPLICATE
System altered.
SQL> /
System altered.
TNS Ping Utility for Solaris: Version 11.2.0.3.0 - Production on 07-JAN-2015 14:10:51
$ . oraenv
ORACLE_SID = [ttrl] ? strl
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Database dropped.
$ . oraenv
ORACLE_SID = [ttrl] ? strl
The Oracle base remains unchanged with value /u01/app/oracle
Enter password:
Connected to an idle instance.
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
....
While the clone process in in progress simulate some changes being made to the primary database
Note that since the standby database is currently running in snapshot standby mode, redo will be shipped from primary to the standby site, but will not
be applied at this stage.
$ sqlplus system/dbadmin1
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Table created.
COUNT(*)
----------
70365
SQL> commit;
Commit complete.
COUNT(*)
----------
140730
sql statement: alter system set db_name = ''TTRL'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''STRL'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
database mounted
archived log for thread 1 with sequence 5 is already on disk as file /u02/oraback/strl/arch/strl_0868370727_0001_0000000005.arch
archived log file name=/u02/oraback/strl/arch/strl_0868370727_0001_0000000005.arch thread=1 sequence=5
media recovery complete, elapsed time: 00:00:01
Finished recover at 07-JAN-15
Oracle instance started
sql statement: alter system set db_name = ''STRL'' comment= ''Reset to original value by RMAN'' scope=spfile
database opened
Executing: alter database flashback on
Finished Duplicate Db at 07-JAN-15
Convert the snapshot standby database back to original role of physical standby
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "ttrl" on database "ttrl_dr"
Starting instance "ttrl"...
ORACLE instance started.
Database mounted.
Database "ttrl_dr" converted successfully
Configuration - ttrlDR
Configuration Status:
SUCCESS
DATABASE_ROLE
----------------
PHYSICAL STANDBY
Open the Standby database and check if the changes made to the primary database while standby database was in snapshot standby mode have now
been applied
Database altered.
COUNT(*)
----------
140730