UniversalTemplate/logo.png UniversalTemplate/UTS.png


1. Shutdown the physical standby database

  • SQL> shutdown immediate;

2. (Optional, safer in case of failure) Backup all datafiles (*.dbf), redologs, indexes, undo, archive logs, online logs, flashback logs and control files that are used by the shut down instance.

3. In Standby DB Server, Delete all datafiles (*.dbf), redologs, archive logs, undo, indexes, online logs, flashback logs and control files in their referenced locations, but make sure to keep the directories.

4. Start up your Physical Standby Database with NOMOUNT-Option

  • SQL> startup nomount;

5. Now switch to your Primary Database Environment.

6. Start your rman on your primary envoronment:

  • rman target sys/password@PRIMARY_DB auxiliary sys/password@STANDBY_DB
  • Example: rman target sys/????@DWPROD5 auxiliary sys/????@DWPROD5STANDBY #you should be able to tnsping the 2 db's after the @'s...

STANDBY_DB must be substituted with your STANDBY_DB instance name. After connect make sure your connected target database is your primary database connected to target database: PRIMARY_DB (DBID=4135917300) auxiliary database Password: connected to auxiliary database: STANDBY_DB (not mounted). Note that your physical standby database is listed as not mounted primary database. If you see the same information as in target database, chances are that you are connected twice to your primary database. In that case we would create a 100% copy and not a physical standby database. So make sure you are using the right Standby Instance (Data Guard Instance).

  • Example: rman target sys/????@DWPROD5 auxiliary sys/????@DWPROD5STANDBY

Recovery Manager: Release - Production on Thu Mar 11 10:18:55 2021 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. connected to target database: DWPROD5 (DBID=3110128211) connected to auxiliary database: DWPROD5 (not mounted)

7. Before you start, do a force log switch:

  • RMAN> sql 'alter system archive log current';

8. Now we are going to start the full replication of our Physical Standby Database

RMAN> duplicate target database for standby from active database dorecover nofilenamecheck;

9. Now rman will perform a duplication of your physical standby database. Depending on your datafile size, this can take from a few hours to open end.

10. After rman is finished you can exit rman.

11. Reconnect to your physical standby database and shut it down:

  • SQL> shutdown immediate;

  • per SIGDBA, run $ORACLE_HOME/bin/dbstart1 which should identify the db instance type and start it up correctly.
  • Note: What script is doing for active standby "A" (report clones) there is also a "S" for non-active standby (Degree Works standby)...
  • startup mount

alter database open read only; alter database recover managed standby database disconnect from session; EOF

  • if [ $? -eq 0 ] then
    • echo "" echo "Standby database \"${ORACLE_SID}\" warm started as Active Data Guard standby."

12. If you use flashback option,

  • SQL> startup mount; SQL> alter database flashback on;