Oracle DBA Tips Corner |
Oracle10g Data Guard Configuration Example - (Logical, Maximum Performance Mode)
by Jeff Hunter, Sr. Database Administrator
Contents
Overview
Introduction to Data Guard
Hardware and O/S Configuration
Configuring Nodes for Remote Access
Before configuring the .rhosts file, we must first make sure
that we have the rsh RPMs installed on
each node in the RAC cluster:
To enable the "rsh" service, the "disable" attribute in the /etc/xinetd.d/rsh
file must be set to "no" and xinetd must be reloaded.
This can be done by running the following commands on both nodes in the Data Guard configuration:
Here is
a copy of the .rhosts file I have configured on both of my Linux
servers for the oracle user account. This file should reside in
the $HOME directory for the oracle user account:
I will typically rename the Kerberos version of rsh so that the normal
rsh command will be used. Use the following:
For security reasons, the permissions of the .rhosts file should be 600 and owned by the "oracle" user account.
If instead, you are using a global /etc/hosts.equiv file, it should be owned by root and the permissions be set to 600.
In fact, some systems will only honor the content of this file if the owner of this file is root and the permissions are
set to 600.
After configuring the .rhost file on both computers, I like
to perform a simple test from each machine to ensure that the configuration
is valid:
Configuring the Primary Database
Configuring the Standby Database
Start Remote Archiving
Verifying the Logical Standby Database
Role Transitions
Which Role Transition Operation Should I Use?
Implementing Role Switchover Operations
Implementing Role Failover Operations
Further Reading
About the Author
All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter
and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express,
prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.
I have made every effort and taken great care in making sure that the material included on my web site is technically accurate,
but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from
relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.


Now, let's take a look at the Oracle database configuration and parameters
we will be using for our physical standby database configuration.
Primary Database
Oracle Release:
Oracle10g Release 2 - (10.2.0.3.0)
Machine Name:
vmlinux3.idevelopment.info
Operating System:
Red Hat Linux 4 - (CentOS 4.5)
Oracle SID:
TESTDB
Instance Service Names:
TESTDB.IDEVELOPMENT.INFO
TNS Service Name:
TESTDB_VMLINUX3.IDEVELOPMENT.INFO
Standby Database
Oracle Release:
Oracle10g Release 2 - (10.2.0.3.0)
Machine Name:
vmlinux4.idevelopment.info
Operating System:
Red Hat Linux 4 - (CentOS 4.5)
Oracle SID:
TESTDB
Instance Service Names:
TESTDB.IDEVELOPMENT.INFO
TNS Service Name:
TESTDB_VMLINUX4.IDEVELOPMENT.INFO
One other note about my configuration. I have both of my Linux servers
configured with an .rhosts file for the oracle user
in order to allow the use of the r* commands (like rcp). This
allows me to expedite
the initial copying of database files from the primary host to the standby host by not
requiring me to manually login (FTP) with a username and password. Although
it is only necessary to configure the standby database server with an .rhosts
file (since it is the standby database server that needs to identify which
servers will be trusted), I like to configure both nodes for remote access.
The rsh daemon on the standby database server
validates UNIX users using the /etc/hosts.equiv file or the .rhosts
file found in the user's (oracle's) home directory.
The use of rcp (and any other of the r* commands) is not required for normal
Data Guard operation. rcp, however, does expedite
the initial copying of database files from the primary host to the standby host! After copying all
database files from the primary database server to the standby database server, this feature
can be disabled.
# rpm -q rsh rsh-server
rsh-0.17-25.3
rsh-server-0.17-25.3
From the above, we can see that we have the rsh and rsh-server installed.
If rsh is not installed, run the following command from the
CD where the RPM is located:
# su -
# rpm -ivh rsh-0.17-25.3.rpm rsh-server-0.17-25.3.rpm
# su -
# chkconfig rsh on
# chkconfig rlogin on
# chkconfig rsync on
# chkconfig rexec on
# service xinetd reload
Reloading configuration: [ OK ]
Example .rhosts File
+vmlinux3.idevelopment.info oracle
+vmlinux4.idevelopment.info oracle
Before attempting to test the rsh command, ensure
that you are using the correct version of rsh. By default, Red Hat Linux
puts /usr/kerberos/sbin at the head of the $PATH variable. This
will cause the Kerberos version of rsh to be executed.
# su -
# which rsh
/usr/kerberos/bin/rsh
# mv /usr/kerberos/bin/rsh /usr/kerberos/bin/rsh.original
# mv /usr/kerberos/bin/rcp /usr/kerberos/bin/rcp.original
# mv /usr/kerberos/bin/rlogin /usr/kerberos/bin/rlogin.original
# which rsh
/usr/bin/rsh
$ chmod 600 ~/.rhosts
$ ls -l ~/.rhosts
-rw------- 1 oracle dba 0 Jun 21 17:08 /u01/app/oracle/.rhosts
FROM vmlinux3 MACHINE
$ id
uid=175(oracle) gid=115(dba) groups=115(dba) context=user_u:system_r:unconfined_t
$ rsh vmlinux4 hostname
vmlinux4
FROM vmlinux4 MACHINE
$ id
uid=175(oracle) gid=115(dba) groups=115(dba) context=user_u:system_r:unconfined_t
$ rsh vmlinux3 hostname
vmlinux3








Additional information on Oracle10g Release 2 Data Guard
can be found in the Data Guard Concepts and Administration.
This guide is available from the Oracle Documentation Library
website located at the following address
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239.pdf.
Jeffrey Hunter graduated from Stanislaus State University in Turlock,
California, with a Bachelor's degree in Computer Science. Jeff is an
Oracle Certified Professional, Java Development Certified Professional,
Author, and currently works as a Senior Database Administrator for
The DBA Zone, Inc..
His work includes advanced performance tuning, Java and PL/SQL programming, capacity
planning, database security, and physical / logical database design in a UNIX,
Linux, and Windows server environment. Jeff's other interests include mathematical
encryption theory, programming language processors (compilers and interpreters)
in Java and C, LDAP, writing web-based database administration tools, and of
course Linux. Jeff has been a Sr. Database Administrator and Software Engineer
for over 13 years and maintains his own website site at:
http://www.iDevelopment.info.
Wednesday, 02-Jan-2008 13:06:13 EST
Page Count: 1929