Differences between revisions 6 and 7
Revision 6 as of 2019-01-08 10:12:02
Size: 2625
Editor: dngong
Comment:
Revision 7 as of 2019-07-11 09:41:27
Size: 2551
Editor: dngong
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#acl DatabaseGroup:read,write,delete,revert All:read
Line 3: Line 4:
'''RE-Duplicate Broken Physical Standby Database:'''
Line 5: Line 5:
 1. Shutdown the '''physical standby''' database
  . SQL> shutdown immediate;
ReDuplicateBrokenPhysicalStandbyDatabase
-----------------------------------------------------
1. Shutdown the physical standby database
Line 8: Line 9:
 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;
        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.
Line 13: Line 13:
 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
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
Line 16: Line 16:
STANDBY_DB must be substituted with your STANDBY_DB instance name. After connect make sure your connected target database is your primary database         SQL> startup nomount;
  
5. Now switch to your Primary Database Environment.
Line 18: Line 20:
'''connected to target database: PRIMARY_DB (DBID=4135917300)''' 6. Start your rman on your primary envoronment:
Line 20: Line 22:
'''auxiliary database Password:'''         rman target sys/password@PRIMARY_DB auxiliary sys/password@STANDBY_DB
  
Line 22: Line 25:
'''connected to auxiliary database: STANDBY_DB (not mounted)''' 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).
Line 24: Line 31:
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)'''. 7. Before you start, do a force log switch:
Line 26: Line 33:
 1. Before you start, do a force log switch:
  . RMAN> sql 'alter system archive log current';
        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;
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
        SQL> alter database recover managed standby database disconnect from session;
Line 29: Line 50:
 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;
Line 50: Line 52:

DB_Administration

HelpdeskDocsTemplate/logo.png HelpdeskDocsTemplate/UTS.png

ReDuplicateBrokenPhysicalStandbyDatabase


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

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;

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

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

DataAdminHowTo