Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2019-01-07 16:45:56
Size: 36
Editor: dngong
Comment:
Revision 6 as of 2019-01-08 10:12:02
Size: 2625
Editor: dngong
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
           SQL>shutdown immediate; {{attachment:HelpdeskDocsTemplate/logo.png}} {{attachment:HelpdeskDocsTemplate/UTS.png}}

'''RE-Duplicate Broken Physical Standby Database:'''

 1. Shutdown the '''physical standby''' database
  . SQL> shutdown immediate;

 1. (Optional, safer in case of failure) Backup all datafiles (*.dbf), redologs, archive logs, online logs, flashback logs and control files that are used by the shut down instance.
 1. '''In Standby DB Server,''' Delete all datafiles (*.dbf), redologs, archive logs, online logs, flashback logs and control files in their referenced locations, but make sure to keep the directories.
 1. Start up your '''Physical Standby Database''' with '''__NOMOUNT-Option__'''
  . SQL> startup nomount;

 1. Now switch to your '''__Primary Database Environment.__'''
 1. Start your rman on you primary envoronment: rman target sys/password@PRIMARY_DB auxiliary sys/password@STANDBY_DB

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)'''.

 1. Before you start, do a force log switch:
  . RMAN> sql 'alter system archive log current';

 1. 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;

 1. 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.
 1. After rman is finished you can exit rman.
 1. Reconnect to your physical standby database and shut it down:
  . SQL> shutdown immediate;

12. If you use flashback option,

SQL> startup mount;

 . SQL> alter database flashback on;

If not just startup mount.

13. In the Standby DB, Run the command below to start applying logs to the standby.

SQL> alter database recover managed standby database disconnect from session;

DataAdminHowTo

DB_Administration

HelpdeskDocsTemplate/logo.png HelpdeskDocsTemplate/UTS.png

RE-Duplicate Broken Physical Standby Database:

  1. Shutdown the physical standby database

    • SQL> shutdown immediate;

  2. (Optional, safer in case of failure) Backup all datafiles (*.dbf), redologs, 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, 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 you primary envoronment: rman target sys/password@PRIMARY_DB auxiliary sys/password@STANDBY_DB

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).

  1. Before you start, do a force log switch:
    • RMAN> sql 'alter system archive log current';

  2. 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;

  3. 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.
  4. After rman is finished you can exit rman.
  5. Reconnect to your physical standby database and shut it down:
    • SQL> shutdown immediate;

12. If you use flashback option,

SQL> startup mount;

  • SQL> alter database flashback on;

If not just startup mount.

13. In the Standby DB, Run the command below to start applying logs to the standby.

SQL> alter database recover managed standby database disconnect from session;

DataAdminHowTo

DB_Administration