Hai, in this
article I will demonstrate how to configure Active Dataguard with Example,
and other useful information from Dataguard.
Operating System: Linux 5.7_x64 Bit
Oracle Software : 11.2.0.1_x64 Bit
Assumptions:
Node
|
IP Address
|
DB Name, SID, Listener
|
db_unique_name, TNS Names
|
Port
|
Primary DB
|
192.168.1.11
|
DELL
|
DELL_LIVE
|
1529
|
Standby DB
|
192.168.1.12
|
DELL
|
DELL_STBY
|
1528
|
RAC 1 (Primary)
Machine Database DELL is installed
RAC 2 (Machine)
Installed only Oracle Software
Mandatory
requirements:
1. Oracle database
Version should be min 11gR2 (Duplicate Command will not work for
11gR1)
2. PRAMETER file should
be in SPFILE
3. DBNAME, SID,TNS
should be defined in Uppercase (Case sensitive)
4. Password
file(orapwDELL) should be on both locations with same password
5. All directory
available with valid permissions
6. Auxiliary database
should connect as “not mounted”
7. Enable “Flashback” for "STANDBY" after
executing "DUPLICATE" command.
Directory and env.
File for PRIMARY and STANDBY
RAC-1 PRIMARY
|
RAC-2 STANDBY
|
mkdir -p
/u01/app/oracle/DELL/arch/
mkdir -p
/u01/app/oracle/flash_recovery_area/
chown –R oracle:oinstall
/u01
chmod –R 775 /u01
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ vi dell.env
export ORACLE_SID=DELL
export
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export
TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib/usr/lib;
export LD_LIBRARY_PATH
|
mkdir -p
/u01/app/oracle/DELL/arch/
mkdir -p
/u01/app/oracle/flash_recovery_area/
chown –R oracle:oinstall
/u01
chmod –R 775 /u01
[root@rac2 ~]# su - oracle
[oracle@rac2 ~]$ vi dell.env
export ORACLE_SID=DELL
export
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export
TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib/usr/lib;
export LD_LIBRARY_PATH
|
PARAMTER, Listener, tnsnames,sqlnet.ora files for PRIMARY and STANDBY:
RAC-1 PRIMARY
|
RAC-2 STANDBY
|
Create pfile from spfile and then add below parameters for PRIMARY
[oracle@rac1 dbs]$ vi initDELL.ora
#--paste the parameters in notepad without option Word Wrap and then copy to your pfile
#--addnl
prameter for PRIMARY
*.db_flashback_retention_target=4320
*.db_recovery_file_dest_size=42949672960
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_unique_name='DELL_LIVE'
*.global_names=TRUE
*.local_listener='DELL'
#
*.log_archive_dest_1='location="/u01/app/oracle/DELL/arch"','valid_for=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=DELL_LIVE'
#
*.log_archive_dest_2='service="DELL_STBY"','ASYNC
NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1
reopen=300 db_unique_name="DELL_STBY"
net_timeout=30','valid_for=(online_logfile,all_roles)'
#
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_trace=0
*.log_archive_format='arch%s%t%r.arc'
*.archive_lag_target=0
*.log_archive_max_processes=30
*.log_archive_min_succeed_dest=1
*.db_file_name_convert='DELL_STBY','DELL_LIVE'
*.log_file_name_convert='DELL_STBY','DELL_LIVE'
*.log_archive_config='dg_config=(DELL_LIVE,DELL_STBY)'
*.fal_client='DELL_LIVE'
*.fal_server='DELL_STBY'
*.standby_file_management='AUTO'
###----DG
Broker Parameters----###
*.dg_broker_config_file1='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr1.dat'
*.dg_broker_config_file2='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr2.dat'
*.dg_broker_start=TRUE
|
Create New Pfile using vi-editor and add the below parameters for STANDBY
[oracle@rac2 dbs]$ vi initDELL.ora
#--paste the parameters in notepad without option Word Wrap and then copy to your pfile
#--addnl
parameters for STANDBY
*.db_name='DELL'
*.db_unique_name='DELL_STBY'
*.db_recovery_file_dest_size=42949672960
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.global_names=TRUE
*.local_listener='DELL'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.diagnostic_dest='/u01/app/oracle'
*.memory_target=730857472
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
#
*.log_archive_dest_1='location="/u01/app/oracle/DELL/arch"','valid_for=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=DELL_STBY'
#
*.log_archive_dest_2=''
#
*.log_archive_trace=0
*.log_archive_format='arch%s%t%r.arc'
*.archive_lag_target=0
*.log_archive_max_processes=30
*.log_archive_min_succeed_dest=1
*.db_file_name_convert='DELL_LIVE','DELL_STBY'
*.log_file_name_convert='DELL_LIVE','DELL_STBY'
*.log_archive_config='dg_config=(DELL_LIVE,DELL_STBY)'
*.fal_client='DELL_STBY'
*.fal_server='DELL_LIVE'
*.standby_file_management='AUTO'
###----DG
Broker Parameters----###
*.dg_broker_config_file1='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr1.dat'
*.dg_broker_config_file2='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr2.dat'
*.dg_broker_start=TRUE
|
[oracle@rac1 admin]$ cat listener.ora
DELL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1529))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1529))
)
)
SID_LIST_DELL =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DELL_LIVE)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DELL)
)
(SID_DESC =
(GLOBAL_DBNAME = DELL_LIVE_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DELL)
)
)
INBOUND_CONNECT_TIMEOUT_DELL = 100
|
[oracle@rac2 admin]$ cat listener.ora
DELL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.12)(PORT = 1528))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1528))
)
)
SID_LIST_DELL =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DELL_STBY)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DELL)
)
(SID_DESC =
(GLOBAL_DBNAME = DELL_STBY_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DELL)
)
)
INBOUND_CONNECT_TIMEOUT_DELL = 100
|
[oracle@rac1 admin]$ cat tnsnames.ora
DELL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1529))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = DELL)
)
)
DELL_LIVE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1529))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DELL_LIVE)
(SID = DELL)
(UR=A)
)
)
DELL_STBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.12)(PORT = 1528))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DELL_STBY)
(SID = DELL)
(UR=A)
)
)
DELL_LIVE_DGMGRL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1529))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DELL_LIVE_DGMGRL)
(INSTANCE_NAME = DELL)
)
)
DELL_STBY_DGMGRL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.12)(PORT = 1528))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DELL_STBY_DGMGRL)
(INSTANCE_NAME = DELL)
)
)
|
[oracle@rac2 admin]$ cat tnsnames.ora
DELL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.12)(PORT = 1528))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = DELL)
)
)
DELL_LIVE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1529))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DELL_LIVE)
(SID= DELL)
(UR=A)
)
)
DELL_STBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.12)(PORT = 1528))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DELL_STBY)
(SID= DELL)
(UR=A)
)
)
DELL_LIVE_DGMGRL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1529))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DELL_LIVE_DGMGRL)
(INSTANCE_NAME=DELL)
)
)
DELL_STBY_DGMGRL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.12)(PORT = 1528))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DELL_STBY_DGMGRL)
(INSTANCE_NAME=DELL)
)
)
|
If required create and add following in sqlnet.ora on both Primary & Standby:
[oracle@rac2 admin]$ cat
sqlnet.ora
[oracle@rac1
admin]$ cat sqlnet.ora
MES.DIRECTORY_PATH=(TNSNAMES,
ONAMES, HOSTNAME)
SQLNET.EXPIRE_TIME=
10
SQLNET.INBOUND_CONNECT_TIMEOUT
=60
[oracle@rac1
admin]$
[oracle@rac1
admin]$
At step no 5.
Provide Same Administrative Password as sys for
password file
At step no 6.
(2) Use Common location /u01/app/oracle
At step no 7. Disable flash recovery, Archive in
GUI
Follow the
link for RDBMS Installation Guide from below link
PRIMARY DB (192.168.1.11)
[oracle@rac1
DELL]$
[oracle@rac1
DELL]$ cd $ORACLE_HOME/dbs/
[oracle@rac1
dbs]$ ll
total 24
-rw-rw---- 1
oracle oinstall 1544 Feb 2 19:49 hc_DBUA0.dat
-rw-rw---- 1
oracle oinstall 1544 Feb 2 19:50 hc_DELL.dat
-rw-r--r-- 1
oracle oinstall 2851 May 15 2009 init.ora
-rw-r----- 1
oracle oinstall 24 Feb 2 19:52 lkDELL
-rw-r----- 1
oracle oinstall 1536 Feb 2 19:53 orapwDELL
-rw-r----- 1
oracle oinstall 2560 Feb 2 19:55 spfileDELL.ora
[oracle@rac1
dbs]$ sqlplus / as sysdba
SQL*Plus:
Release 11.2.0.1.0 Production on Wed Mar 8 08:48:54 2017
Copyright (c)
1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle
Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the
Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> show parameter
pfile;
NAME
TYPE VALUE
---------------------------------
----------- ------------------------------
spfile
string
/u01/app/oracle/product/11.2.0
/dbhome_1/dbs/spfileDELL.ora
PRIMARY DB (192.168.1.11)
Create Pfile
& add Parameters & enable features
SQL>
SQL> create pfile from
spfile;
File created.
SQL> shut immediate
Database
closed.
Database
dismounted.
ORACLE
instance shut down.
SQL> exit
Disconnected
from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the
Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rac1
DELL]$ cd $ORACLE_HOME/dbs/
[oracle@rac1
dbs]$ ll
total 28
-rw-rw---- 1
oracle oinstall 1544 Feb 2 19:49 hc_DBUA0.dat
-rw-rw---- 1
oracle oinstall 1544 Feb 2 19:50 hc_DELL.dat
-rw-r--r-- 1
oracle oinstall 807 Feb 2 19:57 initDELL.ora
-rw-r--r-- 1
oracle oinstall 2851 May 15 2009 init.ora
-rw-r----- 1
oracle oinstall 24 Feb 2 19:52 lkDELL
-rw-r----- 1
oracle oinstall 1536 Feb 2 19:53 orapwDELL
-rw-r----- 1
oracle oinstall 2560 Feb 2 19:55 spfileDELL.ora
[oracle@rac1
dbs]$
[oracle@rac1
dbs]$ mv spfileDELL.ora bkp_spfileDELL.ora
[oracle@rac1
dbs]$ ll
total 28
-rw-r----- 1
oracle oinstall 2560 Feb 2 19:55 bkp_spfileDELL.ora
-rw-rw---- 1
oracle oinstall 1544 Feb 2 19:49 hc_DBUA0.dat
-rw-rw---- 1
oracle oinstall 1544 Feb 2 19:50 hc_DELL.dat
-rw-r--r-- 1
oracle oinstall 807 Feb 2 19:57 initDELL.ora
-rw-r--r-- 1
oracle oinstall 2851 May 15 2009 init.ora
-rw-r----- 1
oracle oinstall 24 Feb 2 19:52 lkDELL
-rw-r----- 1
oracle oinstall 1536 Feb 2 19:53 orapwDELL
[oracle@rac1
dbs]$
[oracle@rac1
dbs]$ orapwd file=orapwDELL password=sys force=y
[oracle@rac1
dbs]$ vi initDELL.ora ( Copy the above given PRIMARY init
parameters)
Enable the
following features for Database DELL
1.
Archive log
|
2.
Flashback database
|
3.
Force logging
|
4.
Adding standby redo logs
|
PRIMARY DB (192.168.1.11)
[oracle@rac1
dbs]$
[oracle@rac1
dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 14 11:03:25
2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
SQL> startup mount
Database
mounted.
SQL>
SQL> show parameter
spfile;
NAME
TYPE VALUE
----------------------------------
----------- ------------------------------
spfile
string
SQL>
orapwd file query from database:
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM CON_ID
------------------------------ ----- ----- ----- ----- ----- ----- ---------
SYS TRUE TRUE FALSE FALSE FALSE FALSE 0
SQL>
Checkout our
given parameters are loaded or not
SQL> show parameter fal;
NAME
TYPE VALUE
----------------------------------
----------- ------------------------------
fal_client
string
DELL_LIVE
fal_server
string DELL_STBY
1. Enable
archive log
SQL> archive log list
Database log
mode
No Archive Mode
Automatic
archival
Disabled
Archive
destination
/u01/app/oracle/DELL/arch
Oldest online
log sequence 1
Current log
sequence 2
SQL> alter database
archivelog;
Database
altered.
SQL> archive log list
Database log
mode Archive
Mode
Automatic
archival Enabled
Archive
destination
/u01/app/oracle/DELL/arch
Oldest online
log sequence 1
Next log
sequence to archive 2
Current log
sequence 2
SQL>
2. Enable
flashback
SQL>
SQL> select
LOG_MODE,FLASHBACK_ON,FORCE_LOGGING from v$database;
LOG_MODE
FLASHBACK_ON FOR
------------
------------------ ---
ARCHIVELOG NO
NO
SQL> alter database
flashback on;
Database
altered.
SQL> select
LOG_MODE,FLASHBACK_ON,FORCE_LOGGING from v$database;
LOG_MODE
FLASHBACK_ON FOR
------------
------------------ ---
ARCHIVELOG YES NO
SQL>
3. Enable Force
Logging
SQL> alter database
force logging;
Database
altered.
SQL> select
LOG_MODE,FLASHBACK_ON,FORCE_LOGGING from v$database;
LOG_MODE
FLASHBACK_ON FOR
------------
------------------ ---
ARCHIVELOG YES YES
SQL>
4. Add standby log files as per your requirements
SQL>
SQL> col MEMBER for a40
SQL> SELECT * FROM
V$LOGFILE;
GROUP# STATUS TYPE
MEMBER
IS_
----------
------- ------- ---------------------------------------- ---
3 ONLINE /u01/app/oracle/
DELL /redo03.log NO
2 ONLINE /u01/app/oracle/
DELL /redo02.log NO
1 ONLINE /u01/app/oracle/
DELL /redo01.log NO
SQL> select bytes from
v$standby_log;
no rows
selected
SQL> alter database add
standby logfile '/u01/app/oracle/DELL/stbyredo04.log' size 50M;
Database
altered.
SQL> alter database add
standby logfile '/u01/app/oracle/DELL/stbyredo05.log' size 50M;
Database
altered.
SQL> alter database add
standby logfile '/u01/app/oracle/DELL/stbyredo06.log' size 50M;
Database
altered.
SQL> col MEMBER for a40
SQL> SELECT * FROM
V$LOGFILE;
GROUP# STATUS TYPE
MEMBER
IS_
----------
------- ------- ---------------------------------------- ---
3 ONLINE
/u01/app/oracle/DELL/redo03.log
NO
2 ONLINE
/u01/app/oracle/DELL/redo02.log
NO
1 ONLINE
/u01/app/oracle/DELL/redo01.log
NO
4
STANDBY /u01/app/oracle/DELL/stbyredo04.log NO
5 STANDBY
/u01/app/oracle/DELL/stbyredo05.log NO
6 STANDBY
/u01/app/oracle/DELL/stbyredo06.log NO
6 rows
selected.
SQL>
SQL>
SQL> select bytes from
v$standby_log;
BYTES
----------
52428800
52428800
52428800
SQL>
All
requirement for dataguard prepared and enabled
Now start the
database with SPFILE.
SQL>
SQL> select status from
v$instance;
STATUS
------------
MOUNTED
SQL> alter database
open;
Database
altered.
SQL> show parameter
spfile;
NAME
TYPE VALUE
----------------------------------
----------- ------------------------------
spfile
string
Database is
using Pfile. So, create spfile from pfile and start
SQL>
SQL> create spfile from
pfile;
File created.
SQL> shut immediate;
Database
closed.
Database
dismounted.
ORACLE
instance shut down.
Now start the database with SPFILE
SQL>
SQL> startup
Database
mounted.
Database
opened.
SQL> show parameter
spfile;
NAME
TYPE VALUE
----------------------------------
----------- ------------------------------
spfile
string /u01/app/oracle/product/11.2.0
/dbhome_1/dbs/spfileDELL.ora
SQL>
SQL>
Open Alert log
for Primary database
SQL>
SQL> show parameter background_dump_dest
NAME TYPE VALUE
---------------------------------- -----------
------------------------------
background_dump_dest string /u01/app/oracle/diag/rdbms/del
l_live/DELL/trace
SQL>
SQL>
SQL> select value from v$diag_info where name='Diag Trace';
VALUE
--------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/dell _live/DELL/trace
Datafiles count:
SQL> select count(*) from v$dba_data_files;
SQL> select count(*) from v$database:
To check component list and last applied bundel patch
SQL> select comp_id,comp_name,version,status from dba_registry;
SQL>
SQL> select description from dba_registry_sqlpatch;Create Standby
Control file
SQL>
SQL> alter database
create standby controlfile as '/u01/app/oracle/DELL/stby.ctl';
Database
altered.
SQL> shut immediate
Database
closed.
Database
dismounted.
ORACLE
instance shut down.
SQL> exit
Disconnected
Copy CRD Files,
Parameter file, password file
[oracle@rac1
dbs]$
[oracle@rac1
dbs]$ cd /u01/app/oracle/DELL/
[oracle@rac1
DELL]$ ls
arch redo01.log stby.ctl stbyredo06.log temp01.dbf
control01.ctl redo02.log
stbyredo04.log sysaux01.dbf undotbs01.dbf
control02.ctl redo03.log
stbyredo05.log system01.dbf users01.dbf
[oracle@rac1
DELL]$ scp * oracle@rac2:/u01/app/oracle/DELL
The authenticity of host 'rac2 (192.168.1.12)' can't be
established.
RSA key fingerprint is
08:72:bd:5f:b1:0f:99:c4:ef:0b:b2:bc:3b:fe:6d:a1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.1.12' (RSA) to the list
of known hosts.
oracle@rac2's
password:
arch: not a
regular file
control01.ctl 100%
9520KB 9.3MB/s 00:00
control02.ctl 100%
9520KB 9.3MB/s 00:00
redo01.log 100% 50MB
25.0MB/s 00:02
redo02.log 100% 50MB
50.0MB/s 00:01
redo03.log 100% 50MB
50.0MB/s 00:01
stby.ctl 100%
9520KB 9.3MB/s 00:00
stbyredo04.log 100% 50MB
25.0MB/s 00:02
stbyredo05.log 100% 50MB
16.7MB/s 00:03
stbyredo06.log 100% 50MB
25.0MB/s 00:02
sysaux01.dbf 100% 440MB
22.0MB/s 00:20
system01.dbf 100% 670MB
31.9MB/s 00:21
temp01.dbf 100% 20MB
10.0MB/s 00:02
undotbs01.dbf 100% 30MB
30.0MB/s 00:01
users01.dbf 100%
5128KB 5.0MB/s 00:00
[oracle@rac1
DELL]$
[oracle@rac1 DELL]$ cd
$ORACLE_HOME/dbs
[oracle@rac1
dbs]$ scp orapwDELL oracle@rac2:$ORACLE_HOME/dbs
oracle@rac2's password:
orapwDELL 100% 1536 1.5KB/s
00:00
[oracle@rac1
dbs]$
Configure
Listener & tns on PRIME & STBY
PRIMARY DB (192.168.1.11)
[oracle@rac1
dbs]$
[oracle@rac1
dbs]$ cd $TNS_ADMIN
[oracle@rac1
admin]$ vi listener.ora ( Copy the above given Primary listener
parameter)
[oracle@rac1
admin]$ vi tnsnames.ora ( Copy the above given Primary tns parameter)
[oracle@rac1
admin]$
[oracle@rac1
admin]$ lsnrctl start dell
LSNRCTL for
Linux: Version 11.2.0.1.0 - Production on 07-MAR-2017 13:11:33
Copyright (c)
1991, 2011, Oracle. All rights reserved.
Starting
/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for
Linux: Version 11.2.0.1.0 - Production
System
parameter file is
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages
written to /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/rac1/dell/alert/log.xml
Listening on:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.11)(PORT=1529)))
Listening on:
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1529)))
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.11)(PORT=1529)))
STATUS of the
LISTENER
------------------------
Alias
dell
Version
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start
Date
07-MAR-2017 13:11:34
Uptime
0 days 0 hr. 0 min. 0 sec
Trace
Level
off
Security
ON: Local OS Authentication
SNMP
OFF
Listener
Parameter File
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log
File
/u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/rac1/dell/alert/log.xml
Listening
Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.11)(PORT=1529)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1529)))
Services
Summary...
Service "DELL_LIVE" has 1 instance(s).
Instance "DELL", status UNKNOWN, has 1 handler(s) for this service...
Service "DELL_LIVE_DGMGRL" has 1 instance(s).
Instance "DELL", status UNKNOWN, has 1 handler(s) for this service...
The command
completed successfully
[oracle@rac1
admin]$
Services with
name DELL_LIVE and DELL_LIVE_DGMRL started for Listener
[oracle@rac1
admin]$
[oracle@rac1
admin]$ tnsping dell
[oracle@rac1
admin]$ tnsping dell_live
[oracle@rac1
admin]$ tnsping dell_live_dgmgrl
[oracle@rac1
admin]$ tnsping dell_stby
STANDBY DB (192.168.1.12)
[oracle@rac2
DELL]$
[oracle@rac2
DELL]$ cd $TNS_ADMIN
[oracle@rac2
admin]$ vi listener.ora ( Copy the above given Standby listener
parameter)
[oracle@rac2
admin]$ vi tnsnames.ora ( Copy the above given Standby tns
parameter)
[oracle@rac2
admin]$ lsnrctl start dell
LSNRCTL for
Linux: Version 11.2.0.1.0 - Production on 07-MAR-2017 13:14:09
Copyright (c)
1991, 2011, Oracle. All rights reserved.
Starting
/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for
Linux: Version 11.2.0.1.0 - Production
System
parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages
written to
/u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/rac2/dell/alert/log.xml
Listening on:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.12)(PORT=1528)))
Listening on:
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1528)))
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.12)(PORT=1528)))
STATUS of the
LISTENER
------------------------
Alias
dell
Version
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start
Date
07-MAR-2017 13:14:09
Uptime
0 days 0 hr. 0 min. 0 sec
Trace
Level
off
Security
ON:
Local OS Authentication
SNMP
OFF
Listener
Parameter File
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log
File
/u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/rac2/dell/alert/log.xml
Listening
Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.12)(PORT=1528)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1528)))
Services
Summary...
Service "DELL_STBY" has 1 instance(s).
Instance
"DELL", status UNKNOWN, has 1 handler(s) for this service...
Service "DELL_STBY_DGMGRL" has 1 instance(s).
Instance "DELL", status UNKNOWN, has 1 handler(s) for this service...
The command
completed successfully
[oracle@rac2
admin]$
Services with
name DELL_STBY, DELL_STBY_DGMGRL started
[oracle@rac2
admin]$
[oracle@rac2
admin]$ tnsping dell
[oracle@rac2
admin]$ tnsping dell_live
[oracle@rac2
admin]$ tnsping dell_live_dgmgrl
[oracle@rac2
admin]$ tnsping dell_stby
[oracle@rac2
admin]$ tnsping dell_stby_dgmgrl
[oracle@rac2
admin]$ cd $ORACLE_HOME/dbs
Create new pfile for Standby Server
[oracle@rac2
dbs]$ vi initDELL.ora ( Copy the above given Standby init
parameter)
PRIMARY DB (192.168.1.11)
[oracle@rac1
admin]$
[oracle@rac1
admin]$ tnsping dell_stby
[oracle@rac1
admin]$ tnsping dell_stby_dgmgrl
STANDBY DB (192.168.1.12)
[oracle@rac2
DELL]$ cd
[oracle@rac2
~]$ . dell
[oracle@rac2
dbs]$ cd $ORACLE_HOME/dbs/
[oracle@rac2
dbs]$ vi initDELL.ora ( Copy the above given Standby init
parameter)
Create
necessary Directories as per Pfile
[oracle@rac2 dbs]$
[oracle@rac2 dbs]$
mkdir
-p /u01/app/oracle/flash_recovery_area
[oracle@rac2 dbs]$
[oracle@rac2 dbs]$
mkdir
-p /u01/app/oracle/DELL/arch
Start database
in nomount
[oracle@rac2
dbs]$
[oracle@rac2 dbs]$
sqlplus
/ as sysdba
Connected to
an idle instance.
SQL> startup nomount
pfile='initDELL.ora'
ORACLE
instance started.
SQL> show parameter
spfile;
NAME
TYPE VALUE
----------------------------------
----------- ------------------------------
spfile
string
SQL> show parameter
pfile;
NAME
TYPE VALUE
----------------------------------
----------- ------------------------------
spfile
string
SQL> create spfile from
pfile;
File created.
SQL> shut
ORACLE
instance shut down.
Start Standby
database in nomount state using spfile
SQL>
SQL> startup nomount
ORACLE
instance started.
SQL> show parameter
spfile;
NAME
TYPE VALUE
----------------------------------
----------- ------------------------------
spfile
string
/u01/app/oracle/product/11.2.0
/dbhome_1/dbs/spfileDELL.ora
SQL> show parameter
background_dump_dest
NAME
TYPE
VALUE
----------------------------------
----------- ------------------------------
background_dump_dest
string /u01/app/oracle/diag/rdbms/del
l_stby/DELL/trace
SQL>
Note: Open
tail for alert log of Standby in new window and keep on observing it till end
of DGMGRL
[root@rac2 ~]# tail -f
/u01/app/oracle/diag/rdbms/dell_stby/DELL/trace/alert_DELL.log
SQL> archive log list;
ORA-01507:
database not mounted
SQL> alter database mount standby database;
Database altered.
SQL> archive log list;
Database log mode
Archive Mode
Automatic archival
Enabled
Archive destination
/u01/app/oracle/DELL/arch
Oldest online log sequence
4
Next log sequence to archive
6
Current log sequence
6
SQL>
SQL>
SQL> set linesize 100;
SQL> col name for a6;col DB_UNIQUE_NAME for a8
SQL> col DB_UNIQUE_NAME for a10;
SQL> select NAME,DB_UNIQUE_NAME,CONTROLFILE_TYPE,OPEN_MODE,DATABASE_ROLE,PROTECTION_MODE, DATAGUARD_BROKER from v$database;
SQL> select NAME,CONTROLFILE_TYPE,OPEN_MODE from
v$database;
NAME CONTROL
OPEN_MODE
--------- ------- --------------------
DELL STANDBY MOUNTED
SQL>
SQL> alter database
open;
Standby database will be in HUNG MODE, until the Primary
Database is Brought UP
PRIMARY DB (192.168.1.11)
Open the
Primary Database and monitor both alert logs
[oracle@rac1 DELL]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 14 09:57:26
2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1043886080 bytes
Fixed Size
2219952 bytes
Variable Size
704643152 bytes
Database Buffers
331350016 bytes
Redo Buffers
5672960 bytes
Database mounted.
Database opened.
SQL>
SQL> archive log list;
Database log mode
Archive Mode
Automatic archival
Enabled
Archive destination
/u01/app/oracle/DELL/arch
Oldest online log sequence
6
Next log sequence to archive
8
Current log sequence
8
SQL>
STANDBY DB (192.168.1.12)
SQL>
Database altered.
SQL>
SQL> archive log list;
SQL> archive log list;
Database log mode
Archive Mode
Automatic archival
Enabled
Archive destination
/u01/app/oracle/DELL/arch
Oldest online log sequence
6
Next log sequence to archive
0
Current log sequence
8
SQL>
SQL> select NAME,CONTROLFILE_TYPE,OPEN_MODE from
v$database;
NAME CONTROL
OPEN_MODE
--------- ------- --------------------
DELL STANDBY READ
ONLY
SQL>
To determine if real-time apply is enabled,
SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;
RECOVERY_MODE
-----------------------
IDLE
32 rows selected.
SQL>
To Enable MRP
(Managed Standby Recovery process)
Without Real
Time Apply
SQL>
SQL> alter database recover managed standby database
disconnect;
Database altered.
SQL>
SQL> archive log list;
Database log mode
Archive Mode
Automatic archival
Enabled
Archive destination
/u01/app/oracle/DELL/arch
Oldest online log sequence
0
Next log sequence to archive
0
Current log sequence
0
SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;
RECOVERY_MODE
-----------------------
MANAGED
SQL>
SQL> select NAME,DB_UNIQUE_NAME,CONTROLFILE_TYPE,OPEN_MODE,DATABASE_ROLE,PROTECTION_MODE, DATAGUARD_BROKER from v$database;
SQL> select NAME,CONTROLFILE_TYPE,OPEN_MODE from
v$database;
NAME CONTROL
OPEN_MODE
--------- ------- --------------------
DELL STANDBY READ
ONLY WITH APPLY
SQL>
The
following is from Standby alertlog.
MRP0
started with pid=53, OS id=4647
MRP0:
Background Managed Standby Recovery process started (DELL)
Serial
Media Recovery started
Managed Standby Recovery not using
Real Time Apply
Waiting for
all non-current ORLs to be archived...
SQL> alter database recover managed standby database
cancel;
Database altered.
SQL> select NAME,DB_UNIQUE_NAME,CONTROLFILE_TYPE,OPEN_MODE,DATABASE_ROLE,PROTECTION_MODE, DATAGUARD_BROKER from v$database;
SQL> select NAME,CONTROLFILE_TYPE,OPEN_MODE from
v$database;
NAME CONTROL
OPEN_MODE
--------- ------- --------------------
DELL STANDBY READ ONLY
SQL> shut
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Database mounted.
Database opened.
SQL> archive log list;
Database log mode
Archive Mode
Automatic archival
Enabled
Archive destination
/u01/app/oracle/DELL/arch
Oldest online log sequence
0
Next log sequence to archive
0
Current log sequence
9
SQL> select NAME,DB_UNIQUE_NAME,CONTROLFILE_TYPE,OPEN_MODE,DATABASE_ROLE,PROTECTION_MODE, DATAGUARD_BROKER from v$database;
SQL> select NAME,CONTROLFILE_TYPE,OPEN_MODE from
v$database;
NAME CONTROL
OPEN_MODE
--------- ------- --------------------
DELL STANDBY READ
ONLY
SQL>
To Enable MRP
(Managed Standby Recovery process)
With Real Time
Apply
SQL>
SQL> startup
ORACLE instance started.
Database mounted.
Database opened.
SQL>
SQL> select NAME,DB_UNIQUE_NAME,CONTROLFILE_TYPE,OPEN_MODE,DATABASE_ROLE,PROTECTION_MODE, DATAGUARD_BROKER from v$database;
SQL> select NAME,CONTROLFILE_TYPE,OPEN_MODE from
v$database;
NAME CONTROL
OPEN_MODE
--------- ------- --------------------
DELL STANDBY READ
ONLY
SQL> archive log list;
Database log mode Archive Mode
Automatic archival
Enabled
Archive destination
/u01/app/oracle/DELL/arch
Oldest online log sequence
8
Next log sequence to archive
0
Current log sequence
10
SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;
RECOVERY_MODE
-----------------------
IDLE
SQL> alter database recover managed standby database using
current logfile disconnect;
Database altered.
SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;
RECOVERY_MODE
-----------------------
MANAGED REAL TIME APPLY
32 rows
selected.
SQL> select NAME,CONTROLFILE_TYPE,OPEN_MODE from
v$database;
NAME CONTROL
OPEN_MODE
--------- ------- --------------------
DELL STANDBY READ
ONLY WITH APPLY
SQL>
The
following is from Standby alertlog.
MRP0
started with pid=52, OS id=7537
MRP0:
Background Managed Standby Recovery process started (DELL)
Serial
Media Recovery started
Managed Standby Recovery starting Real
Time Apply
Waiting
for all non-current ORLs to be archived...
All
non-current ORLs have been archived.
PRIMARY DB (192.168.1.11)
Scenario for Real Time Apply
Perform any Data Definition Languages (DDL) such as CREATE, DROP and ALTER
Perform any Data Definition Languages (DDL) such as CREATE, DROP and ALTER
And verify result
on Standby Database
SQL>
SQL> grant connect, resource to u1 identified by u1;
Grant succeeded.
SQL>
SQL> conn u1/u1
Connected.
SQL> create table emp (EName varchar(15), ENo number);
Table created.
SQL> insert into emp (EName, ENo) values ('aaa',10);
1 row created.
SQL> commit;
Commit complete.
SQL> insert into emp (EName, ENo) values ('bbb',20);
1 row created.
SQL> insert into emp (EName, ENo) values ('ccc',30);
1 row created.
SQL> select * from emp;
ENAME ENO
--------------- ----------
aaa 10
bbb 20
ccc 30
SQL>
STANDBY DB (192.168.1.12)
SQL>
SQL> conn u1/u1
SQL> conn u1/u1
Connected.
SQL> select * from emp;
ENAME ENO
--------------- ----------
aaa 10
SQL>
Only the DDL Operations are
Reflected on Standby Side still waiting for DML operation to Commit.
Once it is commit is done on
Primary, and then it will reflect on Standby
PRIMARY DB (192.168.1.11)
Perform Commit on primary and verify the result on Standby for remaining 2 Records of Data Manipulation Language (DML) such as (insert, update, delete)
SQL>
SQL>
SQL> commit;
Commit complete.
SQL>
STANDBY DB (192.168.1.12)
SQL>
SQL> select * from emp;
SQL> select * from emp;
ENAME ENO
--------------- ----------
aaa 10
bbb 20
ccc 30
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release
11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
[oracle@rac2 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 14 12:03:34
2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 -
64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
SQL> alter database recover managed standby database
cancel;
Database altered.
SQL>
================================================================================================================
Other usefull commands of Dataguard
To determine if real-time apply is enabled
The Managed Recovery Process (MRP) applies information from the archived redo logs to the standby database. When performing managed recovery operations, log apply services automatically apply archived redo logs to maintain transactional synchronization with the primary database.
If log apply services are running, cancel them as shown in the following example:
SQL> alter database recover managed standby database
cancel;
Database altered.
SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;
RECOVERY_MODE
-----------------------
IDLE
SQL> alter database recover managed standby database
disconnect;
Database altered.
SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;
RECOVERY_MODE
-----------------------
MANAGED
SQL>
To start real-time apply, issue the following statement:
SQL> alter database recover managed standby database using
current logfile disconnect;
Database altered.
SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;
RECOVERY_MODE
-----------------------
MANAGED REAL TIME APPLY
32 rows
selected.
To start Redo Apply, issue the following statement:
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL>
SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;
RECOVERY_MODE
-----------------------
MANAGED_RECOVERY
To Determining Which Log Files Were Not
Received by the Standby Site?
SQL> SELECT LOCAL.THREAD#, LOCAL.SEQUENCE# FROM (SELECT
THREAD#, SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=1) LOCAL WHERE
LOCAL.SEQUENCE# NOT IN (SELECT SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=2
AND THREAD# = LOCAL.THREAD#);
THREAD# SEQUENCE#
---------- ----------
1 2
1 3
1 4
SQL>
On the standby database, query the V$ARCHIVED_LOG
view to identify existing files in the archived redo log.
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM
V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# FIRST_TIM
NEXT_TIME
---------- --------- ---------
5 14-DEC-17
14-DEC-17
6 14-DEC-17
14-DEC-17
7 14-DEC-17
14-DEC-17
8 14-DEC-17
14-DEC-17
9 14-DEC-17
14-DEC-17
10 14-DEC-17
14-DEC-17
6 rows selected.
SQL>
SQL> SELECT THREAD#, MAX(SEQUENCE#) AS
"LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;
THREAD#
LAST_APPLIED_LOG
---------- ----------------
1 10
SQL>
To Check the Message from dataguard
SQL> SELECT MESSAGE FROM V$DATAGUARD_STATUS;
Query the physical standby database to monitor
Redo Apply and redo transport services activity at the standby site.
SQL> SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#,
BLOCKS FROM V$MANAGED_STANDBY;
PROCESS STATUS THREAD# SEQUENCE#
BLOCK# BLOCKS
--------- ------------ ---------- ---------- ----------
----------
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CLOSING 1 10 1 817
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0
0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
PROCESS STATUS THREAD# SEQUENCE#
BLOCK# BLOCKS
--------- ------------ ---------- ---------- ----------
----------
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0
0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0
0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
PROCESS STATUS THREAD# SEQUENCE#
BLOCK# BLOCKS
--------- ------------ ---------- ---------- ----------
----------
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0
0
ARCH CONNECTED 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 1 11 8558 1
MRP0
WAIT_FOR_LOG 1 11 0 0
33 rows selected.
SQL>
If a delayed apply has been specified or an
archive log is missing then switchover may take longer than expected.
SQL>
SQL> col name for a65
SQL> select name, applied from v$archived_log;
NAME
APPLIED
-----------------------------------------------------------------
---------
/u01/app/oracle/DELL/arch/arch21962708218.arc NO
/u01/app/oracle/DELL/arch/arch31962708218.arc NO
/u01/app/oracle/DELL/arch/arch41962708218.arc NO
/u01/app/oracle/DELL/arch/arch51962708218.arc NO
DELL_STBY
YES
/u01/app/oracle/DELL/arch/arch61962708218.arc NO
DELL_STBY
YES
/u01/app/oracle/DELL/arch/arch71962708218.arc NO
DELL_STBY
YES
/u01/app/oracle/DELL/arch/arch81962708218.arc NO
DELL_STBY
YES
NAME
APPLIED
-----------------------------------------------------------------
---------
/u01/app/oracle/DELL/arch/arch91962708218.arc NO
DELL_STBY
YES
/u01/app/oracle/DELL/arch/arch101962708218.arc NO
DELL_STBY
YES
15 rows selected.
SQL>
To check Max Sequence applied
SQL> SELECT MAX(SEQUENCE#) FROM V$ARCHIVED_LOG;
MAX(SEQUENCE#)
--------------
10
SQL> select max(sequence#) from v$archived_log where
applied='YES';
MAX(SEQUENCE#)
--------------
10
SQL>
To check applied Log Sequence wise
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY
SEQUENCE#;
SEQUENCE# APPLIED
---------- ---------
2 NO
3 NO
4 NO
5 NO
5 YES
6 NO
6 YES
7 NO
7 YES
8 NO
8 YES
SEQUENCE# APPLIED
---------- ---------
9 NO
9 YES
10 NO
10 YES
15 rows selected.
SQL>
================================================================================================================
================================================================================================================
Redo Transport Compression in a Data Guard Environment (Doc ID 729551.1)
Oracle Database has the ability to compress redo as it is transmitted over a network by Data Guard Redo Transport Services.
By setting this parameter "compression=enable" in dataguard configuration, it allows to compress archive log on air and send to Standby Database server
SQL> show parameter dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service="ahcstby1", ASYNC NOAF
FIRM delay=0 optional compress
ion=enable max_failure=0 max_c
onnections=1 reopen=30 db_uniq
ue_name="ahcstby1" net_timeout
=300, valid_for=(online_logfil
es,all_roles)
Oracle Database has the ability to compress redo as it is transmitted over a network by Data Guard Redo Transport Services.
By setting this parameter "compression=enable" in dataguard configuration, it allows to compress archive log on air and send to Standby Database server
SQL> show parameter dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service="ahcstby1", ASYNC NOAF
FIRM delay=0 optional compress
ion=enable max_failure=0 max_c
onnections=1 reopen=30 db_uniq
ue_name="ahcstby1" net_timeout
=300, valid_for=(online_logfil
es,all_roles)
OR
DGMGRL> edit database 'STDBY' set property 'RedoCompression' = enable;
Hope This
Article helps those who would like to Configure Active DataGuard for their
Environment
Thanks for Reading
Regards,
Mohammed Areefuddin.
Suggested Topics :
No comments:
Post a Comment