What is a cluster?This article gives some information about intalling and using the Oracle Real Application Cluster RAC. A definition of a cluster is : "A group of computers linked to provide fast and reliable service. Cluster technologies have evolved over the past 15 years to provide servers that are both highly available and scalable. Clustering is one of several approaches that exploits parallel processing — the use of multiple subsystems as building blocks".Clusters have existed for quite a long time; the first solution was offered by DEC for its VMS operating system. Clusters on UNIX are more recent. Clustering is therefore a solution for having different computers share common devices and jointly perform tasks; they exist with or without databases. Several companies offer clustering software: Veritas, Sun, IBM, Microsoft, MySql etc. For example, the version for Windows NT can be downloaded from real application cluster for NT/2000 This means that the set of commands for managing the cluster itself depends on the specific product. Shared storageA cluster will share some storage. There will be some software in place to manage this storage, which could be the Veritas Volume Manager, or Sun Soltice, or UNIX itself if you are using raw devices. Even if it is likely that the clustering software and the storage manager will be provided by the same vendor, it is not necessarily so.What is an Oracle Real Application Cluster?The Oracle RAC is a solution offered by Oracle Corporation in order to build a shared database using the clustering technology; RAC and clustering are not the same thing: RAC comes on top of the clustering software, even if the two softwares are tightly interconnected.
Real Application Clusters requires that all each instance be able to access a set of devices on a shared disk subsystem. Veritas Storage Foundation (VSF) for RAC supports an Oracle-certified Cluster File System (CFS), allowing to store the files that Real Application Clusters requires directly on the cluster file system. A raw disk subsystem can be used instead if required. Veritas states that the I/O performance of the VSF matches that of the raw devices. The CFS allows the use of normal Oracle commands such as "alter datafile resize 500M". With raw devices this is not possible, because the system manager must create the device with a certain size using the Volume Manager. Analogously, the archived redo logs can be created on the CFS. Oracle Cluster can be installed also on a single node, but the cluster management must be installed in advance and running. The tool on WindowsNT/2000 and Linux is called oracm and is shipped with Oracle. How many copies of Oracle binaries in a RAC?The Oracle binaries can be installed once on the shared storage or on each server (for example, on the system disk). Both ways are possible and your decision should be consider few factors: easy of use and possible downtime.
Defining the instances on the two nodes of the Oracle clusterIf the cluster software is running, the installation with the Oracle Universal Installer is very simple. The installer will detect the two nodes and will ask on which node the software should be copied; if you are using a shared device for the $ORACLE_HOME the node doesn't matter.When the installation is completed, you can try to start the instance on one of the two nodes without mounting the database, which of course hasn't yet been created. The tool is the usual sqlplus, even if the new tool svrctl can be used. RAC configuration filesHow many copies of init.ora should you keep? Where to define TNS_ADMIN? The new cluster systax introduced a "dot" notation in the init.ora file to specify parameters for different instances. This allows to keep only one copy of init.ora for all instances.To fix the ideas, let's say that the cluster nodes are called sercluster1 and sercluster2, the database name is EUROPE and that the instances names are EU1, EU2 etc. It the shared mountpoint is /orasoft, the ORACLE_BASE=/orasof/oracle, ORACLE_HOME=$ORACLE_BASE/9.2.0 One possible way to proceed is creating a tree $ORACLE_BASE/admin/EUROPE/... on the shared device. In particular, we will define an initEUROPE.ora on $ORACLE_BASE/admin/EUROPE/pfile The soft links must now be created: ln -s $ORACLE_BASE/admin/EUROPE/pfile/initEUROPE.ora $ORACLE_HOME/dbs/initEU1.ora ln -s $ORACLE_BASE/admin/EUROPE/pfile/initEUROPE.ora $ORACLE_HOME/dbs/initEU2.oraTo set correctly the environment on the two nodes, a possible script would be #!ksh export ORACLE_BASE=/orasoft/oracle export ORACLE_HOME=$ORACLE_BASE/9.2.0 myHost=`hostname` if [ $myHost = "sercluster1" ]; then ORACLE_SID=EU1 else ORACLE_SID=EU2 fi export ORACLE_SID ... ... ...The immediate question is: how can you use the same init.ora if the instance names are different? The answer is that in a RAC environmnet it is now possible to specify a parameter with a "dot" notation. For example: cluster_database=true cluster_database_instances=2 # EU1.instance_name=EU1 EU1.instance_number=1 EU1.thread=1 EU1.undo_tablespace=UNDOEU1 EU2.instance_name=EU2 EU2.instance_number=2 EU2.thread=2 EU2.undo_tablespace=UNDOEU2 undo_management=auto Creating the RAC databaseAt this stage $ORACLE_HOME and $ORACLE_SID must be defined in the environment and the init.ora file must be found on $ORACLE_HOME/dbs.As we said before, on UNIX (Linux) the init.ora on $ORACLE_HOME/dbs is typically a soft link to $ORACLE_BASE/admin/$ORACLE_SID/pfile/init${ORACLE_SID}.ora For this operation, the parameter cluster_database should be set to FALSE; in fact, the first part is not different from creating a database with a single instance and this setting avoids some unnecessary complexity at this stage. cluster_database = FALSE The database can now be created using normal scripts.
sqlplus '/ as sysdba'
sql> startup nomount
spool /orasoft/oracle/admin/EUROPE/create/logs/crDB_EUROPE_1.log
startup nomount pfile ='/orasoft/oracle/admin/EUROPE/pfile/initEUROPE.ora'
CREATE DATABASE EUROPE
controlfile REUSE
maxinstances 4
maxlogfiles 64
maxlogmembers 4
maxdatafiles 1000
maxloghistory 1000
character set AL32UTF8
national character set AL16UTF16
DATAFILE '/u00/oradata/EUROPE/EUROPE_system01.dbf' SIZE 1000M REUSE
EXTENT MANAGEMENT LOCAL
UNDO TABLESPACE UNDOEU1 DATAFILE
'/u09/oradata/EUROPE/EUROPE_undo_T1_01.dbf' SIZE 5000M REUSE
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE
'/u08/oradata/EUROPE/EUROPE_temp01.dbf' SIZE 5000M REUSE
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 50M
LOGFILE GROUP 1 ('/u05/oradata/EUROPE/EUROPE_redo1_1T1.dbf',
The second instance can start, but cannot mount nor open the database. Before this is possible, the redo logs and the UNDO tablespace for the second instance must be created
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5
('/u04/oradata/EUROPE/EUROPE_redo5_1T2.dbf',
Shut down the two instances
Now set
cluster_database = TRUE
# LISTENER.ORA Network Configuration File: /optware/oracle/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER_EU1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sercluster1)(PORT = 2002))
)
SID_LIST_LISTENER_EU1 =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /optware/oracle/9.2.0)
(SID_NAME = EU1)
)
)
LISTENER_EU2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sercluster2)(PORT = 2002))
)
SID_LIST_LISTENER_EU2 =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /orasoft/oracle/9.2.0)
(SID_NAME = EU2)
)
)
# TNSNAMES.ORA Network Configuration File: /orasoft/oracle/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
EUROPE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sercluster1)(PORT = 2002))
(ADDRESS = (PROTOCOL = TCP)(HOST = sercluster1)(PORT = 2002))
(LOAD_BALANCE = yes)
)
(CONNECT_DATA =
(SERVICE_NAME = EUROPE)
)
)
|
|
| [Home] [Web Design] [HTML tutorials] [Javascript] [PSP] [About us] [Links] [Anonymous email] [Best hosting] [Daily Oracle Life] [IT jobs in Switzerland] [Web Submission] [Web traffic] | |