Mar 27 2017

Oracle 11g R2 Multi Real Time Apply Data Guard Configuration Steps

Category: Administration,Backup And RecoveryFatih Acar @ 16:42

Oracle 11g R2 database supports multi standby database structure up to 30 standby databases. We can use remote destinations for real time apply standby structures with todays network technologies. If your remote destination network is not good, you can use archivelog apply for remote destination with some delay.

System informations are like below.

System Informations

PRIMARY DATABASE
VERSION : 11.2.0.3
IP : 192.168.9.129
SID : PRI
HOSTNAME : primary.localdomain

FIRST STANDBY DATABASE
VERSION : 11.2.0.3
IP : 192.168.9.130
SID : DR1
HOSTNAME : dr1.localdomain

SECOND STANDBY DATABASE
VERSION : 11.2.0.3
IP : 192.168.9.131
SID : DR2
HOSTNAME : dr2.localdomain

Assumptions

Primary database installed.
Primary database archivelog mode enabled.
Standby databases installed as only software.
Shh-Keygen connection configuration completed.

hosts file of all systems

192.168.9.129 primary.localdomain primary
192.168.9.130 dr1.localdomain dr1
192.168.9.131 dr2.localdomain dr2

Oracle User Bash Profiles

Primary Database Oracle User .bash_profile


#bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

# User specific environment and startup programs
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=primary.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=PRI; export ORACLE_UNQNAME
ORACLE_BASE=/oracle/db/11.2.0; export ORACLE_BASE
ORACLE_SID=PRI; export ORACLE_SID
ORACLE_HOME=/oracle/db/11.2.0/db_home; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
BASE_PATH=/usr/sbin:$PATH:$HOME/bin; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

alias home='cd /oracle/db/11.2.0/db_home'
alias sql='sqlplus / as sysdba'
alias alert_db='tail -100f /oracle/db/11.2.0/diag/rdbms/PRI/PRI/trace/alert_PRI.log'

 

First Standby Database Oracle User .bash_profile


#bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

# User specific environment and startup programs
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=dr1.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DR1; export ORACLE_UNQNAME
ORACLE_BASE=/oracle/db/11.2.0; export ORACLE_BASE
ORACLE_SID=DR1; export ORACLE_SID
ORACLE_HOME=/oracle/db/11.2.0/db_home; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
BASE_PATH=/usr/sbin:$PATH:$HOME/bin; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

alias home='cd /oracle/db/11.2.0/db_home'
alias sql='sqlplus / as sysdba'
alias alert_db='tail -100f /oracle/db/11.2.0/diag/rdbms/dr1/DR1/trace/alert_DR1.log'

Second Standby Database Oracle User .bash_profile


#bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

# User specific environment and startup programs
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=dr2.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DR2; export ORACLE_UNQNAME
ORACLE_BASE=/oracle/db/11.2.0; export ORACLE_BASE
ORACLE_SID=DR2; export ORACLE_SID
ORACLE_HOME=/oracle/db/11.2.0/db_home; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
BASE_PATH=/usr/sbin:$PATH:$HOME/bin; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

alias home='cd /oracle/db/11.2.0/db_home'
alias sql='sqlplus / as sysdba'
alias alert_db='tail -100f /oracle/db/11.2.0/diag/rdbms/dr2/DR2/trace/alert_DR2.log'

Configuration Steps

1- Create Listener on Standby Sides

You can use netca assistant to create new listener. You have to configure like below after creating.

First Standby Database listener.ora file


SID_LIST_LISTENER=
	(SID_LIST=
		(SID_DESC=
			(GLOBAL_DBNAME=DR1)
			(ORACLE_HOME=/oracle/db/11.2.0/db_home)
			(SID_NAME=DR1)
		)
	)	

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dr1.localdomain)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /oracle/db/11.2.0

 

Second Standby Database listener.ora file


SID_LIST_LISTENER=
	(SID_LIST=
		(SID_DESC=
			(GLOBAL_DBNAME=DR2)
			(ORACLE_HOME=/oracle/db/11.2.0/db_home)
			(SID_NAME=DR2)
		)
	)

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dr2.localdomain)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /oracle/db/11.2.0

2- Create and Configure Tnsnames on All Sides

tnsnames.ora File on All Sides


PRI =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = primary.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = PRI)
    )
  )

DR1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dr1.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DR1)
    )
  )

DR2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dr2.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DR2)
    )
  )

3- Configure Parameters of Primary Database



SQL> alter system set remote_login_passwordfile=EXCLUSIVE scope=spfile;

System altered.

SQL> alter system set standby_file_management=AUTO scope=both;

System altered.

SQL> alter database force logging;

Database altered.

SQL> alter system set fal_client='PRI';

System altered.

SQL> alter system set fal_server='DR1','DR2';

System altered.

SQL> alter system set log_archive_config='DG_CONFIG=(PRI,DR1,DR2)'; 

System altered.
SQL> alter system set log_archive_dest_1='LOCATION=/oracle/fra/PRI/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRI';   

System altered.

SQL> alter system set log_archive_dest_2='SERVICE=DR1 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=DR1';

System altered.

SQL> alter system set log_archive_dest_3='SERVICE=DR2 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=DR2';

System altered.



SQL> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area  818401280 bytes
Fixed Size		    2232800 bytes
Variable Size		  620760608 bytes
Database Buffers	  192937984 bytes
Redo Buffers		    2469888 bytes
Database mounted.
Database opened.

4- Copy Password File Of Primary Database to Standby Databases



[oracle@primary ~]$ scp /oracle/db/11.2.0/db_home/dbs/orapwPRI oracle@dr1:/oracle/db/11.2.0/db_home/dbs/orapwDR1
orapwPRI                                                                                                                                                                         100% 1536     1.5KB/s   00:00    
[oracle@primary ~]$ scp /oracle/db/11.2.0/db_home/dbs/orapwPRI oracle@dr2:/oracle/db/11.2.0/db_home/dbs/orapwDR2
orapwdDR1
orapwPRI                                                                                                                                                                         100% 1536     1.5KB/s   00:00

5- Standby Databases Auto Open Disable



Add below line to /etc/oratab file on all standby server.

[oracle@dr1 ~] vi /etc/oratab

DR1:/oracle/db/11.2.0/db_home:N

[oracle@dr2 ~] vi /etc/oratab

DR2:/oracle/db/11.2.0/db_home:N     

6- Configure Parameter Files

You can export pfile like below command from primary database.


SQL> create pfile='/tmp/pfile.ora' from spfile;

You have to configure pfile files for standby databases. In the last case, your datafiles can be like below. Parameters can vary depending on your system.

Primary Database Parameter File


   
PRI.__db_cache_size=226492416
PRI.__java_pool_size=4194304
PRI.__large_pool_size=4194304
PRI.__oracle_base='/oracle/db/11.2.0'#ORACLE_BASE set from environment
PRI.__pga_aggregate_target=285212672
PRI.__sga_target=536870912
PRI.__shared_io_pool_size=0
PRI.__shared_pool_size=289406976
PRI.__streams_pool_size=4194304
*.audit_file_dest='/oracle/db/11.2.0/admin/PRI/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/oracle/data/PRI/control01.ctl','/oracle/db/11.2.0/fast_recovery_area/PRI/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='PRI'
*.db_recovery_file_dest='/oracle/fra'
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest='/oracle/db/11.2.0'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=PRIXDB)'
*.fal_client='PRI'
*.fal_server='DR1','DR2'
*.job_queue_processes=1000
*.log_archive_config='DG_CONFIG=(PRI,DR1,DR2)'
*.log_archive_dest_1='LOCATION=/oracle/fra/PRI/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRI'
*.log_archive_dest_2='SERVICE=DR1 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=DR1'
*.log_archive_dest_2='SERVICE=DR2 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=DR2'
*.memory_target=821035008
*.archive_lag_target=900
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'

First Standby Database Parameter File


   
DR1.__db_cache_size=226492416
DR1.__java_pool_size=4194304
DR1.__large_pool_size=4194304
DR1.__oracle_base='/oracle/db/11.2.0'#ORACLE_BASE set from environment
DR1.__pga_aggregate_target=285212672
DR1.__sga_target=536870912
DR1.__shared_io_pool_size=0
DR1.__shared_pool_size=289406976
DR1.__streams_pool_size=4194304
*.audit_file_dest='/oracle/db/11.2.0/admin/DR1/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/oracle/data/DR1/control01.ctl','/oracle/fra/DR1/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_unique_name='DR1'
*.db_name='PRI'
*.db_recovery_file_dest='/oracle/fra'
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest='/oracle/db/11.2.0'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DR1XDB)'
*.fal_client='DR1'
*.fal_server='PRI','DR2'
*.job_queue_processes=1000
*.log_archive_config='DG_CONFIG=(PRI,DR1,DR2)'
*.log_archive_dest_1='LOCATION=/oracle/fra/DR1/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DR1'
*.log_archive_dest_2='SERVICE=PRI LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=PRI'
*.log_archive_dest_3='SERVICE=DR2 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=DR2'
*.db_file_name_convert='/oracle/data/PRI','/oracle/data/DR1','/oracle/fra/PRI','/oracle/fra/DR1'
*.log_file_name_convert='/oracle/data/PRI','/oracle/data/DR1','/oracle/fra/PRI','/oracle/fra/DR1'
*.service_names='DR1' *.memory_target=821035008 *.open_cursors=300 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.standby_file_management='AUTO' *.undo_tablespace='UNDOTBS1'

Second Standby Database Parameter File


   
DR2.__db_cache_size=226492416
DR2.__java_pool_size=4194304
DR2.__large_pool_size=4194304
DR2.__oracle_base='/oracle/db/11.2.0'#ORACLE_BASE set from environment
DR2.__pga_aggregate_target=285212672
DR2.__sga_target=536870912
DR2.__shared_io_pool_size=0
DR2.__shared_pool_size=289406976
DR2.__streams_pool_size=4194304
*.audit_file_dest='/oracle/db/11.2.0/admin/DR2/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/oracle/data/DR2/control01.ctl','/oracle/fra/DR2/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_unique_name='DR2'
*.db_name='PRI'
*.db_recovery_file_dest='/oracle/fra'
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest='/oracle/db/11.2.0'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DR2XDB)'
*.fal_client='DR2'
*.fal_server='PRI','DR1'
*.job_queue_processes=1000
*.log_archive_config='DG_CONFIG=(PRI,DR1,DR2)'
*.log_archive_dest_1='LOCATION=/oracle/fra/DR2/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DR2'
*.log_archive_dest_2='SERVICE=PRI LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=PRI'
*.log_archive_dest_3='SERVICE=DR1 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=DR1'
*.db_file_name_convert='/oracle/data/PRI','/oracle/data/DR2','/oracle/fra/PRI','/oracle/fra/DR2'
*.log_file_name_convert='/oracle/data/PRI','/oracle/data/DR2','/oracle/fra/PRI','/oracle/fra/DR2'
*.memory_target=821035008 *.open_cursors=300 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.standby_file_management='AUTO' *.undo_tablespace='UNDOTBS1' 

After changed parameters for your systems, you can create spfile on the standby databases from pfile like below.


SQL> create spfile from pfile='/tmp/pfile.ora';

7- Backup And Restore

Backup From Primary Database

Your backup directory have to be the same at primary and standby servers.


[oracle@primary ~] rman target /

RMAN> run {
ALLOCATE CHANNEL d1 TYPE DISK FORMAT '/oracle/backup/backup_pri_%d_s%s_p%p_%T' ;
backup as compressed backupset database plus archivelog;
backup current controlfile for standby format '/oracle/backup/controlfile_standby.ctl' ;
release channel d1;
}

Copy Backup Files to Standby Servers.

You can use scp command or ftp file transfer application to transport backups.

Restore First Standby Database


[oracle@dr1 ~] sqlplus / as sysdba
SQL> create spfile from pfile='/tmp/pfile.ora';
SQL> startup nomount;
SQL> exit;

[oracle@dr1 ~] rman target /

connected to target database: PRI (not mounted)

RMAN> restore standby controlfile from '/oracle/backup/controlfile_standby.ctl';

Starting restore at 02-MAR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/oracle/data/DR1/control01.ctl
output file name=/oracle/fra/DR1/control02.ctl
Finished restore at 02-MAR-17

RMAN> sql 'alter database mount standby database';

sql statement: alter database mount standby database
released channel: ORA_DISK_1

RMAN> restore database;

Starting restore at 02-MAR-17
Starting implicit crosscheck backup at 02-MAR-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=27 device type=DISK
Crosschecked 4 objects
Finished implicit crosscheck backup at 02-MAR-17

Starting implicit crosscheck copy at 02-MAR-17
using channel ORA_DISK_1
Finished implicit crosscheck copy at 02-MAR-17

searching for all files in the recovery area
cataloging files...
no files cataloged

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /oracle/data/DR1/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /oracle/data/DR1/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /oracle/data/DR1/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /oracle/data/DR1/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /oracle/data/DR1/example01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/backup/backup_pri_PRI_s2_p1_20170302
channel ORA_DISK_1: piece handle=/oracle/backup/backup_pri_PRI_s2_p1_20170302 tag=TAG20170302T170208
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 02-MAR-17

RMAN> recover database;

RMAN> exit;

[oracle@dr1 ~] sqlplus / as sysdba
SQL> shu immediate;
SQL> startup mount;

Restore Second Standby Database



The same steps like first standby restore and recovery steps.

8- Create Standby Log File

For real time apply you have to create standby log file at cascading standby database. This standby log files have to be the same size with redo log files and should be more 1 than redo log count.



Check primary redo log sizes and count with below.

[oracle@primary ~] sqlplus / as sysdba

SQL> select group#,bytes from v$log;
    GROUP#	BYTES
---------- ----------
	 1   52428800
	 2   52428800
	 3   52428800

You can see this example, 3 redo log files and 50 MB size. We have to add 4 standby log files and size has to be 50 MB.

Create standby log files at first and second standby database.

[oracle@dr1 ~] sqlplus / as sysdba

SQL> alter database add standby logfile size 50M;

Database altered.

SQL> alter database add standby logfile size 50M;

Database altered.

SQL> alter database add standby logfile size 50M;

Database altered.

SQL> alter database add standby logfile size 50M;

Database altered.

9- Start Listener

Standby Listeners have to be started state.

Start Listener



[oracle@dr1 dbs]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 22-MAR-2017 17:48:22

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

Starting /oracle/db/11.2.0/db_home/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /oracle/db/11.2.0/db_home/network/admin/listener.ora
Log messages written to /oracle/db/11.2.0/diag/tnslsnr/dr1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dr1.localdomain)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dr1.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                22-MAR-2017 17:48:22
Uptime                    0 days 0 hr. 0 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/db/11.2.0/db_home/network/admin/listener.ora
Listener Log File         /oracle/db/11.2.0/diag/tnslsnr/dr1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dr1.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "DR1" has 1 instance(s).
  Instance "DR1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


[oracle@dr2 ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 22-MAR-2017 17:51:22

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

Starting /oracle/db/11.2.0/db_home/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /oracle/db/11.2.0/db_home/network/admin/listener.ora
Log messages written to /oracle/db/11.2.0/diag/tnslsnr/dr2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dr2.localdomain)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dr2.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                22-MAR-2017 17:51:22
Uptime                    0 days 0 hr. 0 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/db/11.2.0/db_home/network/admin/listener.ora
Listener Log File         /oracle/db/11.2.0/diag/tnslsnr/dr2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dr2.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "DR2" has 1 instance(s).
  Instance "DR2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

10- Connect And Start Apply On All Standby Databases

In the last case the standby databases were in mount mode. We can use alter database open read only command.

First Standby Database



[oracle@dr1 dbs]$ sqlplus / as sysdba

SQL> alter database open read only;

Database altered.

SQL> alter database recover managed standby database using current logfile disconnect;

Database altered.

Second Standby Database



[oracle@dr2 dbs]$ sqlplus / as sysdba

SQL> alter database open read only;

Database altered.

SQL> alter database recover managed standby database using current logfile disconnect;

Database altered.

If you want to do switchover, you can use standart steps of switchover. You can find switchover steps here : http://www.fatihacar.com/blog/oracle-11g-r2-data-guard-manual-switchover-steps/

1,599 total views, 12 views today

Tags: Database Administration, Oracle Administration

facebook comments:

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.