Configuring Data Guard in Heterogeneous
Configuring Data Guard in Heterogeneous
With the release of Oracle database 11g, the primary and standby database in Data Guard
configuration can be created in cross-platform environment. They can have different operating
systems, os binaries (32/64 bit), oracle binaries (32/64 bit) and different CPU architecture.
Following is the step-by-step approach to create cross-plateform (AIX-Linux) DG configuration.
Environment:
The following table is the summary of Hardware, OS and Database configuration used:
Operaing System
Database
Hostname
Oracle SID
DB Unique Name
Service Name
ORACLE BASE
ORACLE HOME
Data Files
Primary
6 AIX-Based Systems (64-bit)
Oracle Database 11g
Enterprise Edition Release
11.2.0.4.0 - 64bit Production
Standby
Oracle Linux x86_64 5.5
Oracle Database 11g
Enterprise Edition Release
11.2.0.4.0 - 64bit Production
Orcl
Orcl
Orcl
orclstb
orclstb
orcl
11.2.0.4.0
Production
Archive Mode
Automatic archival
Enabled
Archive destination
/u02/orcl/archive/
FOR
--NO
SQL> alter database force logging;
Database altered.
SQL> SELECT force_logging FROM v$database;
FOR
--YES
STEP 4. Add Standby Redo Log
Create standby log files on primary database. Standby Redo logs are used to store redo information
received from another database (in this case primary). SRL needs to be of the same size as online redo
logs (ORL). It is recommened to have one more SRL group than the online redo log.
select * from v$logfile;
+DATA/orcl/onlinelog/group_3.367.863944527
+DATA/orcl/onlinelog/group_2.366.863944527
+DATA/orcl/onlinelog/group_1.370.863944527
ALTER
ALTER
ALTER
ALTER
DATABASE
DATABASE
DATABASE
DATABASE
ADD
ADD
ADD
ADD
STANDBY
STANDBY
STANDBY
STANDBY
LOGFILE
LOGFILE
LOGFILE
LOGFILE
GROUP
GROUP
GROUP
GROUP
4
5
6
7
'+DATA'
'+DATA'
'+DATA'
'+DATA'
SIZE
SIZE
SIZE
SIZE
50M;
50M;
50M;
50M;
ONLINE
+DATA/orcl/onlinelog/group_3.367.863944527 NO
ONLINE
+DATA/orcl/onlinelog/group_2.366.863944527 NO
ONLINE
+DATA/orcl/onlinelog/group_1.370.863944527 NO
STANDBY
+DATA/orcl/onlinelog/group_4.318.863945307 NO
STANDBY
+DATA/orcl/onlinelog/group_5.319.863945307 NO
STANDBY
+DATA/orcl/onlinelog/group_6.271.863945307 NO
STANDBY
+DATA/orcl/onlinelog/group_7.323.863945307 NO
File created.
Existing parameter:
orcl.__db_cache_size=905969664
orcl.__java_pool_size=16777216
orcl.__large_pool_size=33554432
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=838860800
orcl.__sga_target=1258291200
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=285212672
orcl.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='+DATA/orcl/controlfile/current.371.863944525'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='orcl'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.log_archive_dest_1='location=/u02/orcl/archive/'
*.memory_target=2097152000
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
Now create server parameter file from pfile and startup database using spfile.
File created.
File created.
SQL> startup
ORACLE instance started.
2247952 bytes
Variable Size
1241514736 bytes
Database Buffers
Redo Buffers
838860800 bytes
5156864 bytes
Database mounted.
Database opened.
Prepare Standby Database
STEP 6. Prepare Standby
In order to connect to the standby database create a password file on the physical standby database
(using ORAPWD) with the same password used by primary SYS account.
Set the OARCLE_SID variable and start the physical standby in NOMOUNT mode using parameter file.
2253024 bytes
Variable Size
268439328 bytes
Database Buffers
Redo Buffers
67108864 bytes
4624384 bytes
Create the necessory directory for data file, Fast Recoovery area etc.
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
Add or update the following entry to the tnsnames.ora file on both machine.
orclstb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.50.22)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
orcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.50.12)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
RMAN
STEP 8. Use RMAN to create standby database
run {
allocate channel prmy1 type disk format '/u03/backup/rman/%U';
allocate channel prmy2 type disk format '/u03/backup/rman/%U';
allocate channel prmy3 type disk format '/u03/backup/rman/%U';
allocate channel prmy4 type disk format '/u03/backup/rman/%U';
allocate auxiliary channel stby type disk format '/u03/backup/rman/%U';
duplicate target database for standby
from active database
spfile
set db_unique_name='orclstb'
set service_names=orcl
set control_files='+DATA'
set fal_client='orclstb'
set fal_server='orcl'
set log_archive_dest_2='service=orcl async
valid_for=(online_logfile,primary_role) db_unique_name=orcl'
dorecover
nofilenamecheck;
}