oracle rac9i(r2) for sun cluster workshop

67
Oracle RAC9i(R2) for Sun Cluster Workshop 1-67 Oracle RAC9i(R2) for Sun Cluster Workshop RAC 개념 RAC 는 하드웨어 클러스터 상에서 운영된다. 클러스터는 단일 시스템으로서 함께 연동되는 독립 서버(노드)그룹이다. 주요 클러스터 컴포넌트는 프로세서 노드, 클러스터 인터커넥트 및 공유 스토리지 서브시스템 등이다. 노드는 데이타를 관리하는 스토리지 서브 시스템과 자원에 대한 액세스를 공유하지만 개별 노드에서 메인 메모리를 물리적으로 공유 하지는 않는다. ORAC 은 개별 노드의 메모리를 결합해 전체 데이타베이스 시스템에 대한 분산 캐시 메모리의 단일 뷰를 제공한다. 노드는 다중 프로세서로 구성될 수 있다. 대표적인 노드 유형은 SMP(Symmetric Multi-Processor) 노드이다. 각 노드는 자체 전용 시스템 메모리 뿐만 아니라 자체 운영체계, 데이타베이스 인스턴스 및 애플리케이션 소프트웨어를 보유하고 있다. 클러스터의 장점 단일 대규모 노드 보다 클러스터를 이용함으로써 실현되는 이점은 다음과 같다. - 시스템이 원하는 용량으로 확장할 수 있도록 지원하는 용량 계획의 유연성 및 비용 효율성 - 특히 노드 장애 발생 시 클러스터 내 부분적 장애에 대한 폴트 톨로런스 확장성 ORAC 은 용량에 대한 요구가 증가함에 따라 클러스터에 노드를 추가할 수 있는 유연성을 사용자에게 제공함으로써 시스템을 단계적으로 확장해 자본 투자 비용을 절감하고 소규모 단일 노드 시스템을 대규모 노드 시스템으로 교체해야 하는 필요성을 없애도록 했다. 대부분의 경우

Upload: others

Post on 18-Dec-2021

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

1-67

Oracle RAC9i(R2) for Sun Cluster Workshop RAC 개념

RAC 는 하드웨어 클러스터 상에서 운영된다. 클러스터는 단일 시스템으로서 함께 연동되는 독립

서버(노드)그룹이다. 주요 클러스터 컴포넌트는 프로세서 노드, 클러스터 인터커넥트 및 공유 스토리지

서브시스템 등이다. 노드는 데이타를 관리하는 스토리지 서브 시스템과 자원에 대한 액세스를 공유하지만

개별 노드에서 메인 메모리를 물리적으로 공유 하지는 않는다. ORAC 은 개별 노드의 메모리를 결합해 전체

데이타베이스 시스템에 대한 분산 캐시 메모리의 단일 뷰를 제공한다. 노드는 다중 프로세서로 구성될 수

있다. 대표적인 노드 유형은 SMP(Symmetric Multi-Processor) 노드이다.

각 노드는 자체 전용 시스템 메모리 뿐만 아니라 자체 운영체계, 데이타베이스 인스턴스 및 애플리케이션

소프트웨어를 보유하고 있다.

클러스터의 장점

단일 대규모 노드 보다 클러스터를 이용함으로써 실현되는 이점은 다음과 같다.

- 시스템이 원하는 용량으로 확장할 수 있도록 지원하는 용량 계획의 유연성 및 비용 효율성

- 특히 노드 장애 발생 시 클러스터 내 부분적 장애에 대한 폴트 톨로런스

확장성

ORAC 은 용량에 대한 요구가 증가함에 따라 클러스터에 노드를 추가할 수 있는 유연성을

사용자에게 제공함으로써 시스템을 단계적으로 확장해 자본 투자 비용을 절감하고 소규모 단일

노드 시스템을 대규모 노드 시스템으로 교체해야 하는 필요성을 없애도록 했다. 대부분의 경우

Page 2: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

2-67

시스템을 업그레이드하기 위해 완전히 새로운 대규모 노드를 이용하는 대신 유사하거나 동일한

구성을 보유한 하나 이상의 노드가 클러스터에 추가되기 때문에 이는 보다 쉽고 신속하게 용량

업그레이드 프로세스를 실행할 수 있도록 하게 된다. ORAC 에 구현된 Cache Fusion 기술은 거의

선형적으로 용량을 확장할 수 있도록 지원한다.

고가용성

클러스터 아키텍처의 또 다른 주요 장점은 다중 노드에 의해 제공되는 고유 폴트 톨로런스이다.

물리적인 노드가 독립적으로 운영되기 때문에 하나 이상의 노드에 장애가 발생 하더라도

클러스터의 여타 노드에 영향을 미치지 않는다. 극한 상황의 경우, 클러스터 시스템은 단 하나의

노드 만이 생존하더라도 이용할 수 있기 때문에 클러스터를 토대로 하는 시스템은 고도의 가용성을

실현할 수 있게 된다. 또한 이 아키텍처는 유지보수를 위해 노드 그룹이 오프라인으로 되어 있는

동안 나머지 클러스터가 서비스를 온라인으로 제공할수 있도록 지원한다.

9i (RAC) New Feautes

Cache Fusion

- 모든 node 의 interconnected cache 를 활용한다.

- write/write 충돌 시 필요한 data block을 remote node 의 cache 에서 바로 요청한 Instance 로

고속 interconect 를 통하여 전송

- Update 작업의 동기화를 위한 Disk I/O 불필요하다.

(이전 버전에서는 Cache 상에 변경되어 있는 Block을 Disk에 기록한 후, 다른 Instance 는 해당

Block을 Disk에서 Cache 로 다시 읽어 변경 작업을 하는 ‘Ping’ protocol 사용)

Cache Fusion 기법의 개념적 구조

Database buffers

Node A

Database buffers

Node B

Data Transfer

Request

Database

Page 3: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

3-67

Real Application Clusters Installation Overview ■ Oracle Real Application Clusters Validation Matrix ■ RAC 구축 1. Install the operating system-dependent (OSD) clusterware. The OSD clusterware installation process varies according to platform: 1.1 For UNIX, refer to your vendor documentation and to the documentation for the SunCluster UDLM patch. 2. If you are not using a cluster file system, then configure the shared disks 3. Run the OUI to install the Oracle9i Enterprise Edition and the Oracle9i Real Application Clusters software 4. Create and configure your database as described in either:

4.1 Create a RAC Database using the Oracle Database Configuration Assistant(DBCA), or: 4.2 Manually Creating Real Application Clusters Databases

5. Single Database에서 RAC 구현하기 (node 추가하기) 6. Administering Real Application Clusters Instances (옵션)

Cache Fusion을 이용한 경우의 비교

Without Cache Fusion

Block in Local Cache

Block in Remote Cache

Block on Disk

With Cache Fusion

Time to write data block to disk

0.01 msec

1 msec

20 msec

100 msec

Block Access Time(ms)

Page 4: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

4-67

7. Network 구성 & CTF (Connection Time Failover) vs TAF (Transparent Application Failover) ■ Trouble Shooting

Page 5: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

5-67

■ Oracle Real Application Clusters Validation Matrix Oracle Real Application Clusters is a proven way to scale applications both in terms of number of users and volume of transactions. Additionally, Oracle Real Application Clusters provides proven availability that is a must for any mission-critical application. In this environment, Network Appliance enables these mission-critical applications to scale storage rapidly on an as-needed basis without any unplanned downtime. With its software offerings like Snapshot™, SnapMirror®, and SnapRestore®, Network Appliance provides a proven and compelling platform that makes the Oracle Real Application Clusters implementation even more unbreakable. Oracle has created an extensive test suite that validates compatibility of servers and storage with Oracle Real Application Clusters database. NetApp has received the validation for the following products from Oracle and Cluster Software vendors. Following is a matrix of Oracle Real Application Clusters Validation.

Page 6: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

6-67

■ RAC Inatallation

1. Install the operating system-dependent (OSD) clusterware. The OSD clusterware installation process varies according to platform:

1.1 Sun Cluster

1.1.1 Installation UDLM package

The Sun Cluster install CD's contain the required SC udlm package:-

Package SUNWudlm Sun Cluster Support for Oracle Parallel Server UDLM, (opt) on SunCluster v3

To install use the pkgadd command:-

# pkgadd -d . SUNWudlm

Once installed, Oracle's interface with this, the Oracle UDLM, can be installed.

1.1.1.1 VxVM을 사용할 경우

To install Sun Cluster Support for RAC with VxVM, the following Sun Cluster 3 Agents data services packages need to be installed as superuser (see Sun's Sun Cluster 3 Data Services Installation and Configuration Guide):-

# pkgadd -d . SUNWscucm SUNWudlmr SUNWcvmr SUNWcvm (SUNWudlm will also need to be included unless already installed from the step above)

1.1.2 UDLM package check 및 UDLM patch

Before rebooting the nodes, you must ensure that you have correctly installed and configured the Oracle UDLM software.

The Oracle Unix Distributed Lock Manager (ORCLudlm also known as the Oracle Node Monitor) must be installed. This may be referred to in the Oracle documentation as the "Parallel Server Patch". To check version information on any previously installed dlm package:

$ pkginfo -l ORCLudlm |grep PSTAMP OR $ pkginfo -l ORCLudlm |grep VERSION

You must apply the following steps to all cluster nodes. The Oracle udlm can be found on Disk1 of the Oracle9i server installation CD-ROM, in the directory opspatch or racpatch in later versions. Oracle patchsets may also ship udlm installs which are again found in the Disk1 racpatch directory of the patchset. A version of the Oracle udlm may also be found on the Sun Cluster CD set but check the Oracle release for the latest applicable version. The informational files README.udlm & release_notes.334x are located in this directory with version and install

Page 7: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

7-67

information. This is the Oracle udlm package for 7.X.X or later on Solaris Operating System (SPARC) and requires any previous versions to be removed prior to installation. Use the latest udlm pacakge as this supports previous versions of Oracle RAC and Parallel Server provided that the same bit-size (32-bit or 64-bit) for Oracle is used throughout.

• Shutdown all existing clients of Oracle Unix Distributed Lock Manager (including all Oracle Parallel Server/RAC instances).

• Become super user. • Reboot the cluster node in non-cluster mode (replace <node name> with your cluster node name):-

# scswitch -S -h <node name> # shutdown -g 0 -y

... wait for the ok prompt

ok boot -x

• Unpack the file ORCLudlm.tar.Z into a directory:

cd <CD-ROM mount>/opspatch #(or racpatch in later versions) cp ORCLudlm.tar.Z /tmp cd /tmp uncompress ORCLudlm.tar.Z tar xvf ORCLudlm.tar

• Install the patch by adding the package as root:

cd /tmp pkgadd -d . ORCLudlm

The udlm configuration files in SC2.X and SC3.0 are the following: SC2.X: /etc/opt/SUNWcluster/conf/<default_cluster_name>.ora_cdb SC3.0: /etc/opt/SUNWcluster/conf/udlm.conf

The udlm log files in SC2.X and SC3.0 are the following: SC2.X: /var/opt/SUNWcluster/dlm_<node_name>/logs/dlm.log SC3.0: /var/cluster/ucmm/dlm_<node_name>/logs/dlm.log

pkgadd will copy a template file, <configuration_file_name>.template, to /etc/opt/SUNWcluster/conf.

• Now that udlm (also referred to as the "Cluster Membership Monitor") is installed, you can start it up by rebooting the cluster node in cluster mode:-

# shutdown -g 0 -y -i 6

Page 8: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

8-67

2. Configure the shared disks and UNIX preinstallation tasks.

2.1 Configure the shared disks(Raw Device 생성)

The Oracle instances in the RAC configuration write information to raw devices defined for:

• The control file • The spfile.ora • Each datafile • Each ONLINE redo log file • Server Manager (SRVM) configuration information : svrctl 기능을 사용할 경우 필요

It is therefore necessary to define raw devices for each of these categories of file. The Oracle Database Configuration Assistant (DBCA) will create a seed database expecting the following configuration:

Create a Raw Device for: File Size Sample name SYSTEM tablespace 400 MB db_name_raw_system_400 USERS tablespace 120 MB db_name_raw_user_120 TEMP tablespace 100 MB db_name_raw_temp_100 An undo tablespace per instance 500 MB db_name_raw_undo_500 OEMREPO 20 MB db_name_raw_oemrepo_20 INDX tablespace 70 MB db_name_raw_indx_70 TOOLS tablespace 12 MB db_name_raw_tools_12 DRYSYS tablespace 90 MB db_name_raw_dr_90 EXAMPLES tablespace 160 MB db_name_raw_examples_160 First control file 110 MB db_name_raw_control01_110 Second control file 110 MB db_name_raw_control02_110 Two redo log files per instance 120 MB per file db_name_thread_lognumb_120 Spfile.ora 5 MB db_name_raw_spfile_5 Srvmconfig 100 MB db_name_raw_srvmconf_100

※ Srvmconfig file은 svrctl 기능을 사용할 경우 필요하다.

2.1.1 On the node from which you run the Oracle Universal Installer, create an ASCII file identifying the raw volume objects as shown above. The DBCA requires that these objects exist during installation and database creation. When creating the ASCII file content for the objects, name them using the format:

database_object=raw_device_file_path

When you create the ASCII file, separate the database objects from the paths with equals (=) signs as shown in the example below:-

system=/dev/vx/rdsk/oracle_dg/clustdb_raw_system_400m spfile=/dev/vx/rdsk/oracle_dg/clustdb_raw_spfile_5m users=/dev/vx/rdsk/oracle_dg/clustdb_raw_users_120m temp=/dev/vx/rdsk/oracle_dg/clustdb_raw_temp_100m undotbs1=/dev/vx/rdsk/oracle_dg/clustdb_raw_undotbs1_290m

Page 9: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

9-67

undotbs2=/dev/vx/rdsk/oracle_dg/clustdb_raw_undotbs2_290m example=/dev/vx/rdsk/oracle_dg/clustdb_raw_example_30m cwmlite=/dev/vx/rdsk/oracle_dg/clustdb_raw_cwmlite_100m indx=/dev/vx/rdsk/oracle_dg/clustdb_raw_indx_70m tools=/dev/vx/rdsk/oracle_dg/clustdb_raw_tools_12m drsys=/dev/vx/rdsk/oracle_dg/clustdb_raw_dr_90m control1=/dev/vx/rdsk/oracle_dg/clustdb_raw_controlfile1_110m control2=/dev/vx/rdsk/oracle_dg/clustdb_raw_controlfile2_110m redo1_1=/dev/vx/rdsk/oracle_dg/clustdb_raw_log11_120m redo1_2=/dev/vx/rdsk/oracle_dg/clustdb_raw_log12_120m redo2_1=/dev/vx/rdsk/oracle_dg/clustdb_raw_log21_120m redo2_2=/dev/vx/rdsk/oracle_dg/clustdb_raw_log22_120m

You must specify that Oracle should use this file to determine the raw device volume names by setting the following environment variable where filename is the name of the ASCII file that contains the entries shown in the example above:

setenv DBCA_RAW_CONFIG filename or export DBCA_RAW_CONFIG=filename

$ vi /var/opt/oracle/srvConfig.loc srvconfig_loc=/dev/vx/rdsk/datadg/rac_srvconfig_10m

2.2 UNIX Preinstallation Steps 2.2.1 Group(dba) 생성 (각 node에서 실행) # groupadd –g 900 dba 2.2.2 User(oracle) 생성 (각 node에서 실행) # useradd -g dba -u 900 -m -d /oracle -s /bin/ksh oracle # passwd oracle 2.2.3 remote shell(rcp, rlogin, rsh) 구성 Select the node from which you will run the Oracle Universal Installer (OUI) and establish user equivalence by adding an entry for all nodes in the cluster, including the local node, to the .rhosts file of the oracle account, or to the /etc/host.equiv file. 2.2.3.1 Set up user equivalence for the oracle account, to enable rsh, rcp, rlogin commands. /etc/hosts (on all nodes) 127.0.0.1 localhost 61.250.123.231 sc1 loghost 61.250.123.232 sc2 172.16.0.129 inter1 172.16.0.130 inter2 /etc/hosts.equiv file. Put the list of machines or nodes into hosts.equiv. /etc/hosts.equiv (on all nodes) +sc1 root

Page 10: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

10-67

+sc2 root +sc1 oracle +sc2 oracle +inter1 root +inter2 root +inter1 oracle +inter2 oracle .rhosts file. In the root and oracle users’ home directory, put the list of machines into .rhosts. [sc1:oracle:/oracle]% cat /oracle/.rhosts + Note : It is possible, though not advised for security reasons, to put a “+” in the hosts.equiv and .rhosts files. Test if the user equivalence is correctly set up (node2 is the secondary cluster machine) : Logged on node1 as oracle (then, as root) : $ rlogin node2 (-> no pwd) $ rcp /tmp/toto node2:/tmp/toto $ rsh node2 pwd 2.2.3.2 remote shell test [sc1:oracle:/oracle]% touch test [sc1:oracle:/oracle]% rcp test sc2:/oracle [sc2:oracle:/oracle]% rsh sc2 ls -l total 16 drwx------ 2 root root 8192 Mar 5 05:04 lost+found -rw-r--r-- 1 oracle dba 0 Mar 5 11:15 test 2.2.4 System Kernel Parameters(각 node 에 설정)

Kernel Parameter Setting Purpose SHMMAX 4294967295 Maximum allowable size of one shared memory segment (4 Gb) SHMMIN 1 Minimum allowable size of a single shared memory segment. SHMMNI 100 Maximum number of shared memory segments in the entire system. SHMSEG 10 Maximum number of shared memory segments one process can attach. SEMMNI 1024 Maximum number of semaphore sets in the entire system. SEMMSL 100 Minimum recommended value. SEMMSL should be 10 plus the largest

PROCESSES parameter of any Oracle database on the system. SEMMNS 1024 Maximum semaphores on the system. This setting is a minimum

recommended value. SEMMNS should be set to the sum of the PROCESSES parameter for each Oracle database, add the largest one twice, plus add an additional 10 for each database.

SEMOPM 100 Maximum number of operations per semop call. SEMVMX 32767 Maximum value of a semaphore. (swap space) 750 MB Two to four times your system's physical memory size. /etc/system (on all nodes) set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=100 set shmsys:shminfo_shmseg=10

Page 11: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

11-67

set semsys:seminfo_semmap=100 set semsys:seminfo_semmni=1024 set semsys:seminfo_semmns=1024 set semsys:seminfo_semmnu=2500 set semsys:seminfo_semmsl=100 set semsys:seminfo_semopm=100 set semsys:seminfo_semume=2500 set semsys:seminfo_semvmx=32767 set msgsys:msginfo_msgmax=16384 set msgsys:msginfo_msgmnb=16384 set msgsys:msginfo_msgmni=2200 set msgsys:msginfo_msgtql=2500 forceload: sys/shmsys forceload: sys/semsys forceload: sys/msgsys

2.2.5 Establish system environment variables

• Set a local bin directory in the user's PATH, such as /usr/local/bin, or /opt/bin. It is necessary to have execute permissions on this directory.

• Set the DISPLAY variable to point to the system's (from where you will run OUI) IP address, or name, X server, and screen.

• Set a temporary directory path for TMPDIR with at least 20 Mb of free space to which the OUI has write permission.

2.2.5.1 Establish Oracle environment variables: Set the following Oracle environment variables:

Environment Variable Suggested value ORACLE_BASE eg /u01/app/oracle ORACLE_HOME eg /u01/app/oracle/product/9201 ORACLE_TERM xterm NLS_LANG AMERICAN-AMERICA.UTF8 for example ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data PATH Should contain $ORACLE_HOME/bin CLASSPATH $ORACLE_HOME/JRE:$ORACLE_HOME/jlib \

$ORACLE_HOME/rdbms/jlib: \ $ORACLE_HOME/network/jlib

• Create the directory /var/opt/oracle and set ownership to the oracle user. • Verify the existence of the file /opt/SUNWcluster/bin/lkmgr. This is used by the OUI to indicate that the

installation is being performed on a cluster.

[sc1:oracle:/oracle]% cat /oracle/.profile (on all nodes)

Page 12: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

12-67

umask 022 set filec set -o trackall set -o vi stty erase ^H stty -istrip cs8 erase ^H stty -istrip cs8 werase ^W stty -istrip cs8 intr ^C export PATH=/usr/local/bin/:$PATH export PATH=/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/ucb:/usr/ucb/bin:/usr/local/bin:/etc:. export PATH=/usr/openwin/bin:/usr/j2se/jre/bin:/usr/j2se/jre/lib:/usr/j2se/bin:$PATH export EDITOR=vi export LANG=ko export ENV=./.kshrc export PS1=[`hostname`:`whoami`:'$PWD]% ' alias df='df -k' alias rm='rm -i' alias ll='ls -al' alias dead='/usr/ucb/ps -aux | more' alias cls='clear' alias ls='ls -aF' alias ptd='/usr/platform/sun4u/sbin/prtdiag -v' #export DISPLAY=61.250.123.158:0.0 export ORACLE_BASE=/oracle/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/920 export ORACLE_TERM=vt100 export ORACLE_SID=RAC1 # node2(sc2)에서는 “RAC2”로 설정 export TNS_ADMIN=$ORACLE_HOME/network/admin export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/ctx/bin:/tmp/OPatch:$ORACLE_HOME/Apatch/perl/bin export NLS_LANG=American_America.KO16KSC5601 export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/usr/local/lib:$DAMO_INST_HOME export CLASSPATH=$ORACLE_HOME/jre/1.4.2/bin #export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib export DATE=d`date`+%Y%m%d export LANG=ko export TMPDIR=/tmp alias oh='cd $ORACLE_HOME' alias ob='cd $ORACLE_BASE/admin/RAC/bdump' alias ss='sqlplus "/as sysdba"'

Page 13: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

13-67

※ Verification Script (Note: 189256.1)

Note: There is a verification script InstallPrep.sh available which may be downloaded and run prior to the installation of Oracle Real Application Clusters. This script verifies that the system is configured correctly according to the Installation Guide. The output of the script will report any further tasks that need to be performed before successfully installing Oracle 9.x DataServer (RDBMS). This script performs the following verifications:-

• ORACLE_HOME Directory Verification • UNIX User/umask Verification • UNIX Group Verification • Memory/Swap Verification • TMP Space Verification • Real Application Cluster Option Verification • Unix Kernel Verification

Unix InstallPrep Script

The Unix InstallPrep Script should be run prior to installing the Oracle 8.0.5 to 9.2 DataServer. This script checks for all known items that will cause the install to fail.

Follow these steps to download and run the script:

1. Change the name of the script to InstallPrep.sh 2. Ftp the InstallPrep.sh script (in ascii format) to the Unix system that you will be installing the

Oracle DataServer on. 3. Change the permissions of the script to execute for the user running the script:

chmod 777 InstallPrep.sh 4. Log in as the user that will be installing the Oracle software. 5. Copy the InstallPrep.sh script to the /tmp directory and run it from this location. 6. Note: on some Linux platforms you may get the error "bad interpreter", just run the command 'sh

InstallPrep.sh' and the try running it. Otherwise, you can try "dos2unix InstallPrep.sh" and then retry it. 7. Answer the first few questions, the output from the script will be written to /tmp/InstallPrep.out

and the errors written to /tmp/InstallPrep.err. 8. Resolve any problems found in /tmp/InstallPrep.err and then install the Oracle DataServer

software.

. ./InstallPrep.sh

Page 14: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

14-67

3 Using the Oracle Universal Installer for Real Application Clusters

3.1 install the Oracle Software Login as the oracle user # su – oracle [sc1:oracle:/Media/9i/Disk1]% export LANG=C [sc1:oracle:/Media/9i/Disk1]% ./runInstaller

• At the OUI Welcome screen, click Next.

Page 15: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

15-67

• A prompt will appear for the Inventory Location (if this is the first time that OUI has been run on this system). This is the base directory into which OUI will install files. The Oracle Inventory definition can be found in the file /var/opt/oracle/oraInst.loc. Click OK.

• Unix Group Name

Page 16: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

16-67

• Verify the UNIX group name of the user who controls the installation of the Oracle9i software. If an instruction to run /tmp/orainstRoot.sh appears, the pre-installation steps were not completed successfully. Typically, the /var/opt/oracle directory does not exist or is not writeable by oracle. Run /tmp/orainstRoot.sh to correct this, forcing Oracle Inventory files, and others, to be written to the ORACLE_HOME directory. Once again this screen only appears the first time Oracle9i products are installed on the system. Click Next.

• Select the other nodes on to which the Oracle RDBMS software will be installed. It is not necessary to select the node on which the OUI is currently running. Click Next.

• Cluster Node Selection : <SHIFT> 키를 누르면서 mouse 로 화면에 보이는 모든 node 들을 선택후에 Next 버튼을 누른다. % 이부분을 실행하면 동시에 각각의 노드에 oracle 이 설치된다.

Page 17: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

17-67

• The File Location window will appear. Do NOT change the Source field. The Destination field defaults to the ORACLE_HOME environment variable. Click Next.

• Select the Products to install. In this example, select the Oracle9i Server then click Next.

Page 18: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

18-67

• Product Language 를 선택한다

• Select the installation type. Choose the Custom option. Click Next.

Page 19: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

19-67

• Oracle9i Real Application Cluster 를 체크하고, 기타 필요/불필요한 option들을 추가/제거한다. click Next.

• Identify the raw partition in to which the Oracle9i Real Application Clusters (RAC) configuration information will be written. It is recommended that this raw partition is a minimum of 100MB in size.

• Raw Device 생성시에 생성한 Srvmconfig 파일명을 입력한다.

Page 20: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

20-67

• Privileged Operating System Groups dba 를 입력한다.

• An option to Upgrade or Migrate an existing database is presented. Do NOT select the radio button. The Oracle Migration utility is not able to upgrade a RAC database, and will error if selected to do so.

Page 21: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

21-67

• Create Database

No 를 선택하고, Next 를 클릭한다.

• The Summary screen will be presented. Confirm that the RAC database software will be installed and then click Install. The OUI will install the Oracle9i software on to the local node, and then copy this information to the other nodes selected.

Page 22: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

22-67

• Once Install is selected, the OUI will install the Oracle RAC software on to the local node, and then copy software to the other nodes selected earlier. This will take some time. During the installation process, the OUI does not display messages indicating that components are being installed on other nodes - I/O activity may be the only indication that the process is continuing.

• A screen indicating the OUI progress will be displayed • 99%에서 2번 node 로 copy 한다.(cpio) • ps 명령등으로 확인 할 수 있음.

Page 23: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

23-67

※ RAC option 제거하기 (manually) [oracle:/oracle/app/oracle/product/9.2.0/rdbms/lib] make -f ins_rdbms.mk rac_off rm -f /oracle/app/oracle/product/9.2.0/lib/libskgxp9.a cp /oracle/app/oracle/product/9.2.0/lib//libskgxpd.a /oracle/app/oracle/product/9.2.0/lib/libskgxp9.a rm -f /oracle/app/oracle/product/9.2.0/lib/libskgxn9.a cp /oracle/app/oracle/product/9.2.0/lib//libskgxns.a /oracle/app/oracle/product/9.2.0/lib/libskgxn9.a /bin/ar -X64 d /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a kcsm.o /bin/ar -X64 cr /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a /oracle/app/oracle/product/9.2.0/rdbms/lib/ksnkcs.o [oracle:/oracle/app/oracle/product/9.2.0/rdbms/lib] make -f ins_rdbms.mk ioracle - Linking Oracle rm -f /oracle/app/oracle/product/9.2.0/rdbms/lib/oracle ld -b64 -o /oracle/app/oracle/product/9.2.0/rdbms/lib/oracle -L/oracle/app/oracle/product/9.2.0/rdbms/lib/ -L/oracle/app/oracle/product/9.2.0/lib/ -bbigtoc -bnoipath -bI:/oracle/app/oracle/product/9.2.0/lib/ksms.imp /oracle/app/oracle/product/9.2.0/rdbms/lib/opimai.o /oracle/app/oracle/product/9.2.0/rdbms/lib/ssoraed.o /oracle/app/oracle/product/9.2.0/rdbms/lib/ttcsoi.o /oracle/app/oracle/product/9.2.0/lib/nautab.o /oracle/app/oracle/product/9.2.0/lib/naeet.o /oracle/app/oracle/product/9.2.0/lib/naect.o /oracle/app/oracle/product/9.2.0/lib/naedhs.o /oracle/app/oracle/product/9.2.0/rdbms/lib/config.o -lserver9 /oracle/app/oracle/product/9.2.0/lib/libodm9.so -lskgxp9 -lskgxn9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 /oracle/app/oracle/product/9.2.0/rdbms/lib/defopt.o -lknlopt `if /bin/ar -X64 tv /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap9 -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib/olap.exp -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib/libamd.exp" ; fi -lslax9 -lpls9 -lplp9 -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib/plsqlncomp.exp -lserver9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lknlopt -lslax9 -lpls9 -lplp9 -ljox9 -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib//oracle.exp -lwwg9 `sed -e 's/-ljava//g' /oracle/app/oracle/product/9.2.0/lib/ldflags` -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnzjs9 -lnro9 `sed -e 's/-ljava//g' /oracle/app/oracle/product/9.2.0/lib/ldflags` -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnzjs9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lwtcserver9 -lmm -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `sed -e 's/-ljava//g' /oracle/app/oracle/product/9.2.0/lib/ldflags` -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnzjs9 -lnro9 `sed -e 's/-ljava//g' /oracle/app/oracle/product/9.2.0/lib/ldflags` -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnzjs9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lpls9 -ltrace9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lserver9 `if /bin/ar -X64 tv /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo9"; fi` -lctxc9 -lctx9 -lzx9 -lgx9 -lctx9 -lzx9 -lgx9 -lordimt9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lsnls9 -lunls9 -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib//libcorejava.exp -lld -lm `cat /oracle/app/oracle/product/9.2.0/lib/sysliblist` -lm `if [ "\`/usr/bin/uname -v\`" = "4" ]; \ then echo "-bI:/oracle/app/oracle/product/9.2.0/lib/pw-syscall.exp"; fi;` `if /bin/ar -X64 t /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a | grep '^'kcsm.o > /dev/null 2>&1 ; then echo "-lha_gs64_r -lha_em_r"; fi` -locijdbcst9 -lxsd9 ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_ADT is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_CHAR is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_DATETIME is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_INDEXED is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_INTERVAL is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_LOB is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_OBJREF is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_OPQ is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_SSCALAR is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_UROWID is already exported. ld: 0711-415 WARNING: Symbol plzcls is already exported. ld: 0711-415 WARNING: Symbol plzexe is already exported. ld: 0711-415 WARNING: Symbol plzopn is already exported. ld: 0711-415 WARNING: Symbol plzosq is already exported. ld: 0711-415 WARNING: Symbol pevm_ENTER is already exported. ld: 0711-415 WARNING: Symbol pevm_MOVX is already exported.

Page 24: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

24-67

ld: 0711-415 WARNING: Symbol peslcl2 is already exported. ld: 0711-319 WARNING: Exported symbol not defined: pen_PIPE ld: 0711-319 WARNING: Exported symbol not defined: pevm_MOVCADT ld: 0711-319 WARNING: Exported symbol not defined: pevm_MOVL ld: 0711-319 WARNING: Exported symbol not defined: pevm_MOVS ld: 0711-319 WARNING: Exported symbol not defined: pifi_i ld: 0711-773 WARNING: Object /oracle/app/oracle/product/9.2.0/lib//libordsdo9.a[mdrcr.o], imported symbol kcbstdbz_ Symbol was expected to be local. Extra instructions are being generated to reference the symbol. ld: 0711-773 WARNING: Object /oracle/app/oracle/product/9.2.0/lib//libordsdo9.a[mdrt.o], imported symbol kcbstdbz_ Symbol was expected to be local. Extra instructions are being generated to reference the symbol. ld: 0711-783 WARNING: TOC overflow. TOC size: 87032 Maximum size: 65536 Extra instructions are being generated for each reference to a TOC symbol if the symbol is in the TOC overflow area. mv -f /oracle/app/oracle/product/9.2.0/bin/oracle /oracle/app/oracle/product/9.2.0/bin/oracleO mv /oracle/app/oracle/product/9.2.0/rdbms/lib/oracle /oracle/app/oracle/product/9.2.0/bin/oracle chmod 6751 /oracle/app/oracle/product/9.2.0/bin/oracle

※ RAC option 추가하기 (manually) [oracle:/oracle/app/oracle/product/9.2.0/rdbms/lib] make -f ins_rdbms.mk rac_on rm -f /oracle/app/oracle/product/9.2.0/lib/libskgxp9.a cp /oracle/app/oracle/product/9.2.0/lib//libskgxpu.a /oracle/app/oracle/product/9.2.0/lib/libskgxp9.a - Use reference SKGXN library rm -f /oracle/app/oracle/product/9.2.0/lib/libskgxn9.a cp /oracle/app/oracle/product/9.2.0/lib//libskgxnr.a /oracle/app/oracle/product/9.2.0/lib/libskgxn9.a /bin/ar -X64 d /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a ksnkcs.o /bin/ar -X64 cr /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a /oracle/app/oracle/product/9.2.0/rdbms/lib/kcsm.o [oracle:/oracle/app/oracle/product/9.2.0/rdbms/lib] make -f ins_rdbms.mk ioracle - Linking Oracle rm -f /oracle/app/oracle/product/9.2.0/rdbms/lib/oracle ld -b64 -o /oracle/app/oracle/product/9.2.0/rdbms/lib/oracle -L/oracle/app/oracle/product/9.2.0/rdbms/lib/ -L/oracle/app/oracle/product/9.2.0/lib/ -bbigtoc -bnoipath -bI:/oracle/app/oracle/product/9.2.0/lib/ksms.imp /oracle/app/oracle/product/9.2.0/rdbms/lib/opimai.o /oracle/app/oracle/product/9.2.0/rdbms/lib/ssoraed.o /oracle/app/oracle/product/9.2.0/rdbms/lib/ttcsoi.o /oracle/app/oracle/product/9.2.0/lib/nautab.o /oracle/app/oracle/product/9.2.0/lib/naeet.o /oracle/app/oracle/product/9.2.0/lib/naect.o /oracle/app/oracle/product/9.2.0/lib/naedhs.o /oracle/app/oracle/product/9.2.0/rdbms/lib/config.o -lserver9 /oracle/app/oracle/product/9.2.0/lib/libodm9.so -lskgxp9 -lskgxn9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 /oracle/app/oracle/product/9.2.0/rdbms/lib/defopt.o -lknlopt `if /bin/ar -X64 tv /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap9 -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib/olap.exp -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib/libamd.exp" ; fi -lslax9 -lpls9 -lplp9 -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib/plsqlncomp.exp -lserver9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lknlopt -lslax9 -lpls9 -lplp9 -ljox9 -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib//oracle.exp -lwwg9 `sed -e 's/-ljava//g' /oracle/app/oracle/product/9.2.0/lib/ldflags` -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnzjs9 -lnro9 `sed -e 's/-ljava//g' /oracle/app/oracle/product/9.2.0/lib/ldflags` -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnzjs9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lwtcserver9 -lmm -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `sed -e 's/-ljava//g' /oracle/app/oracle/product/9.2.0/lib/ldflags` -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnzjs9 -lnro9 `sed -e 's/-ljava//g' /oracle/app/oracle/product/9.2.0/lib/ldflags` -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnzjs9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lpls9 -ltrace9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -

Page 25: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

25-67

lserver9 `if /bin/ar -X64 tv /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo9"; fi` -lctxc9 -lctx9 -lzx9 -lgx9 -lctx9 -lzx9 -lgx9 -lordimt9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lsnls9 -lunls9 -bE:/oracle/app/oracle/product/9.2.0/rdbms/lib//libcorejava.exp -lld -lm `cat /oracle/app/oracle/product/9.2.0/lib/sysliblist` -lm `if [ "\`/usr/bin/uname -v\`" = "4" ]; \ then echo "-bI:/oracle/app/oracle/product/9.2.0/lib/pw-syscall.exp"; fi;` `if /bin/ar -X64 t /oracle/app/oracle/product/9.2.0/rdbms/lib/libknlopt.a | grep '^'kcsm.o > /dev/null 2>&1 ; then echo "-lha_gs64_r -lha_em_r"; fi` -locijdbcst9 -lxsd9 ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_ADT is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_CHAR is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_DATETIME is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_INDEXED is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_INTERVAL is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_LOB is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_OBJREF is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_OPQ is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_SSCALAR is already exported. ld: 0711-415 WARNING: Symbol pevm_INMDH_INDEXED_UROWID is already exported. ld: 0711-415 WARNING: Symbol plzcls is already exported. ld: 0711-415 WARNING: Symbol plzexe is already exported. ld: 0711-415 WARNING: Symbol plzopn is already exported. ld: 0711-415 WARNING: Symbol plzosq is already exported. ld: 0711-415 WARNING: Symbol pevm_ENTER is already exported. ld: 0711-415 WARNING: Symbol pevm_MOVX is already exported. ld: 0711-415 WARNING: Symbol peslcl2 is already exported. ld: 0711-319 WARNING: Exported symbol not defined: pen_PIPE ld: 0711-319 WARNING: Exported symbol not defined: pevm_MOVCADT ld: 0711-319 WARNING: Exported symbol not defined: pevm_MOVL ld: 0711-319 WARNING: Exported symbol not defined: pevm_MOVS ld: 0711-319 WARNING: Exported symbol not defined: pifi_i ld: 0711-773 WARNING: Object /oracle/app/oracle/product/9.2.0/lib//libordsdo9.a[mdrcr.o], imported symbol kcbstdbz_ Symbol was expected to be local. Extra instructions are being generated to reference the symbol. ld: 0711-773 WARNING: Object /oracle/app/oracle/product/9.2.0/lib//libordsdo9.a[mdrt.o], imported symbol kcbstdbz_ Symbol was expected to be local. Extra instructions are being generated to reference the symbol. ld: 0711-783 WARNING: TOC overflow. TOC size: 87536 Maximum size: 65536 Extra instructions are being generated for each reference to a TOC symbol if the symbol is in the TOC overflow area. mv -f /oracle/app/oracle/product/9.2.0/bin/oracle /oracle/app/oracle/product/9.2.0/bin/oracleO mv /oracle/app/oracle/product/9.2.0/rdbms/lib/oracle /oracle/app/oracle/product/9.2.0/bin/oracle chmod 6751 /oracle/app/oracle/product/9.2.0/bin/oracle

Page 26: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

26-67

4. Create and configure your database

4.1 Create a RAC Database using the Oracle Database Configuration Assistant(DBCA)

• Verify that you correctly configured the shared disks for each tablespace (for non-cluster file system platforms)

• Create the database • Configure the Oracle network services • Start the database instances and listeners

Oracle Corporation recommends that you use the DBCA to create your database. This is because the DBCA preconfigured databases optimize your environment to take advantage of Oracle9i features such as the server parameter file and automatic undo management. The DBCA also enables you to define arbitrary tablespaces as part of the database creation process. So even if you have datafile requirements that differ from those offered in one of the DBCA templates, use the DBCA. You can also execute user-specified scripts as part of the database creation process.

The DBCA and the Oracle Net Configuration Assistant (NETCA) also accurately configure your Real Application Clusters environment for various Oracle high availability features and cluster administration tools.

Note: Prior to running the DBCA it may be necessary to run the NETCA tool or to manually set up your network files. To run the NETCA tool execute the command netca from the $ORACLE_HOME/bin directory. This will configure the necessary listener names and protocol addresses, client naming methods, Net service names and Directory server usage. Also, it is recommended that the Global Services Daemon (GSD) is started on all nodes prior to running DBCA. To run the GSD execute the command gsd from the $ORACLE_HOME/bin directory.

• DBCA will launch as part of the installation process, but can be run manually by executing the command dbca from the $ORACLE_HOME/bin directory on UNIX platforms. The RAC Welcome Page displays. Choose Oracle Cluster Database option and select Next.

Page 27: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

27-67

• The Operations page is displayed. Choose the option Create a Database and click Next.

• The Node Selection page appears. Select the nodes that you want to configure as part of the RAC database and click Next. If nodes are missing from the Node Selection then perform clusterware diagnostics by executing the $ORACLE_HOME/bin/lsnodes -v command and analyzing its output. Refer to your vendor's clusterware documentation if the output indicates that your clusterware is not properly installed. Resolve the problem and then restart the DBCA.

Page 28: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

28-67

• The Database Templates page is displayed. The templates other than New Database include datafiles. Choose New Database and then click Next.

• The Show Details button provides information on the database template selected.

Page 29: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

29-67

• DBCA now displays the Database Identification page. Enter the Global Database Name and Oracle System Identifier (SID). The Global Database Name is typically of the form name.domain, for example mydb.us.oracle.com while the SID is used to uniquely identify an instance (DBCA should insert a suggested SID, equivalent to name1 where name was entered in the Database Name field). In the RAC case the SID specified will be used as a prefix for the instance number. For example, MYDB, would become MYDB1, MYDB2 for instance 1 and 2 respectively.

• The Database Options page is displayed. Select the options you wish to configure and then choose Next. Note: If you did not choose New Database from the Database Template page, you will not see this screen.

Page 30: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

30-67

• The Additional database Configurations button displays additional database features. Make sure both are checked and click OK.

• Select the connection options desired from the Database Connection Options page. Note: If you did not choose New Database from the Database Template page, you will not see this screen. Click Next.

Page 31: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

31-67

• DBCA now displays the Initialization Parameters page. This page comprises a number of Tab fields. Modify the Memory settings if desired and then select the File Locations tab to update information on the Initialization Parameters filename and location. Then click Next.

Page 32: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

32-67

• The option Create persistent initialization parameter file is selected by default. If you have a cluster file system, then enter a file system name, otherwise a raw device name for the location of the server parameter file (spfile) must be entered. Then click Next.

• The button File Location Variables… displays variable information. Click OK.

Page 33: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

33-67

• The button All Initialization Parameters… displays the Initialization Parameters dialog box. This box presents values for all initialization parameters and indicates whether they are to be included in the spfile to be created through the check box, included (Y/N). Instance specific parameters have an instance value in the instance column. Complete entries in the All Initialization Parameters page and select Close. Note: There are a few exceptions to what can be altered via this screen. Ensure all entries in the Initialization Parameters page are complete and select Next.

• DBCA now displays the Database Storage Window. This page allows you to enter file names for each tablespace in your database.

Page 34: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

34-67

• The file names are displayed in the Datafiles folder, but are entered by selecting the Tablespaces icon, and then selecting the tablespace object from the expanded tree. Any names displayed here can be changed. A configuration file can be used, see section 3.2.1, (pointed to by the environment variable DBCA_RAW_CONFIG). Complete the database storage information and click Next.

• The Database Creation Options page is displayed. Ensure that the option Create Database is checked and click Finish.

Page 35: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

35-67

• The DBCA Summary window is displayed. Review this information and then click OK.

Page 36: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

36-67

• Once the Summary screen is closed using the OK option, DBCA begins to create the database according to the values specified.

Page 37: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

37-67

4.2 Manually Creating Real Application Clusters Databases ============================================================== Manual Database Creation steps for Real Application Clusters (137288.1) ============================================================== Here are the steps to be followed to create a Real Application Clusters database: 1. Make a init<SID>.ora in your $ORACLE_HOME/dbs directory. To simplify, you can copy init.ora to init<SID>.ora and modify the file. Remember that your control file must be pointing to a pre-existing raw device or cluster file system location. *** Path names, file names, and sizes will need to be modified Example parameter settings for the first instance: Cluster-Wide Parameters for Database "RAC": db_block_size=8192 db_cache_size=52428800 background_dump_dest=/oracle/app/oracle/product/9.0.1/rdbms/log core_dump_dest=/oracle/oracle/product/9.0.1/rdbms/log user_dump_dest=/oracle/oracle/product/9.0.1/rdbms/log timed_statistics=TRUE control_files=("/dev/RAC/control_01.ctl", "/dev/RAC/control_02.ctl") db_name=RAC shared_pool_size=52428800 sort_area_size=524288 undo_management=AUTO cluster_database=true cluster_database_instances=2 remote_listener=LISTENERS_RAC Instance Specific Parameters for Instance "RAC1": instance_name=RAC1 instance_number=1 local_listener=LISTENER_RAC1 thread=1 undo_tablespace=UNDOTBS * The local_listener parameter requires that you first add the listener address to the TNSNAMES.ORA - remember to do so on both Node 1 and Node 2. ** You can also use an spfile as described in Note 136327.1. 2. Run the following sqlplus command to connect to the database: sqlplus '/ as sysdba' 3. Startup up the database in NOMOUNT mode: SQL> startup nomount

Page 38: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

38-67

4. Create the Database (All raw devices must be pre-created) : *** Path names, file names, and sizes will need to be modified CREATE DATABASE <db_name> CONTROLFILE REUSE MAXDATAFILES 254 MAXINSTANCES 32 MAXLOGHISTORY 100 MAXLOGMEMBERS 5 MAXLOGFILES 64 DATAFILE '/dev/RAC/system_01_400.dbf' SIZE 400M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED UNDO TABLESPACE "UNDOTBS" DATAFILE '/dev/RAC/undotbs_01_210.dbf' SIZE 200M REUSE NEXT 5120K MAXSIZE UNLIMITED CHARACTER SET US7ASCII LOGFILE GROUP 1 ('/dev/RAC/redo1_01_100.dbf') SIZE 100M REUSE, GROUP 2 ('/dev/RAC/redo1_02_100.dbf') SIZE 100M REUSE; 5. Create a Users Tablespace: *** Path names, file names, and sizes will need to be modified CREATE TABLESPACE "USERS" LOGGING DATAFILE '/dev/RAC/users_01_125.dbf' SIZE 120M REUSE NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL; 6. Create a Temporary Tablespace: *** Path names, file names, and sizes will need to be modified CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE '/dev/RAC/temp_01_50.dbf' SIZE 40M REUSE 7. Create a 2nd Undo Tablespace: *** Path names, file names, and sizes will need to be modified CREATE UNDO TABLESPACE "UNDOTBS2" DATAFILE '/dev/RAC/undotbs_02_210.dbf' SIZE 200M REUSE NEXT 5120K MAXSIZE UNLIMITED; 8. Run the necessary scripts to build views, synonyms, etc.: The primary scripts that you must run are: i> CATALOG.SQL--creates the views of data dictionary tables and the dynamic performance views SQL> @?/rdbms/admin/catalog.sql ii> CATPROC.SQL--establishes the usage of PL/SQL functionality and creates many of the PL/SQL Oracle supplied packages SQL> @?/rdbms/admin/catproc.sql iii> CATCLUST.SQL--creates RAC specific views SQL> @?/rdbms/admin/catclust.sql

Page 39: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

39-67

9. Edit init<SID>.ora and set appropriate values for the 2nd instance on the 2nd Node: *** Names may need to be modified instance_name=RAC2 instance_number=2 local_listener=LISTENER_RAC2 thread=2 undo_tablespace=UNDOTBS2 10. From the first instance, run the following command: *** Path names, file names, and sizes will need to be modified RAC1-SQL> alter database add logfile thread 2 group 3 ('/dev/RAC/redo2_01_100.dbf') size 100M, group 4 ('/dev/RAC/redo2_02_100.dbf') size 100M; RAC1-SQL> alter database enable public thread 2; 11. Start the second Instance. (Assuming that your cluster configuration is up and running). RAC2-SQL> startup

Page 40: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

40-67

5. Single Database에서 RAC 구현하기 (Node 추가하기) 5.1 shutdown database / stop listener 5.2 network (rsh, rcp, rlogin) 구성 /etc/hosts.equive + ~$HOME/.rhosts (all node) + 5.2.1 rcp test [RAC1:/oracle] $ rcp test node2:/oracle [RAC1:/oracle] $ rlogin node2 5.3 rac option 추가(using OUI) 및 node2로 rcp 5.3.1 node1에서 OUI 실행 후, “Available Product Components”에서 RAC 만 추가 설치

5.3.2 rcp 를 이용해서 node1의 product를 node2로 copy 한다. [RAC1:/oracle] $ rcp –r /oracle/* node2:/oracle 5.4 node1 init<SID>.ora 수정 및 clustered database startup 5.4.1 maxinstance 수를 체크하여 1로 되어있으면, 필요한 node수 이상으로 controlfile을 재생성 한다. 5.4.2 init<SID>.ora 수정 $ORACLE_HOME/initRAC1.ora ################################################################

Page 41: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

41-67

# Cluster Database

################################################################

cluster_database_instances=1 #cluster_database_instances=2

cluster_database=true #cluster_database=true

instance_name=RAC1 #instance_name=RAC2

instance_number=1 #instance_number=2

#local_listener=LISTENER_RAC1 ##local_listener=LISTENER_RAC2

thread=1 #thread=2

undo_tablespace=UNDOTBS1 #undo_tablespace=UNDOTBS2

cluster_interconnects = 192.168.2.102 #cluster_interconnects = 192.168.2.202

log_archive_dest=/ARCH/RAC1 #log_archive_dest=/ARCH/RAC2 5.5 node2 (thread 2) 추가(undo tablespace, Online redologfile 생성, archive dest 지정(file system)) 5.5.1 Thread 2 용 redolog 생성 RAC1-SQL> alter database add logfile thread 2 group 4 '/dev/rrac_redo2_01' size 100m; RAC1-SQL> alter database add logfile thread 2 group 5 '/dev/rrac_redo2_02' size 100m; RAC1-SQL> alter database add logfile thread 2 group 6 '/dev/rrac_redo2_03' size 100m; 5.5.2 undotbs02 용 Undo tablespace 생성 RAC1-SQL> create undo tablespace undotbs2 datafile '/dev/rrac_undotbs02' size 500M reuse AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED; 5.5.3 Thread 2 enable RAC1-SQL> alter database enable thread 2; 5.6 RAC용 Data Dictionary 생성 RAC1-SQL> @?/rdbms/admin/catclust.sql 5.7 node2 Database startup 5.7.1 init<SID>.ora 수정 $ORACLE_HOME/initRAC1.ora ################################################################

# Cluster Database

################################################################

cluster_database_instances=2 #cluster_database_instances=1

cluster_database=true #cluster_database=true

instance_name=RAC2 #instance_name=RAC1

instance_number=2 #instance_number=1

#local_listener=LISTENER_RAC2 ##local_listener=LISTENER_RAC1

thread=2 #thread=1

undo_tablespace=UNDOTBS2 #undo_tablespace=UNDOTBS1

cluster_interconnects = 192.168.2.202 #cluster_interconnects = 192.168.2.102

log_archive_dest=/ARCH/RAC2 #log_archive_dest=/ARCH/RAC1 RAC2-SQL> startup

Page 42: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

42-67

6. Administering Real Application Clusters Instances

Oracle Corporation recommends that you use SRVCTL to administer your Real Application Clusters database environment. SRVCTL manages configuration information that is used by several Oracle tools. For example, Oracle Enterprise Manager and the Intelligent Agent use the configuration information that SRVCTL generates to discover and monitor nodes in your cluster. Before using SRVCTL, ensure that your Global Services Daemon (GSD) is running after you configure your database. To use SRVCTL, you must have already created the configuration information for the database that you want to administer. You must have done this either by using the Oracle Database Configuration Assistant (DBCA), or by using the srvctl add command as described below.

If this is the first Oracle9i database created on this cluster, then you must initialize the clusterwide SRVM configuration. Firstly, create or edit the file /var/opt/oracle/srvConfig.loc file and add the entry srvconfig_loc=path_name.where the path name is a small cluster-shared raw volume eg

$ vi /var/opt/oracle/srvConfig.loc srvconfig_loc=/dev/vx/rdsk/datadg/rac_srvconfig_10m

Then execute the following command to initialize this raw volume (Note: This cannot be run while the gsd is running. Prior to 9i Release 2 you will need to kill the .../jre/1.1.8/bin/... process to stop the gsd from running. From 9i Release 2 use the gsdctl stop command):-

$ srvconfig -init

The first time you use the SRVCTL Utility to create the configuration, start the Global Services Daemon (GSD) on all nodes so that SRVCTL can access your cluster's configuration information. Then execute the srvctl add command so that Real Application Clusters knows what instances belong to your cluster using the following syntax:-

For Oracle RAC v9.0.1:-

$ gsd Successfully started the daemon on the local node. $ srvctl add db -p db_name -o oracle_home

Then for each instance enter the command:

$ srvctl add instance -p db_name -i sid -n node

To display the configuration details for, example, databases racdb1/2, on nodes racnode1/2 with instances racinst1/2 run:- $ srvctl config racdb1 racdb2

$ srvctl config -p racdb1 racnode1 racinst1 racnode2 racinst2

Page 43: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

43-67

$ srvctl config -p racdb1 -n racnode1 racnode1 racinst1

Examples of starting and stopping RAC follow:-

$ srvctl start -p racdb1 Instance successfully started on node: racnode2 Listeners successfully started on node: racnode2 Instance successfully started on node: racnode1 Listeners successfully started on node: racnode1

$ srvctl stop -p racdb2 Instance successfully stopped on node: racnode2 Instance successfully stopped on node: racnode1 Listener successfully stopped on node: racnode2 Listener successfully stopped on node: racnode1

$ srvctl stop -p racdb1 -i racinst2 -s inst Instance successfully stopped on node: racnode2

$ srvctl stop -p racdb1 -s inst PRKO-2035 : Instance is already stopped on node: racnode2 Instance successfully stopped on node: racnode1

For Oracle RAC v9.2.0+:-

$ gsdctl start Successfully started GSD on the local node. $ srvctl add database -d db_name -o oracle_home [-m domain_name] [-s spfile]

Then for each instance enter the command:

$ srvctl add instance -d db_name -i sid -n node

To display the configuration details for, example, databases racdb1/2, on nodes racnode1/2 with instances racinst1/2 run:- $ srvctl config racdb1 racdb2 $ srvctl config -p racdb1 -n racnode1 racnode1 racinst1 /u01/app/oracle/product/9.2.0.1

$ srvctl status database -d racdb1 Instance racinst1 is running on node racnode1 Instance racinst2 is running on node racnode2

Page 44: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

44-67

Examples of starting and stopping RAC follow:-

$ srvctl start database -d racdb2

$ srvctl stop database -d racdb2

$ srvctl stop instance -d racdb1 -i racinst2

$ srvctl start instance -d racdb1 -i racinst2

$ gsdctl stat GSD is running on local node

$ gsdctl stop

For further information on srvctl and gsdctl see the Oracle9i Real Application Clusters Administration manual.

Page 45: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

45-67

7. Network 구성 & CTF (Connection Time Failover) vs TAF (Transparent Application Failover) No. 17563 OPS의 TAF (TRANSPARENT APPLICATION FAILOVER) 개념 및 구성 (8.1이상) =================================================================== PURPOSE ------- Oracle8 부터는 OPS node 간의 TAF (Transparent Application Fail-over)가 제공된다. 즉 OPS의 한쪽 node에 fail이 발생하여도 해당 node로 접속하여 사용하던 모든 session이 사용하던 session을 잃지 않고 자동으로 정상적인 node로의 재접속이 이루어저 작업이 계속 진행하도록 하는 것이다. 이 문서에는 이 TAF에 대해서 간단히 살펴보고 실제 configuration을 기술한다. Explanation ----------- TAF가 cover하는 fail의 형태에 대한 설명과, TAF 시 지정하는 fail over의 type과 method에 대해서 설명한다. (1) fail의 형태: TAF는 다음과 같은 fail에 대해서 모두 TAF가 정상적으로 수행되게 된다. 단 MTS mode에 대해서는 전혀 문제가 없지만, dedicated mode의 경우는 반드시 dynamic registration형 태로 구현이 되어야 정상적으로 TAF가 가능하다. instance fail: mts의 경우는 문제가 없지만 dedicated mode의 경우는 반드시 dynamic registration 형태로 구성되어야 한다. fail된 instance 측의 listener가 정상적이라 하더라도, dynamic registration에 의해서 instance가 fail되면 listener로부터 deregistration되게 되어 listener 정보를 확인 후 다른 node의 listener로 접속을 시도하게 된다. 그러나 dynamic registration을 사용하지 않게 되면 fail된 instance 쪽의 listener는 fail된 instance 정보를 services로 보여주게 되고 해당 instance와 연결을 시도하면서 ORA-1034: Oracle not available 오류가 발생하게 되는 것이다. instance & listener down: listener까지 down되게 되면 문제 발생 후 재접속 시도 시 fail된 쪽의 listener 접속이 실패하게 되고, 다른 node의 listener로 접속이 이루어지게 된다. node down: node 자체가 down되는 경우에도 TAF는 이루어진다. 단 clinet에 적정한 TCP configuration parameter인 keepalive 의 설정이 요구되어진다. node fail시 client와 server간의 작업이 진행중이라면 문제가 없지만 만약 server쪽에서 수행 되는 작업이 없는 상태라면 cleint가 node가 down이 되어도 바로 인지할 수가 없다. client에 서 다음 server로의 요청이 이루어지는 순간에 client가 더이상 존재하지 않는 TCP end point 쪽으로 TCP packet을 보내게 되고, server node가 더이상 살아있지 않다는것을 확인하게 되 는데 일반적으로 2,3분이 걸릴수 있다. node가 fail이 된경우 network에 대한 write() function call이 오류를 return하게 되고, 이것을 client가 받은후 failover기능을 호출하게 되는 것이다.

Page 46: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

46-67

client에서 idle한 상태에서도 server node가 down되었는지를 확인하려면 TCP keepalive를 설 정해야 하며, 이 keepalive를 오라클의 connection에서 사용하려면 TNS service name에서 ENABLE=BROKEN절을 지정해 주어야한다. DESCRIPTION절에 포함되는 이 ENABLE=BROKEN절에 대한 예제는 아래 구성 예제의 (3)번 tnsnames.ora 구성 부분에서 참조할 수 있다. 이렇게 ENABLE=BROKEN을 지정하면 network쪽 configuration인 keepalive 설정을 이용하게 되는데 이것이 일반적으로는 2 ~ 3시간으로 설정되어 있기 때문에 이값이 적당히 짧아야 TAF에서 의미가 있을 수 있다. 단 이 keepalive time이 너무 짧으면, 그리고 idle한 session이 많은 편이라면 network부하가 매우 증가할 수 있으므로 이 지정에 대해서는 os나 network administrator와 충분히 상의하여 야 한다. 이 keepalive 대한 자세한 내용과 설정 방법은 <bulletin:11323 : SQL*NET DCD(DEAD CONNECTION DETECTION)과 KEEPALIVE의 관계>를 참조한다. (2) type: session vs. select session은 유지하고 수행중이던 SQL문장은 모두 fail되는 session type과 DML문장은 rollback되고 select문장은 유지되는 select type이 제공된다. select type의 경우도 fail된 instance에서만 얻을 수 있는 정보의 경우는 조회수행 도중 다음과 같은 오 류를 발생시키고 중단될 수 있다. 예를 들어 해당 instance에 대한 gv$session으로부터의 조회와 같은것이 그 예이다. ORA-25401: can not continue fetches (3) method: basic vs. backup fail발생시 다른 node로 session을 연결하는 basic method와, 미리 다른 node로 backup session을 연결 해 두었다가 fail발생시 사용하는 backup method가 존재한다. Example ------- TAF설정을 위해서는 init.ora, listener.ora, tnsnames.ora에 설정이 필요하다. MTS mode에서는 문제가 없기 때문에 여기서는 반드시 dynamic registration으로 설정해야 하는 dedicated방식을 예로 들었다. test는 Oracle 8.1.7.4/Sun solaris 2.8에서 수행되었다. A/B 두 node를 가정한다. (1)initSID.ora에서 - A node의 initSID.ora service_names=INS1, DB1 local_listener="(address=(protocol=TCP)(host=krtest1)(port=1521))" - B node의 initSID.ora service_names=INS2, DB1 local_listener="(address=(protocol=TCP)(host=krtest2)(port=1521))" service_names는 여러개를 지정가능한데, 중요한것은 두 node가 공통으로 사용할 service name한가지는

Page 47: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

47-67

반드시 지정하여야 한다. 일반적으로 db_name을 지정하면 된다. host=부분은 hostname이나 ip address를 지정하면 된다. (2) listener.ora LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = krtest1)(PORT= 1521))) B node에서는 krtest1대신 b node의 hostname혹은 ip address를 지정하면 된다 (3) tnsnames.ora은 지정하는 방법이 두가지입니다. 아래에 basic method와 backup method 두 가지 방법에 대한 예를 모두 기술한다. 이중 한가지를 사용하면 되며 backup method의 fail-over시 미리 연결된 session을 사용하므로 시간이 적게 걸릴수 있으나 반대 node에 사용안하는 session을 미리 맺어놓는것에 대한 부하가 있어 서로 장단점이 있

을 수 있다. 두 설정 모두 TAF뿐 아니라 connect time fail-over도 가능한 설정이다. 즉 A node가 fail시 같은 tns service name을 이용하여서 (여기서는 opsbasic 또는 ops1) B node로 접속이 이루어진다. address=로 정의된 address절이 위쪽을 먼저 시도하므로 정상적인 상태에서 B node로 접속을 원하는 경우

는 opsbasic의 경우 krtest2를 위쪽에 적고, ops1/ops2의 경우는 ops2를 사용하도록 한다. 여기에서 (enable=broken)설정이 되어 있는데 이것은 client machine에 설정되어 있는 TCP keepalive를 이용

하는 것으로 network부하를 고려하여 설정을 제거할 수 있다. a. basic method krtest1의 tnsnames.ora에서는 opsbasic과 ops2에 대해서 설정해두고, krtest2 node에서는 opsbasic과 ops1을 설정한 후, backup=ops2를 backup=ops1으로 수정하면 된다. opsbasic = (description= (address_list= (enable=broken) (load_balance=off) (failover=on) (address= (protocol=tcp) (host=krtest1) (port=1521)) (address= (protocol=tcp) (host=krtest2) (port=1521)) ) (connect_data = (service_name=DB1) (failover_mode= (type=select) (method=basic) (backup=ops2))))

Page 48: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

48-67

ops1 = (description = (enable=broken) (load_balance=off) (failover=on) (address=(protocol=tcp)(host=krtest1) (port=1521)) (connect_data = (service_name = DB1))) ops2 = (description = (enable=broken) (load_balance=off) (failover=on) (address=(protocol=tcp)(host=krtest2) (port=1521)) (connect_data = (service_name = DB1))) b. preconnect method 아래 예제의 ops1, ops2가 모두 같은 tnsnames.ora에 정의되어 있어야 하며, ops1을 이용하여 접속하여 krtest1을 사용시에도 미리 backup session을 krtest2에 맺어둔 상태에서 작업하게 된다. ops1 = (description = (address_list = (enable=broken) (load_balance=off) (failover=on) (address=(protocol=tcp)(host=krtest1) (port=1521)) (address=(protocol=tcp)(host=krtest2) (port=1521)) ) (connect_data = (service_name = DB1) (failover_mode= (backup=ops2) (type=select) (method=preconnect)))) ops2 = (description = (address_list= (enable=broken) (load_balance=off) (failover=on) (address=(protocol=tcp)(host=krtest2) (port=1521)) (address=(protocol=tcp)(host=krtest1) (port=1521)) ) (connect_data = (service_name = DB1) (failover_mode= (backup=ops1) (type=select) (method=preconnect))))

Page 49: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

49-67

Oracle9i Real Application Clusters의 Application Fail-Over와 Load balancing

Oracle9i Real Application Clusters 의 페일오버 기능 - CTF vs TAF 아마도 독자들이 Oracle9i Real Application Clusters 를 도입하는 가장 큰 이유는 Oracle9i Real Application Clusters 가 고가용성(HA)을 보장해 주기 때문일 것인데, 실제로 HA 를 구현하기 위해서 가장 중요한 부분이 애플리케이션 페일오버(application failover)이다. 애플리케이션 페일오버를 간단히 설명하면, Oracle9i Real Application Clusters 환경에서 하나의 노드에 장애가 발생했을 때 애플리케이션은 나머지 살아 있는 노드들 중의 하나로부터 서비스를 받게 되므로, 엔드유저들은 장애가 발생했는지조차 모르는 것이다. 이것이 바로 오라클에서 Oracle9i Real Application Clusters 를 '난공불락(Unbreakable)'이라고 내세우는 이유이다. 최근에는 HA 에 대한 관심이 높아지면서 플랫폼 벤더에서도 여러 가지 HA 솔루션 - 이를테면, IP 스위치오버 - 을 제공한다. Oracle9i Real Application Clusters 사용 고객이 이러한 플랫폼 솔루션을 훌륭하게 함께 사용하는 경우도 많이 있지만, 이번 호에서는 혼돈을 피하기 위해 100% 오라클이 제공하는 솔루션만을 다루도록 한다. Oracle9i Real Application Clusters 에서 제공하는 페일오버 기능에는 CTF(Connection Time Failover)와 TAF(Transparent Application Failover)가 있다. 이 두 가지 기능 모두는 Oracle8i Parallel Server 에서부터 제공되던 기능이다. 그런데, 많은 고객들이 CTF와 TAF 가 상호 배타적인 기능이라고 여기는 것 같은데, TAF 는 CTF 기능 위의 부가적인 기능이다. 따라서, CTF 를 사용할 것인지 TAF 를 사용할 것인지 고민할 필요 없이 TAF 를 사용할 것인지 아닌지의 여부만 선택하면 된다. 이 글의 기반이 되는 필자의 테스트 환경은 다음과 같다. 앞으로 이어지는 테스트에서는 항상 이전의 설정을 기본으로 변경사항만 추가하도록 하겠다.

• 데이타베이스 서버 ‥ 2 노드의 Oracle9i Real Application Clusters o 운영체제 : Sun Solaris 8 o 오라클 데이타베이스 버전 : Oracle9i Database Release 2(9.2.0.3) 64 비트 o 호스트명(공용 네트워크) : krrac1, krrac2 o ORACLE_SID : RAC1(krrac1), RAC2(krrac2) o init.ora 파라미터

o local_listener=(지정 안함) o remote_listener=(지정 안함) o service_names=(지정 안함) o db_name='rac' o rac1.instance_name='rac1' o rac2.instance_name='rac2' o listener.ora(krrac1. krrac2 는 HOST와 SID_NAME 만 각각 krrac2, RAC2 이며 나머지는 동일)

LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = krrac1) (PORT = 1521)) )

Page 50: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

50-67

) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (ORACLE_HOME = /data/oracle) (SID_NAME = RAC1) ) )

• Oracle*Net 클라이언트(SQL*Plus)

o 운영체제 : Windows 2000 Professional o 오라클 클라이언트 버전 : Oracle9i Database Release 2(9.2.0.3) o tnsnames.ora

o RAC1 = o (description= o (address=(protocol=tcp)(host=krrac1)(port=1521)) o (connect_data= o (service_name=RAC)) o )

자, 이제 클라이언트에서 rac1 이라는 TNS alias 로 RAC1 에 접속할 수 있다면 모든 준비가 되었다. RAC1 인스턴스에 접속되었는지 확인해 보도록 하자<리스트 1>.

<리스트 1> RAC1 인스턴스의 접속 확인

$ sqlplus scott/tiger@rac1 SQL*Plus: Release 9.2.0.3.0 - Production on 화 Jul 8 12:20:46 2003 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. 다음에 접속됨: Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options JServer Release 9.2.0.3.0 - Production 세션이 변경되었습니다.

그러면, 이제 각각의 기능이 어떻게 작동하는지 자세히 알아보도록 하자.

Page 51: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

51-67

CTF CTF(Connection Time Failover)는 가장 기본적인 페일오버 설정 방법으로, 클라이언트의 TNS alias 만 아래와 같이 수정해주면 된다. RAC_CTF = (description= (load_balance=off) (failover=on) (address=(protocol=tcp)(host=krrac1)(port=1521)) (address=(protocol=tcp)(host=krrac2)(port=1521)) (connect_data= (service_name=RAC) ) ) 로드 밸런싱(load balancing)은 이후에 별도로 자세히 설명하므로, 일단 여기서는 로드 밸런싱에 대한 언급은 하지 않기로 하자. 이와 같이 설정한다면, 일단 RAC_CTF 를 사용하여 접속하는 클라이언트들은

1. krrac1 의 1521 포트로 기동된 리스너를 컨택한다. 2. 그 리스너가 RAC 라는 서비스를 하고 있다면 RAC 라는 서비스에 등록되어 있는 인스턴스에 접속한다.

3. 만일 1 에서 리스너가 응답이 없거나, 2 에서 RAC 라는 서비스가 없다면, 다음에 지정된 어드레스인 krrac2 의 1521 포트로 기동된 리스너를 컨택한다. 여기서 리스너가 응답이 없다면 에러를 리턴하며 접속을 하지 못하게 된다.

4. 2와 마찬가지 과정으로 RAC 서비스에 등록되어 있는 인스턴스를 접속한다. 여기서 RAC 서비스를 찾을 수 없다면, 마찬가지로 에러를 리턴하며 접속을 하지 못하게 된다.

따라서, 새로이 접속하는 클라이언트에 대하여는 krrac1 에서 어떤 장애가 일어나더라도 문제없이 krrac2 로 페일오버가 된다. 그렇다면, 기존에 이미 접속되어 있던 클라이언트들은 어떻게 될까? 리스너에만 장애가 있다면 당연히 영향이 없을 것이지만, 만일 인스턴스가 중단되었다면? 물론 클라이언트는 ORA-3113/3114 에러를 만나게 되며 기존의 접속 상태가 끊어지고, 새로 접속하면 위와 같은 과정을 거쳐 krrac2 로 접속하게 된다. 실행되고 있던 DML 은 살아 있는 RAC2 인스턴스에서 트랜잭션 복구를 수행하여 모두 롤백된다. 여기서 각 호스트의 리스너가 어떤 포트로 기동되어 있는지, 어떤 서비스에 어떤 인스턴스가 등록되어 있는지는 <리스트 2>와 같은 방법으로 알 수 있다.

<리스트 2> 각 호스트의 리스너 포트와 서비스별 인스턴스 등록 확인

krrac1|/data/oracle> lsnrctl services LSNRCTL for Solaris: Version 9.2.0.3.0 - Production on 08-JUL-2003 14:09:47 Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=krrac1)(PORT=1521))) Services Summary... Service "RAC" has 1 instance(s). Instance "RAC1", status READY, has 1 handler(s) for this service...

Page 52: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

52-67

Handler(s): "DEDICATED" established:1 refused:0 state:ready LOCAL SERVER Service "RAC1" has 1 instance(s). Instance "RAC1", status UNKNOWN, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 LOCAL SERVER The command completed successfully

여기서 독자들은 뭔가 좀 특이한 점을 볼 수 있을 것이다. 현재 리스너에는 RAC와 RAC1 두 가지 서비스가 등록되어 있으며, 각각의 서비스에는 RAC1 인스턴스가 등록되어 있다. 그렇다면, 왜 두 가지 서비스가 등록되어 있을까? 이것을 이해하기 위해서는 Oracle8i Database 에서 도입된 동적 등록(dynamic registration) 방식에 대하여 우선 알아야 한다. 위에서 status 항목을 자세히 살펴보면, RAC 서비스에 대하여는 READY 인 반면 RAC1 서비스에 대하여는 UNKNOWN 으로 나와 있는 것을 볼 수 있다. 즉, 리스너는 현재 RAC 서비스를 통해서는 RAC1 인스턴스가 살아 있다(READY)는 사실을 알 수 있지만, RAC1 서비스를 통해서는 RAC1 인스턴스의 상태를 알 수 없다(UNKNOWN). 여기서 한 번 RAC1 인스턴스를 셧다운한 후 똑 같은 테스트를 해 보자<리스트 3>.

<리스트 3> RAC1 인스턴스의 셧다운 후 테스트 실행

krrac1|/data/oracle> lsnrctl services listener_rac1 LSNRCTL for Solaris: Version 9.2.0.3.0 - Production on 08-JUL-2003 14:25:51 Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=krrac1)(PORT=1521))) Services Summary... Service "RAC1" has 1 instance(s). Instance "RAC1", status UNKNOWN, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 LOCAL SERVER The command completed successfully

그러면, RAC 서비스가 사라진 것을 볼 수 있다. 반면에, RAC1 서비스는 여전히 RAC1 인스턴스의 상태를 모르고 있다. 즉, RAC 서비스는 동적으로 등록된 서비스이며, 이러한 서비스에 등록된 인스턴스는 지속적으로 자신의 상태를 리스너에 업데이트시켜 준다. 동적 등록을 구성하는 방법은 다음과 같다.

1. SERVICE_NAMES 파라미터 값을 설정해 준다. 이것이 바로 리스너에 등록하는 서비스의 이름으로, 디폴트 값은 db_name.db_domain 이 된다. 즉, 예제에서는 db_domain 값이 설정되어 있지 않으므로 그냥 rac 가 된다. 주의할 점은 service_names 를 임의로 설정하는 경우 Oracle9i Real Application Clusters 데이타베이스 내의 페일오버 설정에 참여하는 모든 인스턴스들은 같은 값으로 설정해야

Page 53: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

53-67

한다는 것이다. 앞서 설명한 RAC_CTF TNS alias 를 보면 service_name 값을 RAC 로 사용하여 서로 다른 리스너 어드레스를 등록한 것을 확인할 수 있다.

2. LOCAL_LISTENER 파라미터 값을 설정해 준다. 즉 어느 리스너에 자신의 상태를 업데이트시켜 줄 것인지를 정해주는 부분으로, 디폴트 값은 (ADDRESS = (PROTOCOL=TCP)(HOST=)(PORT=1521))이 된다. 즉, 로컬 호스트의 1521 포트로 기동되는 리스너에 대하여는 LOCAL_LISTENER 값을 설정하지 않더라도 자동으로 동적 등록이 설정된다.

이 예제에서는 SERVICE_NAMES, LOCAL_LISTENER 값을 둘 다 설정하지 않았지만 lsnrctl services 에서 동적 등록이 되어 있는 것을 확인할 수 있다. 모두 디폴트 값을 취했기 때문이다. 즉, db_name 을 SERVICE_NAMES 로 사용하고, 1521 포트의 리스너를 사용하고자 한다면 이 예제와 같이 아무것도 설정할 필요가 없다. LOCAL_LISTENER 를 설정할 때는 디폴트 값처럼 TNS alias 구문으로 설정해 줄 수도 있지만 다른 방법도 있다. 서버의(클라이언트가 아니라 서버임에 유의하자) tnsnames.ora 파일에 다음과 같은 항목을 추가해 보자. LISTENER_RAC1 = (description= (address=(protocol=tcp)(host=krrac1)(port=1521)) ) 그리고 init.ora 파일에는 LOCAL_LISTENER=LISTENER_RAC1 라고 지정해 보자. lsnrctl services 에서와 마찬가지로 동적 등록이 이루어진 것을 확인할 수 있다. 즉, 클라이언트에서 tnsnames.ora 파일에 TNS alias 를 설정하여 사용하듯이, 서버에서도 LOCAL_LISTENER 에 대하여 TNS alias 를 설정하여 사용할 수 있다. 물론 여기서 설정하는 값은 listener.ora 파일에 지정하는 리스너 이름과는 아무런 상관이 없다. Oracle9i Database Release 2(V9.2)부터는 LOCAL_LISTENER 값을 인스턴스가 기동중인 상태에서도 아래와 같이 동적으로 바꿀 수 있다. SQL>alter system set local_listener='LISTENER_RAC1'; System altered. 이 때 물론 서버의 tnsnames.ora 에는 LISTENER_RAC1 이라는 항목이 미리 지정되어 있어야 하며, 만일 이것이 없을 때에는 오라클 에러가 나타나며 실패하게 된다. 또한 SPFile(Server Parameter File)이 아닌 텍스트 방식의 init.ora 를 사용하는 경우 인스턴스를 내렸다 올리면 위 설정은 없어지고 원래대로 돌아가므로, 설정을 지속시키려면 init.ora 파일에 값을 명시적으로 설정해야 한다. 자, 그럼 여기서 한 가지 의문이 생길 수 있다. '그렇다면, 정적으로 등록된 서비스(즉 위 예제에서 status UNKNOWN 으로 등록된 RAC1 서비스)는?' 결론적으로 말하면, 동적 등록 방식이 정적 등록 방식을 오버라이드(override)하게 되므로 정적 등록 방식은 다음과 같이 listener.ora 파일을 수정하여 제거하는 것이 좋다. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = krrac1) (PORT = 1521)) ) ) )

Page 54: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

54-67

여기서 또 한 가지. 바로 위에 설정한 내용이 listener.ora 의 디폴트 값이다. 결국 listener.ora 파일에 아무런 내용이 없어도 된다는 이야기가 된다. 사실 1521 포트를 사용하면서 LISTENER 라는 이름의 리스너를 사용한다면 실제로 listener.ora 파일 자체가 필요가 없다. lsnrctl 명령어는 디폴트로 LISTENER 라는 이름의 리스너에 대하여 수행되므로, 시동/중단하는 데에도 아무런 지장이 없다. 한 번 listener.ora 파일을 제거하고 테스트해 보도록 하자. 여태까지와 마찬가지 결과를 얻을 것이다. 물론, LISTENER 라는 이름이 아닌 다른 이름의 리스너를 사용하고자 한다면 1521 포트를 사용하더라도 이름을 지정하기 위해서 listener.ora 파일이 필요하다. 이미 눈치 빠른 독자들은 알아챘겠지만, 동적 등록 방식이 우수하므로 앞으로는 항상 동적 등록 방식을 쓰도록 하자는 것이다. 동적 등록 방식은 세 가지 측면에서 과거의 정적 등록 방식보다 우수하다.

• 주기적으로 인스턴스가 리스너에 자신의 상태를 알려주므로, CTF 설정에서 인스턴스에 장애가 있을 경우 앞서 설정한 페일오버 과정에서 장애가 발생한 인스턴스에 접속을 시도하는 오버헤드가 없다. 즉, 리스너까지만 가면 인스턴스의 상태를 알 수 있다.

• Oracle9i Database 의 새로운 기능인 리스너(커넥션) 로드 밸런싱을 사용할 수 있다. • TAF 를 사용할 수 있다.

그렇다면 TAF란 무엇인가? 이것에 대해 자세히 알아보도록 하자.

Page 55: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

55-67

TAF 앞서 잠깐 설명한 대로 CTF 의 약점은 기존에 접속되어 있던 클라이언트들에 대해서는 다시 한 번 접속을 시도해야 페일오버가 이루어진다는 점이다. 바로 이것을 극복할 수 있는 솔루션이 바로 TAF(Transparent Application Failover)이다. 앞서 설정한 클라이언트쪽의 TNS alias 를 다음과 같이 수정해 보자. 물론 리스너 에는 반드시 인스턴스가 동적으로 등록되어 있어야 한다. RAC_TAF = (description= (load_balance=off) (failover=on) (address=(protocol=tcp)(host=krrac1)(port=1521)) (address=(protocol=tcp)(host=krrac2)(port=1521)) (connect_data= (service_name=RAC) (failover_mode=(type=select)(method=basic)) ) ) CTF와 비교하여 다른 점은 failover_mode 라는 항목이 설정되었다는 점이다. 이것을 설정하는 방법을 설명하기에 앞서, 일단 위와 같이 TAF 가 설정되어 있는 경우에 이미 접속되어 있던 클라이언트들은 장애상황에서 어떻게 되는지부터 알아보자. 예를 들어, 클라이언트에서 100건의 레코드를 리턴하는 Select 를 수행중이었고, 현재 50건이 Fetch 된 상태에서 RAC1 인스턴스가 중단되었다고 가정한다면,

1. 살아 있는 인스턴스인 RAC2 에서 새로이 Oracle Server Process (Foreground Process)를 띄운다.

2. 이렇게 새로이 만들어진 프로세스로 50건을 Fetch 하던 클라이언트의 세션 정보가 옮겨진다. 이때 복구되는 내용은 다음과 같다.

o SQL 을 실행하던 사용자의 로그인 정보 o 실행하던 SQL 명령어 o Fetch 하던 커서 o 서버측 프로그램 변수(예를 들면, PL/SQL package states)

3. 이렇게 세션 정보가 복구되면 수행되던 Select 문장이 Fetch 하던 나머지 50건이 Fetch 된다. 따라서 클라이언트는 RAC1 인스턴스에 장애가 발생했다는 사실을 전혀 모르게 된다(Transparent Application). 물론 2번 과정에서 세션 정보를 복구하는 과정이 있으므로 50건 Fetch 후 다시 나머지 50건의 Fetch 가 시작되기까지 약간 지연될 수 있다.

TAF와 CTF 의 가장 큰 차이점은 재접속이 필요 없다는 점이다. 앞서 CTF 방식에서는 접속되어 있던 클라이언트들은 장애 발생 시 일단 ORA-3113/3114 에러를 만나게 되며, 재접속을 해야 페일오버가 되었다는 점을 기억하자. 이 때 기존에 접속되어 있던 클라이언트와 별도로 새로 접속하는 클라이언트들은 앞서 설명한 CTF 가 작동하여 페일오버가 이루어진다. 그러면, failover_mode 의 각각의 항목에 대하여 알아보도록 하자.

• TYPE o SESSION : 이 방식은 재접속은 필요 없지만, 예제와는 달리 Select 가 Fetch 하던 도중에

장애를 만나면 Fetch 가 도중에 실패하게 된다. 데이타 웨어하우스와 같이 다량의 레코드를 한 번에 Select 하는 경우가 아니라면 이 방식을 쓰는 것이 좋다.

o SELECT : 예제와 같은 방식으로, 재접속도 필요 없을 뿐더러 Fetch 하던 레코드까지 복구해 준다. 다량의 레코드를 Select 하는 애플리케이션에 적절한 방법이다.

Page 56: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

56-67

o NONE : 디폴트 값으로 TAF 가 작동하지 않는다.

• METHOD o BASIC : On-demand 방식으로 페일오버가 필요할 때 살아있는 인스턴스쪽으로 Oracle

Server Process 를 기동시킨다. o PRECONNECT : 페일오버가 이루어질 인스턴스에 미리 Oracle Server Process 를 기동시켜 페일오버시 발생하는 오버헤드를 미리 줄여 놓는 방식이다. 물론 페일오버 속도는 향상되지만, 자원을 낭비할 수 있다.

그렇다면, 여기서 또 의문점이 생긴다. PRECONNECT 메소드를 사용하는 경우 미리 어느 인스턴스로 페일오버할지를 결정해 놓아야 한다. 다음과 같이 클라이언트의 tnsnames.ora 를 수정해 보자. RAC_TAF = (description= (load_balance=off) (failover=on) (address=(protocol=tcp)(host=krrac1)(port=1521)) (address=(protocol=tcp)(host=krrac2)(port=1521)) (connect_data= (service_name=RAC) (failover_mode=(type=select)(method=preconnect)(backup=RAC2)) ) ) RAC2 = (description= (address=(protocol=tcp)(host=krrac2)(port=1521)) (connect_data= (service_name=RAC)) ) 즉 PRECONNECT 메소드를 사용하는 경우에는 반드시 backup 이라는 항목이 함께 설정되어야 한다. 이 때 backup 에는 TNS alias 로 지정하며, 여기에 지정할 TNS alias 는 반드시 미리 설정되어 있어야 한다(예제에서는 RAC2). 특히, 이 때 지정한 TNS alias 가 올바로 설정된 값이 아니어도 접속할 때 따로 에러를 리턴하지 않는다는 점에 주의하자. 물론, 이 예제에서는 2 노드 환경이므로 한 쪽에서 장애가 발생하면 나머지 살아 있는 쪽은 하나밖에 없으므로 왜 이것이 필요할까 궁금해 하는 독자들이 있을 것이다. 위와 같이 설정해 놓고 RAC_TAF 라는 TNS alias 로 접속한 후 <리스트 4>와 같이 SQL 을 실행해 보자. 참고로 <리스트 4>의 SQL 은 PRECONNECT 메소드뿐만 아니라 모든 경우의 TAF 설정이 제대로 작동하는지 알아보기 위해서 사용할 수 있다.

<리스트 4> TAF 설정이 올바로 되었는지 확인하는 SQL

SQL> SELECT

INST_ID, SID, MACHINE, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER

FROM GV$SESSION

WHERE USERNAME='SYSTEM'

AND PROGRAM NOT LIKE '%(P%';

Page 57: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

57-67

INST_ID SID MACHINE FAILOVER FAILOVER_METHOD FAILED

------- --- ---------------- --------- --------------- -------

1 20 ORACLE\leesb-kr SELECT PRECONNECT NO

2 19 ORACLE\leesb-kr NONE NONE NO 이렇게 PRECONNECT 메소드를 사용하는 경우에는 최초에 접속하는 주(primary) 인스턴스와 백업 인스턴스에 동시에 접속한다는 것을 알 수 있다. 이때 RAC1 인스턴스를 셧다운시키면 다음과 같은 결과가 나와야 한다.

INST_ID SID MACHINE FAILOVER FAILOVER_METHOD FAILED 2 19 ORACLE\leesb-kr SELECT PRECONNECT YES

여기서 주목해야 할 점은 PRECONNECT 메소드를 사용할 때는 항상 주 인스턴스와 백업 인스턴스를 지정해야 하므로 로드 밸런싱을 할 수 없다는 사실이다. 따라서 PRECONNECT 메소드는 각 인스턴스에 접속하는 클라이언트가 업무별/지역별로 분할되어 있는 경우에 사용할 수 있다. 페일오버 테스트 시나리오 자, 이렇게 페일오버를 설정했다면 실제로 장애 상황별로 제대로 작동하는지 살펴보아야 할 것이다. 보통 페일오버 테스트에서 고려하는 장애 상황은 다음과 같다.

• 오라클 인스턴스 장애 : 간단하게 shutdown abort 명령으로 인스턴스 장애 상황을 만들 수 있다. • 노드 장애(네트워크 장애) : 클라이언트 입장에서는 노드 자체가 장애가 있는 경우(reboot 또는 halt 명령)나 네트워크 장애가 있는 경우(네트워크 디바이스의 셧다운 또는 네트워크 라인의 unplug)나 같은 상황이므로 똑 같은 결과가 나와야 한다.

• 리스너 장애 : 간단하게 리스너 프로세스를 중단하든지 lsnrctl stop 으로 셧다운해서 장애 상황을 만들 수 있다. 인스턴스는 살아 있으면서 리스너만 장애가 있는 경우에는 항상 기존에 접속되어 있던 클라이언트는 페일오버 설정과 관계 없이 아무런 문제가 없어야 하며, 오직 새로이 접속하는 클라이언트만 페일오버가 이루어진다는 점을 기억하자.

이 세 가지 장애 상황에서 페일오버가 모두 정상적으로 이루어진다면 설정이 성공적으로 이루어졌다고 볼 수 있다. 마지막으로 클라이언트 페일오버를 테스트할 때, 오라클 인터커넥트(Oracle9i Real Application Clusters 노드 간의 개별 네트워크)에 대한 장애는 클라이언트 페일오버와 전혀 상관이 없으며, 이 인터커넥트의 장애 발

생시에는 인스턴스의 장애가 당연히 뒤따르므로 이를 고려하여 테스트하여야 한다. 오라클 인터커넥트의 장

애 발생시 어떤 결과가 일어나는가에 대해서는 본지 2003년 봄호에 실린 필자의 'Oracle9i Real Application Clusters - Cache Fusion의 작동 원리와 활용'을 참고하기 바란다.

Page 58: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

58-67

클라이언트 로드 밸런싱 vs 리스너 로드 밸런싱 자, 이제는 Oracle9i Real Application Clusters의 로드 밸런싱에 대해 알아보도록 하자. '로드 밸런싱(load balancing)'이란 말 그대로 공평하게 부하(load)를 나누어 준다는 뜻이다. 즉, 100개의 클라이언트가 있다면 2노드 Oracle9i Real Application Clusters 환경에서는 각 인스턴스별로 50개씩 똑같이 나누어 주고 싶을 것이

고, 차후에 다시 50개의 새로운 클라이언트가 접속한다면 다시 각각 25개씩 나누어 주어 언제나 공평하게 부하를 유지하고 싶을 것이다. 하지만, 이제까지의 예제와 같이 TNS alias에서 load_balance=off로 설정한 경우에는 어느 클라이언트가 어

느 인스턴스로 접속할지 수동으로 모두 설정해 주어야 하는 번거로움이 있었다. 만일 이것이 자동으로 된다

면? 즉, 100개의 클라이언트가 무작위로 접속할 때 자동으로 50개씩 나누어진다면 훨씬 더 편리할 것이다. 사실 Oracle9i Real Application Clusters가 나오기 이전에 Oracle Parallel Server를 사용하는 고객들은 로드 밸런싱을 잘 사용하지 못했다고 할 수 있다. 왜냐하면, Oracle Parallel Server에서 발생하는 핑(ping) 현상으

로 인해 보통 불가피하게 노드별로 데이타를 분할하여 데이타베이스를 구성하므로, 업무별/지역별로 클라이

언트를 나누어 특정 인스턴스를 지정해서 접속해야 했기 때문이다. 하지만, Oracle9i Real Application Clusters에서 완벽하게 이루어지는 Cache Fusion의 기능으로 더 이상 데이

타의 분할이 필요 없게 되었으므로, 클라이언트는 Oracle9i Real Application Clusters로 구성된 데이타베이스 내의 어떤 인스턴스에 접속하더라도 성능에는 아무런 영향을 주지 않는다. 오라클의 로드 밸런싱 설정은 다음 두 가지가 있다.

• 클라이언트 로드 밸런싱 : 클라이언트가 같은 SERVICE_NAME 을 사용하는 인스턴스들 중에 무작위로 선택하여 접속하는 방법이다.

• 리스너(커넥션) 로드 밸런싱 : Oracle9i Real Application Clusters 의 새로운 기능으로 리스너가 각 인스턴스의 부하에 대한 정보를 가지고 있어서 항상 부하가 덜 걸린 인스턴스쪽으로 클라이언트를 접속시켜 주는 방법이다.

그러면 이제 각각의 방법을 어떻게 구현할 수 있는지 차례로 살펴보자. 클라이언트 로드 밸런싱 앞서 설정했던 BASIC 메소드의 TAF 설정을 다음과 같이 수정해 보자. RAC_TAF = (description= (load_balance=on) (failover=on) (address=(protocol=tcp)(host=krrac1)(port=1521)) (address=(protocol=tcp)(host=krrac2)(port=1521)) (connect_data= (service_name=RAC) (failover_mode=(type=select)(method=basic)) ) )

Page 59: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

59-67

다른 것은 그대로 둔 채로 load_balance 부분만 on 으로 설정하면 클라이언트 로드 밸런싱이 구성된다. 이제 반복적으로 접속하여 결과를 보도록 하자. SQL> conn scott/tiger@rac_taf Connected. SQL> select userenv('instance') from dual; USERENV('INSTANCE') -------------------------- 2 SQL> conn scott/tiger@rac_taf Connected. SQL> select userenv('instance') from dual; USERENV('INSTANCE') -------------------------- 1 위와 같이 클라이언트는 인스턴스를 바꿔가며 RAC1, RAC2에 무작위로 접속하는 것을 볼 수 있다. 라운드

로빈(round-robin) 방식이 아닌 무작위(random) 방식이므로, 특별한 패턴을 찾을 수는 없지만, 접속 횟수가 많아질수록 균일하게 분배되는 것을 알 수 있을 것이다. 즉, 예제와 같이 2노드의 Oracle9i Real Application Clusters 환경에서 100회 반복하여 접속한다면, 거의 50:50으로 나누어지는 것을 확인할 수 있을 것이다. 클라이언트 로드 밸런싱을 하는 경우 특별히 동적 등록이 필요하지는 않으나, 예제와 같이 TAF와 함께 사

용하는 경우에는 반드시 동적 등록이 구성되어 있어야 한다. 리스너(커넥션) 로드 밸런싱 최초에 RAC1 인스턴스에는 100 개의 클라이언트, RAC2 인스턴스에는 10 개의 클라이언트가 접속되어 있었다고 가정하자. 이후에 다시 100 개의 새로운 클라이언트를 클라이언트 로드 밸런싱을 설정하여 접속시킨다면? 결과는 새로운 100 개의 클라이언트들은 50:50 으로 균일하게 분배되어 결국 최종적으로는 RAC1 인스턴스는 150 개, RAC2 인스턴스에는 60 개의 클라이언트가 붙을 것이다. 이렇게 되면 RAC1 인스턴스 입장에서는 불공평한 결과가 될 수 있다. 즉 RAC2 인스턴스가 훨씬 더 여유가 있다는 것을 미리 알아서, 새로이 들어오는 100 개의 클라이언트를 5:95 로 분배하여 결국 105:105 가 되도록 해준다면 각각의 인스턴스 입장에서는 언제나 공평한 결과를 만들 수 있다. 바로 이것이 Oracle9i Real Application Clusters 에서 새로 등장한 리스너(커넥션) 로드 밸런싱이며, 이것을 위해서는 서버쪽의 tnsnames.ora와 init.ora 에 다음과 같은 설정을 추가해야 한다. krrac1 의 tnsnames.ora 에 다음과 같은 항목을 추가해 보자. LISTENER_RAC2 = (description= (address=(protocol=tcp)(host=krrac2)(port=1521)) ) 그리고 SYSDBA 사용자로 다음과 같이 remote_listener 파라미터 값을 변경해 보자. SQL> alter system set remote_listener='LISTENER_RAC2'; System altered.

Page 60: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

60-67

이제 krrac2(krrac1 이 아님)의 리스너를 확인해 보자. <리스트 5>와 같이 RAC 서비스에 기존에 등록되어 있던 RAC2 인스턴스와 함께, RAC1 인스턴스도 추가로 동적으로 등록되어 있는 것을 볼 수 있다.

<리스트 5> 리스너 로드 밸런싱에서 리스너 확인

krrac2|/data/oracle> lsnrctl services LSNRCTL for Solaris: Version 9.2.0.3.0 - Production on 14-JUL-2003 15:29:55 Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=krrac2)(PORT=1521))) Services Summary... Service "RAC" has 2 instance(s). Instance "RAC1", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready REMOTE SERVER (DESCRIPTION=(address=(protocol=tcp)(host=krrac1)(port=1521))) Instance "RAC2", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:25 refused:0 state:ready LOCAL SERVER The command completed successfully

그러면, 이제 krrac2 의 tnsnames.ora, RAC2 인스턴스의 remote_listener 값을 마찬가지로 올바르게 설정했다면 krrac1 의 리스너에도 <리스트 6>과 같이 RAC1, RAC2 인스턴스가 모두 등록되어 있는 것을 확인할 수 있을 것이다.

<리스트 6> 리스너 로드 밸런싱에서 인스턴스의 등록 확인

krrac1|/data/oracle> lsnrctl services LSNRCTL for Solaris: Version 9.2.0.3.0 - Production on 14-JUL-2003 15:33:52 Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=krrac2)(PORT=1521)))

Services Summary... Service "RAC" has 2 instance(s). Instance "RAC1", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready REMOTE SERVER (DESCRIPTION=(address=(protocol=tcp)(host=krrac1)(port=1521))) Instance "RAC2", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:25 refused:0 state:ready LOCAL SERVER

Page 61: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

61-67

The command completed successfully

앞서 설명한 동적 등록이 무엇을 의미하는가를 기억한다면, 여기서 각각의 인스턴스가 remote_listener 파라미터를 사용함으로써 상대방 노드의 리스너에 자신의 상태를 지속적으로 업데이트해 주고 있다는 것을 눈치챌 수 있다. 즉, 예제와 같이 리스너(커넥션) 로드 밸런싱을 사용하는 경우 클라이언트는 접속할 때 다음과 같은 과정을 거치게 된다.

1. 클라이언트는 일단 TNS alias 의 address_list 의 첫 번째 항목인 krrac1 의 1521 포트로 기동된 리스너에 컨택한다.

2. krrac1 의 리스너는 RAC1, RAC2 인스턴스가 모두 등록되어 있으며, 각 인스턴스는 자신이 서비스가 가능한 상태인지의 여부와, 자신이 가지고 있는 부하(접속해 있는 클라이언트의 개수)를 지속적으로 업데이트해 주고 있으므로, 1 에서 리스너에 컨택한 클라이언트는 RAC1 과 RAC2 중 어느 것이 적은 수의 클라이언트를 가지고 있는지 알 수 있다.

3. 만일 RAC1 의 클라이언트 수가 적다면, 로컬 노드(krrac1)에서 Oracle Server Process(Foreground Process)를 만들어서 커넥션을 맺어 준다.

4. 만일 RAC2 의 클라이언트 수가 적다면, address_list 의 다음에 나오는 항목(리모트 노드 : krrac2 의 1521 포트)에 등록되어 있는 리스너로 리다이렉트시켜 준다.

5. krrac2 의 리스너는 이제 Oracle Server Process(Foreground Process)를 만들어서 커넥션을 맺어 준다.

따라서, 리스너의 서비스에 remote_listener 를 사용하여 Oracle9i Real Application Clusters 의 모든 인스턴스가 등록되어 있기만 하다면, 언제나 공평한 분배(로드 밸런싱)가 이루어질 수 있다. 설정 후 테스트는 다음과 같이 해볼 수 있다.

1. RAC1 인스턴스에만 로드 밸런싱을 사용하지 않고 미리 상당수의 커넥션을 맺어 놓는다(이를테면 10 개라고 하자.)

2. 이제 RAC_TAF TNS alias 를 가지고 반복적으로 접속해 보자. 10 개까지는 RAC2 에만 접속되어 각 인스턴스에 10 개씩의 클라이언트가 만들어질 것이다.

3. 이어서 지속적으로 RAC_TAF TNS alias 를 가지고 반복적으로 접속해 본다면, 이제는 각 인스턴스에 거의 번갈아서 접속하면서 클라이언트 개수의 총합이 언제나 50:50 으로 유지되는 것을 볼 수 있을 것이다.

마지막으로 주의할 점은, 리스너(커넥션) 로드 밸런싱은 항상 클라이언트 로드 밸런싱을 오버라이드하므로, remote_listener 가 설정되어 리스너에 여러 인스턴스가 등록되어 있는 경우, 아래와 같이 TNS alias 에서 클라이언트 로드 밸런싱을 사용하지 않더라도, 리스너(커넥션) 로드 밸런싱은 계속 이루어진다는 사실이다. 즉, 아래와 같이 TNS alias 를 설정한 경우에 로드 밸런싱이 일어나고 있다면, 일단 remote_listener 가 설정되어 있는지 우선 확인해 보도록 하자. RAC_TAF = (description= (load_balance=off) (failover=on) (address=(protocol=tcp)(host=krrac1)(port=1521)) (address=(protocol=tcp)(host=krrac2)(port=1521))

Page 62: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

62-67

(connect_data= (service_name=RAC) (failover_mode=(type=select)(method=basic)) ) remote_listener 값은 Oracle9i Database Release 2(9.2)부터는 아래와 같이 동적으로 해제할 수 있다. SQL> alter system set remote_listener=''; System altered. 이제까지 로드 밸런싱을 설명하면서 계속 TAF를 예로 들었지만, CTF 설정(failover_mode 부분 제고)으로도 똑 같은 로드 밸런싱을 구현할 수 있으며, 예제와 똑 같은 테스트를 할 수 있다.

Page 63: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

63-67

■ Troubleshooting

1.1 Installing the Oracle udlm package The SUN PDB software expects a node monitor, the Oracle7 UNIX DLM, to be present. The pdbinstall script, which installs and configures the PDB software, asks whether the Oracle RDBMS is to be used. If so, the pdbadmin stop and start scripts are configured to expect the presence of the Oracle Node Monitor. The pdbadmin scripts perform those functions necessary to join nodes together as a cluster. The Oracle Node Monitor can be found on the Oracle9 server installation CD-ROM, in the directory opspatch. Some documentation may refer to the Oracle Node Monitor as the “Parallel Server Patch”. The Oracle Node Monitor is supplied in a pkadd format to facilitate ease of installation on Solaris8. In order to install the Oracle Node Monitor perform the following operations:

• Shutdown all existing clients of the Oracle Node Monitor (including all Oracle RAC instances). • Become the root (super) user. • Shutdown the pdb software on all nodes

$ /opt/SUNWcluster/bin/pdbadmin stopnode • Backup the current Node Monitor configuration file (if present).

$ cd /etc/opt/SUNWcluster/conf $ cp <cluster_name1>.ora_cdb <cluster_name>.ora_cdb.save

• Install the Node Monitor software $ cd <CD-ROM mount>/opspatch $ cp ORCLudlm.tar.Z /tmp $ cd /tmp $ uncompress ORCLudlm.tar.Z $ tar xvf ORCLudlm.tar $ pkgadd –d . ORCLudlm

• Restore the original Node Monitor configuration file (if present). $ cd /etc/opt/SUNWcluster/conf $ cp <cluster_name>.ora_cdb.save <cluster_name>.ora_cdb

• Create the file /opt/SUNW/cluster/lib/udlm_shmem_addr_file.txt which contains the value 0x12000000 $ echo 0x12000000 > \ /opt/SUNWcluster/lib/udlm_shmem_addr_file.txt

• Ensure the Node Monitor configuration file contains valid entries. For example: oracle.maxproc : 1500 oracle.maxres : 30000 oracle.maxlock : 60000 oracle.dba.gid : dba oracle.useISM : 1

• Restart the pdb software on all nodes. $ /opt/SUNWcluster/bin/pdbadmin statrnode

Page 64: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

64-67

1.2 DBCA does not display the Real Application Clusters Welcome Page. The RAC Welcome Page is displayed by DBCA when it detects the operation of Cluster Manager (CM) software. If the Welcome Page displayed does NOT contain an option for a Cluster Database, then DBCA has not detected the CM. At the UNIX prompt issue the following command from the $ORACLE_HOME/bin directory:

$ lsnodes –v Consult relevant operating system documentation if the output indicates that the clusterware is not running.

1.3 Nodes do not appear in the DBCA Node Selection page. The Node Selection Page is displayed by DBCA in order for you to choose which nodes will be configured as members of your cluster database. In order to display nodes DBCA must detect the operation of Cluster Manager (CM) software. If a node does NOT appear on the Node Selection page, DBCA has not detected the CM. At the UNIX prompt issue the following command from the $ORACLE_HOME/bin directory:

$ lsnodes –v Consult relevant operating system documentation if the output indicates that the clusterware is not running.

1.4 DBCA Initialization Parameters dialog box. The selection of the button All Initialization Parameters from the Initialization Parameters page displays the initialization parameters dialog box. DBCA will only place parameters in to the server parameter file that have the field Included (Y?N) checked. There are also a few exceptions to what may be altered using this dialog box:

• The value of sid in the Instance column cannot be changed. • Setting inappropriate values for self-tuning features may disable self-tuning functionality. • Global parameters may NOT have an instance value set.

1.5 DBCA Database Storage page. The DBCA page for Database Storage allows you to enter file names for datafiles belonging to each tablespace. If you did NOT set the environment variable DBCA_RAW_CONFIG to point to a file containing name/value pairs associating tablespaces with raw device names, then DBCA will display default datafile names. You MUST override these names, providing valid raw device names for the control files, datafiles, and redo log groups to be included in your database. If you selected a template from the Database Templates page that includes datafiles (i.e. you did not choose New Database), tablespace information is not displayed on the Database Storage page. Instead temporary datafile names are supplied that you MUST override. It is not necessary to enter tablespace sizes when creating a database using a template that includes datafiles.

Page 65: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

65-67

References [Note : 175465.1] Step-By-Step Installation of 9i RAC on Sun Cluster v3 [Note : 137288.1] Manual Database Creation in Oracle9i (Single Instance and RAC) [Note : 189256.1] UNIX: Script to Verify Installation Requirements for Oracle 8.0.5 to 9.2 [A96600-02] Oracle9i Real Application Clusters Setup and Configuration Release 2 (9.2) Oracle Real Application Clusters Validation Matrix SUN Cluser 실습 정리 문서 (Sun Cluster 3.1)

Page 66: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

66-67

※ OPS rollback segements 구성 * OPS DB 생성후, RBS tablespace에 2 Node의 rollback segments가 전부 생성된다. 그냥 운영해도 무관하나, 다음과 같이 RBS를 분리 한다. RBS1, RBS2 tablespace 생성 create tablespace RBS1 datafile '/gjdata/system/rbs1_01.dbf' size 2048M; create tablespace RBS2 datafile '/gjdata/system/rbs2_01.dbf' size 2048M; 기존 rbs 삭제 alter rollback segment r01 offline; alter rollback segment r02 offline; alter rollback segment r03 offline; alter rollback segment r04 offline; alter rollback segment r05 offline; alter rollback segment r06 offline; alter rollback segment r07 offline; alter rollback segment r08 offline; alter rollback segment r09 offline; alter rollback segment r10 offline; drop rollback segment r01; drop rollback segment r02; drop rollback segment r03; drop rollback segment r04; drop rollback segment r05; drop rollback segment r06; drop rollback segment r07; drop rollback segment r08; drop rollback segment r09; drop rollback segment r10; OPS용 rbs 생성 create rollback segment r101 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r102 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r103 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r104 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r105 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r106 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r107 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r108 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r109 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r110 tablespace RBS1 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r201 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r202 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r203 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r204 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r205 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r206 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r207 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r208 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760);

Page 67: Oracle RAC9i(R2) for Sun Cluster Workshop

Oracle RAC9i(R2) for Sun Cluster Workshop

67-67

create rollback segment r209 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); create rollback segment r210 tablespace RBS2 storage ( initial 1048576 next 1048576 optimal 10485760); alter rollback segment r101 online; alter rollback segment r102 online; alter rollback segment r103 online; alter rollback segment r104 online; alter rollback segment r105 online; alter rollback segment r106 online; alter rollback segment r107 online; alter rollback segment r108 online; alter rollback segment r109 online; alter rollback segment r110 online; ★ Node1에서 Node2용 rbs를 online 하면 안됨. initOPS1.ora #rollback_segments = ( R01, R02, R03, R04, R05, R06, R07, R08, R09, R10 ) rollback_segments = ( R101, R102, R103, R104, R105, R106, R107, R108, R109, R110 ) initOPS2.ora rollback_segments = ( R201, R202, R203, R204, R205, R206, R207, R208, R209, R210 )