Protecting Oracle Instance with Local Clustering - Page 2March 13, 2003 Marin KomadinaCluster ConfigurationOn 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 checkCluster 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:
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 checkTo 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/ 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 CheckIn 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)))
|