· web viewcreate required directories on target server for clone database add entries in...

22
Performing a clone using a Data Guard Snapshot Database 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: Primary Database :ttrl Standby Database : ttrl_dr (db_unique_name) Cloned Database: strl Verify Data Guard Broker Configuration DGMGRL> connect sys Password: Connected. DGMGRL> show configuration Configuration - ttrlDR Protection Mode: MaxPerformance Databases: ttrl - Primary database ttrl_dr - Physical standby database Fast-Start Failover: DISABLED

Upload: phunghanh

Post on 13-Mar-2018

224 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

Performing a clone using a Data Guard Snapshot Database

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:

Primary Database :ttrl

Standby Database : ttrl_dr (db_unique_name)

Cloned Database: strl

Verify Data Guard Broker Configuration

DGMGRL> connect sysPassword:Connected.

DGMGRL> show configuration

Configuration - ttrlDR

  Protection Mode: MaxPerformance  Databases:    ttrl    - Primary database    ttrl_dr - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:SUCCESS

Convert Physical Standby to Snapshot Standby

Page 2: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

DGMGRL> convert database ttrl_dr to snapshot standby;Converting database "ttrl_dr" to a Snapshot Standby database, please wait...Database "ttrl_dr" converted successfully

DGMGRL>  show configuration

Configuration - ttrlDR

  Protection Mode: MaxPerformance  Databases:    ttrl    - Primary database    ttrl_dr - Snapshot standby database

Fast-Start Failover: DISABLED

Configuration Status:SUCCESS

On Standby database, check the status of the database

oracle@test-devas:/export/home/oracle $ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 7 14:06:44 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:

Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select database_role from v$database;

DATABASE_ROLE----------------SNAPSHOT STANDBY

SQL> select open_mode from v$database;

Page 3: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

OPEN_MODE--------------------READ WRITE

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

RMAN-03002: failure of Duplicate Db command at 05/16/2014 11:20:47RMAN-05501: aborting duplication of target databaseRMAN-05541: no archived logs found in target database

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

From Standby database verify connectivity to the clone database

oracle@test-devas:/export/home/oracle $ tnsping strl

TNS Ping Utility for Solaris: Version 11.2.0.3.0 - Production on 07-JAN-2015 14:10:51

Copyright (c) 1997, 2011, Oracle.  All rights reserved.

Used parameter files:/u01/app/oracle/product/11.2.0/dbhome_3/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the aliasAttempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = devas)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = strl)))OK (0 msec)

Page 4: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

Drop the existing clone database

$ . oraenvORACLE_SID = [ttrl] ? strl

The Oracle base remains unchanged with value /u01/app/oracle$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 7 14:11:35 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:

Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.

SQL> startup mount restrict;ORACLE instance started.

Total System Global Area 2088402944 bytesFixed Size                  2160896 bytesVariable Size            1275070208 bytesDatabase Buffers          805306368 bytesRedo Buffers                5865472 bytesDatabase mounted.

SQL> drop database;

Database dropped.

Prepare for clone

Page 5: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

Copy password file from production/standby and rename Copy init.ora from production/standby and rename Edit init.ora and make appropriate changes

o Remove all Data Guard related parameterso Change parameters like db_name, control_file, db_file_name_convert, log_file_name_convert from ttrl to strl

Create required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

Start the cloned instance in NOMOUNT state

$ . oraenvORACLE_SID = [ttrl] ? strlThe Oracle base remains unchanged with value /u01/app/oracle

$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 7 14:26:11 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:Connected to an idle instance.

SQL> startup nomount;ORACLE instance started.

Total System Global Area 2088402944 bytesFixed Size                  2160896 bytesVariable Size            1358956288 bytesDatabase Buffers          721420288 bytesRedo Buffers                5865472 bytesSQL>

Page 6: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

From the Snapshot Standby environment, establish an RMAN auxiliary connection to the clone instance which is in nomount state at the moment

$ rman target sys/dbadmin1 auxiliary sys/dbadmin1@strl

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jan 7 14:30:09 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: TTRL (DBID=3396213702)connected to auxiliary database: STRL (not mounted)

Issue the DUPLICATE FROM ACTIVE DATABASE command

RMAN> duplicate target database to strl from active database nofilenamecheck;

Starting Duplicate Db at 07-JAN-15using target database control file instead of recovery catalogallocated channel: ORA_AUX_DISK_1

....

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

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 7 14:33:11 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:

Page 7: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create table myobjects as select * from dba_objects;

Table created.

SQL> select count(*) from myobjects;

  COUNT(*)----------     70365

SQL> insert into myobjects select * from dba_objects;

70365 rows created.

SQL> commit;

Commit complete.

SQL> select count(*) from myobjects;

  COUNT(*)----------    140730

Note the output of the RMAN DUPLICATE DATABASE command

RMAN> duplicate target database to strl from active database nofilenamecheck;

Starting Duplicate Db at 07-JAN-15using target database control file instead of recovery catalogallocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID=114 device type=DISK

contents of Memory Script:{   sql clone "create spfile from memory";}executing Memory Script

Page 8: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

sql statement: create spfile from memory

contents of Memory Script:{   shutdown clone immediate;   startup clone nomount;}executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)Oracle instance started

Total System Global Area    2088402944 bytes

Fixed Size                     2160896 bytesVariable Size               1375733504 bytesDatabase Buffers             704643072 bytesRedo Buffers                   5865472 bytes

contents of Memory Script:{   sql clone "alter system set  db_name =''TTRL'' comment=''Modified by RMAN duplicate'' scope=spfile";   sql clone "alter system set  db_unique_name =''STRL'' comment=''Modified by RMAN duplicate'' scope=spfile";   shutdown clone immediate;   startup clone force nomount   backup as copy current controlfile auxiliary format  '/u04/oradata/strl/control01.ctl';   restore clone controlfile to  '/u05/oradata/strl/control02.ctl' from'/u04/oradata/strl/control01.ctl';   restore clone controlfile to  '/u05/oradata/strl/control03.ctl' from'/u04/oradata/strl/control01.ctl';   alter clone database mount;}executing Memory Script

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

Page 9: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

Oracle instance shut down

Oracle instance started

Total System Global Area    2088402944 bytes

Fixed Size                     2160896 bytesVariable Size               1375733504 bytesDatabase Buffers             704643072 bytesRedo Buffers                   5865472 bytes

Starting backup at 07-JAN-15allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=20 device type=DISKchannel ORA_DISK_1: starting datafile copycopying current control fileoutput file name=/u01/app/oracle/product/11.2.0/dbhome_3/dbs/snapcf_ttrl.f tag=TAG20150107T143242 RECID=13 STAMP=868372362channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01Finished backup at 07-JAN-15

Starting restore at 07-JAN-15allocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID=66 device type=DISK

channel ORA_AUX_DISK_1: copied control file copyFinished restore at 07-JAN-15

Starting restore at 07-JAN-15using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: copied control file copyFinished restore at 07-JAN-15

database mounted

contents of Memory Script:{   sql clone 'alter database flashback off';   set newname for datafile  1 to"/u03/oradata/strl/system01.dbf";   set newname for datafile  2 to"/u03/oradata/strl/sysaux01.dbf";   set newname for datafile  3 to

Page 10: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

"/u03/oradata/strl/undotbs01.dbf";   set newname for datafile  4 to"/u03/oradata/strl/users01.dbf";   set newname for datafile  5 to"/u03/oradata/strl/tdl01.dbf";   set newname for datafile  6 to"/u03/oradata/strl/tdm01.dbf";   set newname for datafile  7 to"/u03/oradata/strl/tds01.dbf";   set newname for datafile  8 to"/u03/oradata/strl/til01.dbf";   set newname for datafile  9 to"/u03/oradata/strl/tis01.dbf";   set newname for datafile  10 to"/u03/oradata/strl/tim01.dbf";   backup as copy reuse   datafile  1 auxiliary format"/u03/oradata/strl/system01.dbf"   datafile2 auxiliary format"/u03/oradata/strl/sysaux01.dbf"   datafile3 auxiliary format"/u03/oradata/strl/undotbs01.dbf"   datafile4 auxiliary format"/u03/oradata/strl/users01.dbf"   datafile5 auxiliary format"/u03/oradata/strl/tdl01.dbf"   datafile6 auxiliary format"/u03/oradata/strl/tdm01.dbf"   datafile7 auxiliary format"/u03/oradata/strl/tds01.dbf"   datafile8 auxiliary format"/u03/oradata/strl/til01.dbf"   datafile9 auxiliary format"/u03/oradata/strl/tis01.dbf"   datafile10 auxiliary format"/u03/oradata/strl/tim01.dbf"   ;   sql 'alter system archive log current';}executing Memory Script

sql statement: alter database flashback off

executing command: SET NEWNAME

Page 11: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 07-JAN-15using channel ORA_DISK_1channel ORA_DISK_1: starting datafile copyinput datafile file number=00001 name=/u03/oradata/ttrl/system01.dbfoutput file name=/u03/oradata/strl/system01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15channel ORA_DISK_1: starting datafile copyinput datafile file number=00002 name=/u03/oradata/ttrl/sysaux01.dbfoutput file name=/u03/oradata/strl/sysaux01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15channel ORA_DISK_1: starting datafile copyinput datafile file number=00008 name=/u03/oradata/ttrl/til01.dbfoutput file name=/u03/oradata/strl/til01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15channel ORA_DISK_1: starting datafile copyinput datafile file number=00005 name=/u03/oradata/ttrl/tdl01.dbfoutput file name=/u03/oradata/strl/tdl01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15channel ORA_DISK_1: starting datafile copyinput datafile file number=00003 name=/u03/oradata/ttrl/undotbs01.dbfoutput file name=/u03/oradata/strl/undotbs01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07channel ORA_DISK_1: starting datafile copyinput datafile file number=00006 name=/u03/oradata/ttrl/tdm01.dbfoutput file name=/u03/oradata/strl/tdm01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

Page 12: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

channel ORA_DISK_1: starting datafile copyinput datafile file number=00010 name=/u03/oradata/ttrl/tim01.dbfoutput file name=/u03/oradata/strl/tim01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07channel ORA_DISK_1: starting datafile copyinput datafile file number=00007 name=/u03/oradata/ttrl/tds01.dbfoutput file name=/u03/oradata/strl/tds01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03channel ORA_DISK_1: starting datafile copyinput datafile file number=00009 name=/u03/oradata/ttrl/tis01.dbfoutput file name=/u03/oradata/strl/tis01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03channel ORA_DISK_1: starting datafile copyinput datafile file number=00004 name=/u03/oradata/ttrl/users01.dbfoutput file name=/u03/oradata/strl/users01.dbf tag=TAG20150107T143253channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01Finished backup at 07-JAN-15

sql statement: alter system archive log current

contents of Memory Script:{   backup as copy reuse   archivelog like  "/u02/oraback/ttrl/arch/ttrl_0868370727_0001_0000000005.arch" auxiliary format"/u02/oraback/strl/arch/strl_0868370727_0001_0000000005.arch"   ;   catalog clone archivelog  "/u02/oraback/strl/arch/strl_0868370727_0001_0000000005.arch";   switch clone datafile all;}executing Memory Script

Starting backup at 07-JAN-15using channel ORA_DISK_1channel ORA_DISK_1: starting archived log copyinput archived log thread=1 sequence=5 RECID=1208 STAMP=868372462output file name=/u02/oraback/strl/arch/strl_0868370727_0001_0000000005.arch RECID=0 STAMP=0channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01Finished backup at 07-JAN-15

cataloged archived logarchived log file name=/u02/oraback/strl/arch/strl_0868370727_0001_0000000005.arch RECID=1208 STAMP=868372464

datafile 1 switched to datafile copyinput datafile copy RECID=13 STAMP=868372464 file name=/u03/oradata/strl/system01.dbfdatafile 2 switched to datafile copy

Page 13: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

input datafile copy RECID=14 STAMP=868372464 file name=/u03/oradata/strl/sysaux01.dbfdatafile 3 switched to datafile copyinput datafile copy RECID=15 STAMP=868372464 file name=/u03/oradata/strl/undotbs01.dbfdatafile 4 switched to datafile copyinput datafile copy RECID=16 STAMP=868372464 file name=/u03/oradata/strl/users01.dbfdatafile 5 switched to datafile copyinput datafile copy RECID=17 STAMP=868372464 file name=/u03/oradata/strl/tdl01.dbfdatafile 6 switched to datafile copyinput datafile copy RECID=18 STAMP=868372464 file name=/u03/oradata/strl/tdm01.dbfdatafile 7 switched to datafile copyinput datafile copy RECID=19 STAMP=868372464 file name=/u03/oradata/strl/tds01.dbfdatafile 8 switched to datafile copyinput datafile copy RECID=20 STAMP=868372464 file name=/u03/oradata/strl/til01.dbfdatafile 9 switched to datafile copyinput datafile copy RECID=21 STAMP=868372464 file name=/u03/oradata/strl/tis01.dbfdatafile 10 switched to datafile copyinput datafile copy RECID=22 STAMP=868372464 file name=/u03/oradata/strl/tim01.dbf

contents of Memory Script:{   set until scn  1296532233;   recover   clone database    delete archivelog   ;}executing Memory Script

executing command: SET until clause

Starting recover at 07-JAN-15using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 5 is already on disk as file /u02/oraback/strl/arch/strl_0868370727_0001_0000000005.archarchived log file name=/u02/oraback/strl/arch/strl_0868370727_0001_0000000005.arch thread=1 sequence=5media recovery complete, elapsed time: 00:00:01Finished recover at 07-JAN-15Oracle instance started

Total System Global Area    2088402944 bytes

Fixed Size                     2160896 bytes

Page 14: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

Variable Size               1375733504 bytesDatabase Buffers             704643072 bytesRedo Buffers                   5865472 bytes

contents of Memory Script:{   sql clone "alter system set  db_name =''STRL'' comment=''Reset to original value by RMAN'' scope=spfile";   sql clone "alter system reset  db_unique_name scope=spfile";   shutdown clone immediate;   startup clone nomount;}executing Memory Script

sql statement: alter system set  db_name =  ''STRL'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)Oracle instance started

Total System Global Area    2088402944 bytes

Fixed Size                     2160896 bytesVariable Size               1375733504 bytesDatabase Buffers             704643072 bytesRedo Buffers                   5865472 bytessql statement: CREATE CONTROLFILE REUSE SET DATABASE "STRL" RESETLOGS ARCHIVELOG  MAXLOGFILES     16  MAXLOGMEMBERS      5  MAXDATAFILES      100  MAXINSTANCES     8  MAXLOGHISTORY     1412LOGFILE  GROUP   1 ( '/u04/oradata/strl/redo01a.log', '/u05/oradata/strl/redo01b.log' ) SIZE 150 M  REUSE,  GROUP   2 ( '/u04/oradata/strl/redo02a.log', '/u05/oradata/strl/redo02b.log' ) SIZE 150 M  REUSE,  GROUP   3 ( '/u04/oradata/strl/redo03a.log', '/u05/oradata/strl/redo03b.log' ) SIZE 150 M  REUSEDATAFILE  '/u03/oradata/strl/system01.dbf'CHARACTER SET WE8MSWIN1252

Page 15: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

contents of Memory Script:{   set newname for tempfile  1 to"/u03/oradata/strl/temp01.dbf";   switch clone tempfile all;   catalog clone datafilecopy  "/u03/oradata/strl/sysaux01.dbf","/u03/oradata/strl/undotbs01.dbf","/u03/oradata/strl/users01.dbf","/u03/oradata/strl/tdl01.dbf","/u03/oradata/strl/tdm01.dbf","/u03/oradata/strl/tds01.dbf","/u03/oradata/strl/til01.dbf","/u03/oradata/strl/tis01.dbf","/u03/oradata/strl/tim01.dbf";   switch clone datafile all;}executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u03/oradata/strl/temp01.dbf in control file

cataloged datafile copydatafile copy file name=/u03/oradata/strl/sysaux01.dbf RECID=1 STAMP=868372488cataloged datafile copydatafile copy file name=/u03/oradata/strl/undotbs01.dbf RECID=2 STAMP=868372488cataloged datafile copydatafile copy file name=/u03/oradata/strl/users01.dbf RECID=3 STAMP=868372488cataloged datafile copydatafile copy file name=/u03/oradata/strl/tdl01.dbf RECID=4 STAMP=868372488cataloged datafile copydatafile copy file name=/u03/oradata/strl/tdm01.dbf RECID=5 STAMP=868372488cataloged datafile copydatafile copy file name=/u03/oradata/strl/tds01.dbf RECID=6 STAMP=868372488cataloged datafile copydatafile copy file name=/u03/oradata/strl/til01.dbf RECID=7 STAMP=868372488cataloged datafile copydatafile copy file name=/u03/oradata/strl/tis01.dbf RECID=8 STAMP=868372488cataloged datafile copydatafile copy file name=/u03/oradata/strl/tim01.dbf RECID=9 STAMP=868372488

datafile 2 switched to datafile copyinput datafile copy RECID=1 STAMP=868372488 file name=/u03/oradata/strl/sysaux01.dbf

Page 16: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

datafile 3 switched to datafile copyinput datafile copy RECID=2 STAMP=868372488 file name=/u03/oradata/strl/undotbs01.dbfdatafile 4 switched to datafile copyinput datafile copy RECID=3 STAMP=868372488 file name=/u03/oradata/strl/users01.dbfdatafile 5 switched to datafile copyinput datafile copy RECID=4 STAMP=868372488 file name=/u03/oradata/strl/tdl01.dbfdatafile 6 switched to datafile copyinput datafile copy RECID=5 STAMP=868372488 file name=/u03/oradata/strl/tdm01.dbfdatafile 7 switched to datafile copyinput datafile copy RECID=6 STAMP=868372488 file name=/u03/oradata/strl/tds01.dbfdatafile 8 switched to datafile copyinput datafile copy RECID=7 STAMP=868372488 file name=/u03/oradata/strl/til01.dbfdatafile 9 switched to datafile copyinput datafile copy RECID=8 STAMP=868372488 file name=/u03/oradata/strl/tis01.dbfdatafile 10 switched to datafile copyinput datafile copy RECID=9 STAMP=868372488 file name=/u03/oradata/strl/tim01.dbfReenabling controlfile options for auxiliary databaseExecuting: alter database force logging

contents of Memory Script:{   Alter clone database open resetlogs;}executing Memory Script

database openedExecuting: alter database flashback onFinished Duplicate Db at 07-JAN-15

Convert the snapshot standby database back to original role of physical standby

DGMGRL> connect sys/dbadmin1Connected.

DGMGRL> convert database ttrl_dr to physical standby;Converting database "ttrl_dr" to a Physical Standby database, please wait...Operation requires shutdown of instance "ttrl" on database "ttrl_dr"Shutting down instance "ttrl"...Database closed.

Page 17: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

Database dismounted.ORACLE instance shut down.Operation requires startup of instance "ttrl" on database "ttrl_dr"Starting instance "ttrl"...ORACLE instance started.Database mounted.Continuing to convert database "ttrl_dr" ...Operation requires shutdown of instance "ttrl" on database "ttrl_dr"Shutting down instance "ttrl"...ORA-01109: database not open

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

Confirm the role transition

DGMGRL> show configuration

Configuration - ttrlDR

  Protection Mode: MaxPerformance  Databases:    ttrl    - Primary database    ttrl_dr - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:SUCCESS

SQL> select database_role from v$database;

DATABASE_ROLE----------------

Page 18: · Web viewCreate required directories on target server for clone database Add entries in listener.ora and tnsnames.ora for cloned database Set environment to cloned database – strl

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

SQL> select count(*) from system.myobjects;select count(*) from system.myobjects                            *ERROR at line 1:ORA-01219: database not open: queries allowed on fixed tables/views only

SQL> alter database open;

Database altered.

SQL> select count(*) from system.myobjects;

  COUNT(*)----------    140730