Protecting Oracle Instance with Local Clustering - Page 2

March 13, 2003

Marin Komadina

Cluster Configuration

On a Sun Ultra-Enteprise-10000 machine, with 2 CPU, 100MHz, and 4096 Megabytes RAM, we have installed a Solaris 2.8 operating system and cluster software Sun Cluster 2.2.

One active Oracle database (artist000) running in failover configuration with HA Oracle Agent exists on that cluster.

Sun Cluster check

Cluster administration is usually under the control of the UNIX administrator. As a DBA, we have only to check if the cluster is running or not. If not, then it has to be started with scadmin command as root.

	$ haoracle list
Cluster is not up; Run scadmin {startcluster|startnode}first.
	scadmin startcluster CNODEB CLUST00C2

When the cluster is running, we can retrieve basic cluster information:

root@cnodea# haget -f mastered
CNODEA
CNODEB

Cluster configuration has two member nodes, CNODEA and CNODEB.

To find out more detailed information we can use command hastat:

cnodeb@root#hastat
	
Getting Information from all the nodes ......

HIGH AVAILABILITY CONFIGURATION AND STATUS 
              -------------------------------------------
 
LIST OF NODES CONFIGURED IN <CLUST00C2> CLUSTER
      CNODEA CNODEB
 
CURRENT MEMBERS OF THE CLUSTER
 
     CNODEA is a cluster member
     CNODEB is a cluster member
 
CONFIGURATION STATE OF THE CLUSTER
 
     Configuration State on CNODEB: Stable
     Configuration State on CNODEA: Stable
 
UPTIME OF NODES IN THE CLUSTER
 
     uptime of CNODEB:         
	 12:07pm  up 10 day(s),  5:14,  4 users,  load average: 1,10, 0,60, 0,42
     uptime of CNODEA:         
	 12:07pm  up 10 day(s),  5:14,  1 user,  load average: 0,10, 0,15, 0,17
 
LOGICAL HOSTS MASTERED BY THE CLUSTER MEMBERS
 
Logical Hosts Mastered on CNODEB: LOGNODEH
Logical Hosts for which CNODEB is Backup Node:      None
Logical Hosts Mastered on CNODEA:                           None
Logical Hosts for which CNODEA is Backup Node:  LOGNODEH 

LOGICAL HOSTS IN MAINTENANCE STATE
 
     None
 
STATUS OF PRIVATE NETS IN THE CLUSTER
 
     Status of Interconnects on CNODEB:
        interconnect0: selected
        interconnect1: up
     Status of private nets on CNODEB; 
        To CNODEB - UP
        To CNODEA - UP
	 
     Status of Interconnects on CNODEA:
        interconnect0: selected
        interconnect1: up
     Status of private nets on CNODEA:
        To CNODEB - UP
        To CNODEA - UP
	 
STATUS OF PUBLIC NETS IN THE CLUSTER
 
Status of Public Network On CNODEB :
 
bkggrp  r_adp   status  fo_time live_adp
nafo0   qfe0    OK      NEVER   qfe0
 
Status of Public Network On CNODEA :
 
bkggrp  r_adp   status  fo_time live_adp
nafo0   qfe0    OK      NEVER   qfe0
 
STATUS OF DATA SERVICES RUNNING IN THE CLUSTER
 
Status Of Registered Data Services
       oracle:                  On
	 
Status Of Data Services Running On CNODEB 
       Data Service "oracle":
       Database Status on CNODEB :
        artisit000 - running; 

 
Status Of Data Services Running On CNODEA 
       Data Service "oracle":
       Not being managed on this system

Physical node CNODEB is now mastering logical host LOGNODEH. The Oracle database instance artist000 is running in cluster CLUST00C2, on physical node CNODEB.

Volumes associated with the existing database:

/LOGNODEH
/oracle/app/oracle/admin/artist000
/oracle/app/oracle/admin/archspace/arch
/oracle/dataspace/artist000

/LOGNODEH - A special volume which holds cluster statistical information, and is usually few MB in size

/oracle/app/oracle/admin/artist000 - Volume group holds configuration and initialization database files

/oracle/app/oracle/admin/archspace/arch - Volume group holds database archived log files

/oracle/dataspace/artist000 - Volume group holds database files

HA Oracle agent check

To find out the actual configuration for Oracle services in a cluster, we can check the cluster configuration (hastat):

# hastat 
--
Status Of Data Services Running On CNODEB
       Data Service "oracle":
       Database Status on CNODEB:
        artist000 - running; 
--

or using HA Oracle agent (haoracle) command

#haoracle list
on:artist000:LOGNODEH:60:10:120:300:ha/test:/oracle/app/oracle/
admin/artist000/pfile/initartist000.ora:LISTENER_artist000

All actions made by HA Oracle Agent software are logged on location /var/opt/SUNWscor in file hadbms.log, where we can search for additional activity information.

Oracle Configuration Check

In a clustered system, Oracle installation can be on a shared volume or on a local disk.

On our test system, we have two nodes and Oracle binaries have been installed on each physical host local disk. Oracle HA Agent uses a special directory on location /var/opt/oracle, with Oracle initialisation and configuration files.

-rw-rw-r--   1 oracle   dba          439 Feb  6 10:52 oratab
-rwxr-xr-x   1 oracle   dba         4320 Feb  6 10:52 listener.ora*
-rw-r--r--   1 oracle   dba         1216 Feb  6 10:53 tnsnames.ora

Oratab is a special configuration file with entries for all of the database instances on all nodes running HA Oracle Agent software. The Oracle DBA must manually keep this file current on all nodes to successfully failover.

#more oratab
# Y/N Y0 enable dbstart and dbshut Scripts
artist000:/oracle/app/oracle/product/8.1.5:N

All entries in the oratab file should have the :N option specified to ensure that the instance will not start automatically on machine reboot.

Listener.ora

Listener configuration file entries define the communication protocol and settings for database connections.

LISTENER_artist000 =
  ( ADDRESS_LIST =
        ( ADDRESS = ( PROTOCOL = TCP ) ( Host = LOGNODEH)(Port= 1528))
        ( ADDRESS = ( PROTOCOL = IPC ) ( KEY = artist000 ) ))
SID_LIST_LISTENER_artist000 =
  (SID_LIST = (SID_DESC = 
(ORACLE_HOME = /oracle/app/oracle/product/8.1.5)(SID_NAME = artist000)))

Tnsnames.ora

This is the Oracle network connection configuration file, with defined "service names" for every instance and logical host defined in listener.ora file.

artist000 =
   ( DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = LOGNODEH)(PORT = 1528))
    (CONNECT_DATA = (SID = artist000)))







The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers