facebook twitter youtube facebook facebook facebook

E-Mail : info@askmlabs.com

Phone : +1.215.353.8306

Home » , , » Creating Physical Standby Database With RMAN Duplicate

Creating Physical Standby Database With RMAN Duplicate

Written By askMLabs on Tuesday, December 20, 2011 | 12:56 PM

Setup:

Primary Site
Standby Site
Hostname
dgaskmpri01
dgaskmsby01
Database Name
orcl
orcl
Database Unique Name
orcl
sbyorcl
Net Service Name
orcl
sbyorcl

Primary Site Preparation :
1.      Enable Database Force Logging
2.      Create SRL (Standby Redo Logs)
3.      Modify Init.ora parameters
4.      Enable Archiving
5.      Backup Primary Database including archivelogs with RMAN
6.      Create a controlfile for Standby Database using RMAN
7.      Create a init.ora file for Standby Database
8.      Configure listener.ora and tnsnames.ora
9.      Copy RMAN backups and configuration files to Standby Server

Standby Site Preparation :
1.      Create a remote login password file ( if it is not copied from primary site )
2.      Create a directory structure
3.      Modify the init.ora parameter file
4.      Configure listener.ora and tnsnames.ora
5.      Verify connectivity

Creating Physical Standby Database :
1.      Create Physical Standby Database With RMAN Duplicate command
2.      Keep it in recovery

Verifications

Prepared By SRI




Primary Site Preparation :
1. Enable Database Force Logging:
SQL>  select FORCE_LOGGING from v$database;
SQL> ALTER DATABASE FORCE LOGGING;
2. Create SRL ( Standby Redo Logs):
You need to create SRL with the same size or greater size as of the online redo logs and also the number of SRLs should be one greater than the online redologs.
SQL> select name,user from v$database;
NAME      USER
--------- ------------------------------
ORCL      SYS
SQL> col group# for 9999
SQL> col member for a50
SQL> set linesize 120
SQL> select name,user from v$database;
NAME      USER
--------- ------------------------------
ORCL      SYS
SQL> select GROUP#,THREAD#,MEMBERS,BYTES FROM V$LOG;
GROUP#    THREAD#    MEMBERS      BYTES
------ ---------- ---------- ----------
     1          1          1   52428800
     2          1          1   52428800
     3          1          1   52428800
SQL> select group#,member from v$logfile;
GROUP# MEMBER
------ --------------------------------------------------
     3 /home/oracle/app/oracle/oradata/orcl/redo03.log
     2 /home/oracle/app/oracle/oradata/orcl/redo02.log
     1 /home/oracle/app/oracle/oradata/orcl/redo01.log
SQL> SELECT GROUP#, BYTES FROM V$STANDBY_LOG;
no rows selected
SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/home/oracle/app/oracle/oradata/orcl/s_redo01.log') SIZE 52428800;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/home/oracle/app/oracle/oradata/orcl/s_redo02.log') SIZE 52428800;
Database altered.
SQL> SELECT GROUP#, BYTES FROM V$STANDBY_LOG;
GROUP#      BYTES
------ ----------
     4   52428800
     5   52428800
SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/home/oracle/app/oracle/oradata/orcl/s_redo03.log') SIZE 52428800;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/home/oracle/app/oracle/oradata/orcl/s_redo04.log') SIZE 52428800;
Database altered.
SQL> SELECT GROUP#, BYTES FROM V$STANDBY_LOG;
GROUP#      BYTES
------ ----------
     4   52428800
     5   52428800
     6   52428800
     7   52428800
SQL>

3. Modify the init.ora parameters:

Modify the init.ora parameters on the primary database side to reflect the following values. If you are using spfile, you can add these parameter online without shutting down the primary database.

DB_NAME=orcl
DB_UNIQUE_NAME=orcl
LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,sbyorcl)'
LOG_ARCHIVE_DEST_1='LOCATION=/home/oracle/app/oracle/flash_recovery_area/orcl/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl'
LOG_ARCHIVE_DEST_2='SERVICE=sbyorcl ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=sbyorcl'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
FAL_SERVER=sbyorcl
DB_FILE_NAME_CONVERT='sbyorcl','orcl'
LOG_FILE_NAME_CONVERT='/home/oracle/app/oracle/flash_recovery_area/sbyorcl/','/home/oracle/app/oracle/flash_recovery_area/orcl/'
STANDBY_FILE_MANAGEMENT=AUTO

4. Enable Archiving :
Make sure that your database is running in archive log mode. Because in a physical standby setup all the redologs generated on the primary database will be transferred to standby site and applied to the standby database.
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.

Total System Global Area  456146944 bytes
Fixed Size                  1344840 bytes
Variable Size             381684408 bytes
Database Buffers           67108864 bytes
Redo Buffers                6008832 bytes
Database mounted.
SQL> ALTER DATABASE ARCHIVELOG;

Database altered.

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /home/oracle/app/oracle/flash_recovery_area/orcl/
Oldest online log sequence     360
Next log sequence to archive   362
Current log sequence           362
SQL>
  
5. Backup Primary Database Including Archive Logs With RMAN:
In this demo I am using RMAN to backup database. We will also include archive logs in the same backups. This RMAN database backup along with archive logs will be transferred to standby server and used for RMAN duplication to create a  standby database. There is another options like RMAN duplicate from active database to create physical standby database without even having the primary database backup in 11g. But in this article I am showing RMAN duplication with primary database backups. To know the step by step instruction to create a physical standby database with RMAN duplicate command without having primary database backups, follow my next articles <place holder>.
Create a temporary directory (/tmp/askm/) on primary server to keep all RMAN backups.
[oracle@dgaskmpri01 orcl]$ rman target /
Recovery Manager: Release 11.2.0.2.0 - Production on Mon Nov 21 05:08:01 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1229390655)
RMAN> run {
2> allocate channel t1 type disk format '/tmp/askm/%U';
3> backup database plus archivelog;
4> }

using target database control file instead of recovery catalog
allocated channel: t1
channel t1: SID=79 device type=DISK

…..
…. 
6. Create a controlfile for Standby Database Using RMAN :

RMAN> run {
2> allocate channel t1 type disk format '/tmp/askm/%U';
3> backup current controlfile for standby;
4> }

allocated channel: t1
channel t1: SID=79 device type=DISK

…….
……

7. Create a init.ora file for Standby Database:

SQL> CREATE PFILE='/tmp/askm/initsbyorcl.ora' FROM SPFILE;

File created.

8. Configure listener.ora and tnsnames.ora:
[oracle@dgaskmpri01 admin]$ cat listener.ora
LISTENER_PRI =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1525))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dgaskmpri01.localdomain)(PORT = 1525))
    )
  )

SID_LIST_LISTENER_PRI =
  (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_2)
      (SID_NAME = orcl)
    )
  )
[oracle@dgaskmpri01 admin]$ cat tnsnames.ora
orcl =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dgaskmpri01.localdomain)(PORT = 1525))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID=orcl)
    )
  )

sbyorcl =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dgaskmsby01.localdomain)(PORT = 1525))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID=sbyorcl)
    )
  )
[oracle@dgaskmpri01 admin]$

9.  Copy RMAN backups and configuration files to Standby Server:
Create a temporary directory(/tmp/askm) on standby server and copy RMAN backup pieces, init.ora, password file(orapwsbyorcl) and standby controlfile (created with RMAN) from primary server to standby server.

Standby Site Preparation :
1. Create a remote login password file ( if it is not copied from primary site )
Copy the password file /tmp/askm/orapwsbyorcl to $ORACLE_HOME/dbs
2. Create a directory structure
If you are using a different directory structure on the standby server, they you need to create all the directories on the standby site. Copy initsbyorcl.ora to $ORACLE_HOME/dbs location.
[oracle@dgaskmsby01]$ mkdir /home/oracle/app/oracle/oradata/sbyorcl/
[oracle@dgaskmsby01]$ mkdir /home/oracle/app/oracle/flash_recovery_area/sbyorcl/
[oracle@dgaskmsby01]$ cd $ORACLE_HOME/dbs
[oracle@dgaskmsby01 sbyorcl]$ cp /tmp/askm/initsbyorcl.ora $ORACLE_HOME/dbs
3.      Modify the init.ora parameter file
Modify the initsbyorcl.ora file to reflect the following initialization parameters.

DB_NAME=orcl
DB_UNIQUE_NAME=sbyorcl
LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,sbyorcl)'
CONTROL_FILES='/home/oracle/app/oracle/oradata/sbyorcl/s_control01.ctl', '/home/oracle/app/oracle/flash_recovery_area/sbyorcl/s_control02.ctl'
DB_FILE_NAME_CONVERT='orcl','sbyorcl'
LOG_FILE_NAME_CONVERT='/home/oracle/app/oracle/flash_recovery_area/orcl/','/home/oracle/app/oracle/flash_recovery_area/sbyorcl/'
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_DEST_1='LOCATION=/home/oracle/app/oracle/flash_recovery_area/sbyorcl/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=sbyorcl'
LOG_ARCHIVE_DEST_2='SERVICE=orcl ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
STANDBY_FILE_MANAGEMENT=AUTO
FAL_SERVER=orcl

4. Configure listener.ora and tnsnames.ora:
[oracle@dgaskmsby01 admin]$ cat listener.ora
LISTENER_SBY =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1525))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dgaskmsby01.localdomain)(PORT = 1525))
    )
  )

SID_LIST_LISTENER_SBY =
  (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_2)
      (SID_NAME = sbyorcl)
    )
  )
[oracle@dgaskmsby01 admin]$ cat tnsnames.ora
orcl =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dgaskmpri01.localdomain)(PORT = 1525))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID=orcl)
    )
  )

sbyorcl =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dgaskmsby01.localdomain)(PORT = 1525))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID=sbyorcl)
    )
  )
[oracle@dgaskmsby01 admin]$

5.Verify connectivity
On Primary Server:
[oracle@dgaskmpri01]$ lsnrctl stop LISTENER_PRI
[oracle@dgaskmpri01]$ lsnrctl start LISTENER_PRI
[oracle@dgaskmpri01]$ tnsping orcl
[oracle@dgaskmpri01]$ tnsping sbyorcl
[oracle@dgaskmpri01]$ sqlplus sys/xxxxx@orcl
[oracle@dgaskmpri01]$ sqlplus sys/xxxxx@sbyorcl

On Standby Server:
[oracle@dgaskmsby01]$ lsnrctl stop LISTENER_SBY
[oracle@dgaskmsby01]$ lsnrctl start LISTENER_SBY
[oracle@dgaskmsby01]$ tnsping orcl
[oracle@dgaskmsby01]$ tnsping sbyorcl
[oracle@dgaskmsby01]$ sqlplus sys/xxxxx@orcl
[oracle@dgaskmsby01]$ sqlplus sys/xxxxx@sbyorcl


Creating Physical Standby Database :
1. Create Physical Standby Database Using RMAN Duplicate Command :

I assume that I don’t have any catalog database and I will execute the following duplicate command on my standby server.
[oracle@dgaskmsby01 sbyorcl]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.2.0 Production on Mon Nov 21 06:18:37 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount ORACLE instance started.
Total System Global Area  456146944 bytes
Fixed Size                  1344840 bytes
Variable Size             322964152 bytes
Database Buffers          125829120 bytes
Redo Buffers                6008832 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@dgaskmsby01 sbyorcl]$ rman target sys/oracle@orcl auxiliary /

Recovery Manager: Release 11.2.0.2.0 - Production on Mon Nov 21 06:19:02 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1229390655)
connected to auxiliary database: ORCL (not mounted)

RMAN> duplicate target database for standby dorecover;
Starting Duplicate Db at 21-NOV-11
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK

contents of Memory Script:
{
   set until scn  8516736;
   restore clone standby controlfile;
}
executing Memory Script

executing command: SET until clause
Starting restore at 21-NOV-11
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /tmp/askm/07ms6f0f_1_1
channel ORA_AUX_DISK_1: piece handle=/tmp/askm/07ms6f0f_1_1 tag=TAG20111121T052015
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/home/oracle/app/oracle/oradata/sbyorcl/s_control01.ctl
output file name=/home/oracle/app/oracle/flash_recovery_area/sbyorcl/s_control02.ctl
Finished restore at 21-NOV-11

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database
contents of Memory Script:
{
   set until scn  8516736;
   set newname for tempfile  1 to
"/home/oracle/app/oracle/oradata/sbyorcl/temp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to
"/home/oracle/app/oracle/oradata/sbyorcl/system01.dbf";
   set newname for datafile  2 to
"/home/oracle/app/oracle/oradata/sbyorcl/sysaux01.dbf";
   set newname for datafile  3 to
"/home/oracle/app/oracle/oradata/sbyorcl/undotbs01.dbf";
   set newname for datafile  4 to
"/home/oracle/app/oracle/oradata/sbyorcl/users01.dbf";
   set newname for datafile  5 to
"/home/oracle/app/oracle/oradata/sbyorcl/example01.dbf";
   set newname for datafile  6 to
"/home/oracle/app/oracle/oradata/sbyorcl/APEX_1246426611663638.dbf";
   set newname for datafile  7 to
"/home/oracle/app/oracle/oradata/sbyorcl/APEX_1265209995679366.dbf";
   restore
   clone database
   ;
}
executing Memory Script

executing command: SET until clause
executing command: SET NEWNAME
renamed tempfile 1 to /home/oracle/app/oracle/oradata/sbyorcl/temp01.dbf in control file
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 restore at 21-NOV-11
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /home/oracle/app/oracle/oradata/sbyorcl/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /home/oracle/app/oracle/oradata/sbyorcl/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /home/oracle/app/oracle/oradata/sbyorcl/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /home/oracle/app/oracle/oradata/sbyorcl/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /home/oracle/app/oracle/oradata/sbyorcl/example01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /home/oracle/app/oracle/oradata/sbyorcl/APEX_1246426611663638.dbf
channel ORA_AUX_DISK_1: restoring datafile 00007 to /home/oracle/app/oracle/oradata/sbyorcl/APEX_1265209995679366.dbf
channel ORA_AUX_DISK_1: reading from backup piece /tmp/askm/04ms6ebl_1_1
channel ORA_AUX_DISK_1: piece handle=/tmp/askm/04ms6ebl_1_1 tag=TAG20111121T050908
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:06:38
Finished restore at 21-NOV-11

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=3 STAMP=767781512 file name=/home/oracle/app/oracle/oradata/sbyorcl/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=4 STAMP=767781512 file name=/home/oracle/app/oracle/oradata/sbyorcl/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=5 STAMP=767781512 file name=/home/oracle/app/oracle/oradata/sbyorcl/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=6 STAMP=767781512 file name=/home/oracle/app/oracle/oradata/sbyorcl/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=7 STAMP=767781512 file name=/home/oracle/app/oracle/oradata/sbyorcl/example01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=8 STAMP=767781512 file name=/home/oracle/app/oracle/oradata/sbyorcl/APEX_1246426611663638.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=9 STAMP=767781512 file name=/home/oracle/app/oracle/oradata/sbyorcl/APEX_1265209995679366.dbf

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

executing command: SET until clause
Starting recover at 21-NOV-11
using channel ORA_AUX_DISK_1

starting media recovery
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=453
.....
.....
.....
archived log file name=/home/oracle/app/oracle/flash_recovery_area/sbyorcl/1_512_701609923.arc thread=1 sequence=512
channel clone_default: deleting archived log(s)
archived log file name=/home/oracle/app/oracle/flash_recovery_area/sbyorcl/1_512_701609923.arc RECID=59 STAMP=767781543
archived log file name=/home/oracle/app/oracle/flash_recovery_area/sbyorcl/1_513_701609923.arc thread=1 sequence=513
channel clone_default: deleting archived log(s)
archived log file name=/home/oracle/app/oracle/flash_recovery_area/sbyorcl/1_513_701609923.arc RECID=5 STAMP=767781541
media recovery complete, elapsed time: 00:00:26
Finished recover at 21-NOV-11 ORACLE error from auxiliary database: ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is automatic.

RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is automatic.

RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is automatic.

RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is automatic.

RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is automatic.

RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is automatic.

RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is automatic.

RMAN-05535: WARNING: All redo log files were not defined properly.
Finished Duplicate Db at 21-NOV-11

RMAN>
Note : You can ignore the above warning messages in the session log as these are due to the parameter STANDBY_FILE_MANAGEMENT is set to AUTO.
2. Keep it in recovery:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

Verifications :
On Standby:
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
On Primary :
Do some redo log switches
SQL> ALTER SYSTEM SWITCH LOGFILE;
On Standby:
  Verify that the recent archived log file is shifted to standby side and applied with the following commands.
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

Other Useful Information:
To verify all the init.ora parameter in a single command:
egrep -i "DB_NAME|DB_UNIQUE_NAME|LOG_ARCHIVE_CONFIG|CONTROL_FILES|LOG_ARCHIVE_DEST_1|
LOG_ARCHIVE_DEST_2|LOG_ARCHIVE_DEST_STATE_1|LOG_ARCHIVE_DEST_STATE_2|
REMOTE_LOGIN_PASSWORDFILE|LOG_ARCHIVE_FORMAT|LOG_ARCHIVE_MAX_PROCESSES|
FAL_SERVER|DB_FILE_NAME_CONVERT|LOG_FILE_NAME_CONVERT|STANDBY_FILE_MANAGEMENT" <specify init.ora parameter file>

To Cancel the Standby Recovery Mode:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Useful commands To Troubleshoot:
select message from v$dataguard_status where dest_id = 2;
select archived_thread#, archived_seq#, applied_thread#, applied_seq# from v$archive_dest_status;
select registrar, creator, thread#, sequence#, first_change#, next_change# from v$archived_log;
select thread#, sequence#, first_change#, next_change# from v$log_history;

To Verify Recover Process On Standby:
select thread#, sequence# from v$log where status='CURRENT';  = >  On Primary
select thread#, sequence#, status from v$managed_standby where process='MRP0'; = > On Standby

References :
MOS ID : 789370.1
Hope It Helps
SRI


Share this article :

Related Articles By Category



+ comments + 5 comments

Latif
July 12, 2012 at 10:25 AM

Hi,

Does this step applicable to Oracle 9i version?

Regards
Latib

learnwithme11g
August 15, 2012 at 6:51 AM

Hi Latif,
Yes, you have this feature in 9i also. Please refer to this link : http://docs.oracle.com/cd/B10500_01/server.920/a96566/rcmstand.htm

fernando
February 7, 2013 at 12:02 AM

Mr,

Good lessons about Data Guard Standby database

March 1, 2013 at 5:08 PM

Hi,
is this valid for Standard Edition too ?
Thanks,

Paolo

Wendy
September 13, 2013 at 9:05 PM

Very good and useful lesson. But I have the primary database on RAC, and will build a standby database on single server. I have problem(no understand) how to configure listener.ora and tnsname.ora file on both site. Can you address this question?

Post a Comment

Thank you for visiting our site and leaving your valuable comment.

 
Support :
Copyright © 2013. askMLabs - All Rights Reserved
Proudly powered by Blogger