Oracle 10g RAC on Linux Using NFS

download Oracle 10g RAC on Linux Using NFS

of 39

Transcript of Oracle 10g RAC on Linux Using NFS

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    1/39

    Oracle 10g RAC On Linux Using NFS

    This article describes the installation of Oracle 10g release 2 (10.2.0.1) RAC on Linux (OracleEnterprise Linux 4.5) using NFS to provide the shared storage.

    Introduction Download Software

    Operating System Installation

    Oracle Installation Prerequisites

    Create Shared Disks

    Install the Clusterware Software

    Install the Database Software

    Create a Database using the DBCA

    TNS Configuration

    Check the Status of the RAC

    Direct and Asynchronous I/O

    Introduction

    NFS is an abbreviation of Network File System, a platform independent technology created by SunMicrosystems that allows shared access to files stored on computers via an interface called the VirtualFile System (VFS) that runs on top of TCP/IP. Computers that share files are considered NFS servers,while those that access shared files are considered NFS clients. An individual computer can be eitheran NFS server, a NFS client or both.

    We can use NFS to provide shared storage for a RAC installation. In a production environment wewould expect the NFS server to be a NAS, but for testing it can just as easily be another server, or evenone of the RAC nodes itself.

    To cut costs, this articles uses one of the RAC nodes as the source of the shared storage. Obviously,this means if that node goes down the whole database is lost, so it's not a sensible idea to do this if youare testing high availability. If you have access to a NAS or a third server you can easily use that forthe shared storage, making the whole solution much more resilient. Whichever route you take, thefundamentals of the installation are the same.

    Operating System Installation

    This article uses Oracle Enterprise Linux 4.5, but it will work equally well on CentOS 4 or Red HatEnterprise Linux (RHEL) 4. A general pictorial guide to the operating system installation can be foundhere. More specifically, it should be a server installation with a minimum of 2G swap, firewall andsecure Linux disabled and the following package groups installed:

    X Window System

    GNOME Desktop Environment

    Editors

    Graphical Internet

    Server Configuration Tools

    FTP Server

    Development Tools

    Legacy Software Development

    Administration Tools

    System Tools

    http://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#introductionhttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#introductionhttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#download_softwarehttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#os_installationhttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#os_installationhttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#oracle_installation_prerequisiteshttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#create_shared_diskshttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#create_shared_diskshttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#install_clusterwarehttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#install_db_softwarehttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#install_db_softwarehttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#create_db_using_dbcahttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#tns_confighttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#tns_confighttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#check_status_of_rachttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#direct_and_asynchronous_iohttp://www.oracle-base.com/articles/linux/OracleEnterpriseLinux4Installation.phphttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#download_softwarehttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#os_installationhttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#oracle_installation_prerequisiteshttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#create_shared_diskshttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#install_clusterwarehttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#install_db_softwarehttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#create_db_using_dbcahttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#tns_confighttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#check_status_of_rachttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#direct_and_asynchronous_iohttp://www.oracle-base.com/articles/linux/OracleEnterpriseLinux4Installation.phphttp://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnLinuxUsingNFS.php#introduction
  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    2/39

    To be consistent with the rest of the article, the following information should be set during theinstallation:

    vmlinux1:

    hostname: vmlinux1

    IP Address eth0: 192.168.1.111 (public address)

    Default Gateway eth0: 192.168.1.1 (public address)

    IP Address eth1: 192.168.2.111 (private address)

    Default Gateway eth1: none

    Vmlinux2:

    hostname: vmlinux2

    IP Address eth0: 192.168.2.112 (public address)

    Default Gateway eth0: 192.168.2.1 (public address)

    IP Address eth1: 192.168.2.112 (private address)

    Default Gateway eth1: none

    You are free to change the IP addresses to suit your network, but remember to stay consistent withthose adjustments throughout the rest of the article.

    Once the basic installation is complete, install the following packages whilst logged in as the root user.# From Oracle Enterprise Linux 4.5 Disk 1cd /media/cdrecorder/CentOS/RPMSrpm -Uvh setarch-1*rpm -Uvh compat-libstdc++-33-3*rpm -Uvh make-3*rpm -Uvh glibc-2*cd /

    eject

    # From Oracle Enterprise Linux 4.5 Disk 2cd /media/cdrecorder/CentOS/RPMSrpm -Uvh openmotif-2*rpm -Uvh compat-db-4*rpm -Uvh gcc-3*cd /eject

    # From Oracle Enterprise Linux 4.5 Disk 3cd /media/cdrecorder/CentOS/RPMSrpm -Uvh libaio-0*

    rpm -Uvh rsh-*rpm -Uvh compat-gcc-32-3*rpm -Uvh compat-gcc-32-c++-3*rpm -Uvh openmotif21*cd /eject

    Oracle Installation Prerequisites

    Perform the following steps whilst logged into the RAC1 virtual machine as the root user.

    The /etc/hosts file must contain the following information.127.0.0.1 localhost.localdomain localhost# Public

    192.168.1.111 vmlinux1

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    3/39

    192.168.1.112 vmlinux2#Private

    192.168.2.111 vmlinux1-priv

    192.168.2.112 vmlinux2-priv#Virtual

    192.168.1.211 vmlinux1-vip

    192.168.1.212 vmlinux2-vip#NAS192.168.1.111 nas1

    Notice that the NAS1 entry is actually pointing to the RAC1 node. If you are using a real NAS or athird server to provide your shared storage put the correct IP address into the file.

    Add the following lines to the /etc/sysctl.conf file.kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128#fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000#net.core.rmem_default=262144#net.core.rmem_max=262144#net.core.wmem_default=262144#net.core.wmem_max=262144

    # Additional and amended parameters suggested by Kevin Clossonnet.core.rmem_default = 524288net.core.wmem_default = 524288net.core.rmem_max = 16777216net.core.wmem_max = 16777216net.ipv4.ipfrag_high_thresh=524288net.ipv4.ipfrag_low_thresh=393216

    net.ipv4.tcp_rmem=4096 524288 16777216net.ipv4.tcp_wmem=4096 524288 16777216net.ipv4.tcp_timestamps=0net.ipv4.tcp_sack=0net.ipv4.tcp_window_scaling=1net.core.optmem_max=524287net.core.netdev_max_backlog=2500sunrpc.tcp_slot_table_entries=128sunrpc.udp_slot_table_entries=128net.ipv4.tcp_mem=16384 16384 16384

    Run the following command to change the current kernel parameters./sbin/sysctl -p

    Add the following lines to the /etc/security/limits.conf file.oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536

    Add the following line to the /etc/pam.d/login file, if it does not already exist.session required /lib/security/pam_limits.so

    Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set asfollows.SELINUX=disabled

    Alternatively, this alteration can be done using the GUI tool (Applications > System Settings >Security Level). Click on the SELinux tab and disable the feature.

    Set the hangcheck kernel module parameters by adding the following line to the /etc/modprobe.conffile.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    4/39

    options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

    To load the module immediately, execute "modprobe -v hangcheck-timer".

    Create the new groups and users.groupadd oinstallgroupadd dba

    groupadd oper

    useradd -g oinstall -G dba oraclepasswd oracle

    During the installation, both RSH and RSH-Server were installed. Enable remote shell and rlogin bydoing the following.chkconfig rsh onchkconfig rlogin onservice xinetd reload

    Create the /etc/hosts.equiv file as the root user.touch /etc/hosts.equivchmod 600 /etc/hosts.equivchown root:root /etc/hosts.equiv

    Edit the /etc/hosts.equiv file to include all the RAC nodes:+vmlinux1 oracle+vmlinux2 oracle+vmlinux1-priv oracle+vmlinux2-priv oracle

    Login as the oracle user and add the following lines at the end of the .bash_profile file at vmlinux1.

    # Oracle SettingsTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIR

    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

    ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOMEORACLE_SID=RAC1; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; exportLD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;export CLASSPATH

    if [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; then

    ulimit -p 16384ulimit -n 65536

    elseulimit -u 16384 -n 65536

    fifi

    Login as the oracle user and add the following lines at the end of the .bash_profile file at vmlinux1.

    # Oracle SettingsTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIR

    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    5/39

    ORACLE_SID=RAC2; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export

    LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;export CLASSPATH

    if [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536

    elseulimit -u 16384 -n 65536

    fifi

    Create Shared Disks

    First we need to set up some NFS shares. In this case we will do this on the RAC1 node, but you can dothe on a NAS or a third server if you have one available. On the RAC1 node create the followingdirectories.mkdir /share1mkdir /share2

    Add the following lines to the /etc/exports file.

    /share1

    *(rw,sync,no_wdelay,insecure_locks,no_root_squash)/share2*(rw,sync,no_wdelay,insecure_locks,no_root_squash)

    Run the following command to export the NFS shares.

    chkconfig nfs onservice nfs restart

    On both RAC1 and RAC2 create some mount points to mount the NFS shares to.mkdir /u01mkdir /u02

    Add the following lines to the "/etc/fstab" file. The mount options are suggestions from Kevin Closson.

    nas1:/share1 /u01 nfsrw,bg,hard,nointr,tcp,vers=3,timeo=300,rsize=32768,wsize=32768,actimeo=0 0 0nas1:/share2 /u02 nfsrw,bg,hard,nointr,tcp,vers=3,timeo=300,rsize=32768,wsize=32768,actimeo=0 0 0

    Mount the NFS shares on both servers.

    mount /u01mount /u02

    Create the shared CRS Configuration and Voting Disk files.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    6/39

    touch /u01/crs_configurationtouch /u01/voting_disk

    Create the directories in which the Oracle software will be installed.

    mkdir -p /u01/crs/oracle/product/10.2.0/crs

    mkdir -p /u01/app/oracle/product/10.2.0/db_1mkdir -p /u01/oradatachown -R oracle:oinstall /u01 /u02

    Install the Clusterware Software

    Place the clusterware and database software in the /u02 directory and unzip it.

    cd /u02unzip 10201_clusterware_linux32.zipunzip 10201_database_linux32.zip

    Login to RAC1 as the oracle user and start the Oracle installer.

    cd /u02/clusterware./runInstaller

    On the "Welcome" screen, click the "Next" button.

    Accept the default inventory location by clicking the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    7/39

    Enter the appropriate name and path for the Oracle Home and click the "Next" button.

    Wait while the prerequisite checks are done. If you have any failures correct them and retry the testsbefore clicking the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    8/39

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    9/39

    Click the "Next" button to continue.

    The "Specific Network Interface Usage" screen defines how each network interface will be used.Highlight the "eth0" interface and click the "Edit" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    10/39

    Set the "eht0" interface type to "Public" and click the "OK" button.

    Leave the "eth1" interface as private and click the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    11/39

    Click the "External Redundancy" option, enter "/u01/ocr_configuration" as the OCR Location and clickthe "Next" button. To have greater redundancy we would need to define another shared disk for analternate location.

    Click the "External Redundancy" option, enter "/u01/voting_disk" as the Voting Disk Location andclick the "Next" button. To have greater redundancy we would need to define another shared disk foran alternate location.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    12/39

    On the "Summary" screen, click the "Install" button to continue.

    Wait while the installation takes place.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    13/39

    Once the install is complete, run the orainstRoot.sh and root.sh scripts on both nodes as directed on thefollowing screen.

    The output from the orainstRoot.sh file should look something like that listed below.# cd /u01/app/oracle/oraInventory# ./orainstRoot.shChanging permissions of /u01/app/oracle/oraInventory to 770.Changing groupname of /u01/app/oracle/oraInventory to oinstall.The execution of the script is complete#

    The output of the root.sh will vary a little depending on the node it is run on. The following text is theoutput from the RAC1 node.# cd /u01/crs/oracle/product/10.2.0/crs# ./root.shWARNING: directory '/u01/crs/oracle/product/10.2.0' is not owned byroot

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    14/39

    WARNING: directory '/u01/crs/oracle/product' is not owned by rootWARNING: directory '/u01/crs/oracle' is not owned by rootWARNING: directory '/u01/crs' is not owned by rootWARNING: directory '/u01' is not owned by rootChecking to see if Oracle CRS stack is already configured/etc/oracle does not exist. Creating it now.

    Setting the permissions on OCR backup directorySetting up NS directoriesOracle Cluster Registry configuration upgraded successfullyWARNING: directory '/u01/crs/oracle/product/10.2.0' is not owned byrootWARNING: directory '/u01/crs/oracle/product' is not owned by rootWARNING: directory '/u01/crs/oracle' is not owned by rootWARNING: directory '/u01/crs' is not owned by rootWARNING: directory '/u01' is not owned by rootassigning default hostname rac1 for node 1.assigning default hostname rac2 for node 2.Successfully accumulated necessary OCR keys.

    Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.node : node 1: rac1 rac1-priv rac1node 2: rac2 rac2-priv rac2Creating OCR keys for user 'root', privgrp 'root'..Operation successful.Now formatting voting device: /u01/voting_diskFormat of 1 voting devices complete.Startup will be queued to init within 90 seconds.Adding daemons to inittabExpecting the CRS daemons to be up within 600 seconds.CSS is active on these nodes.

    rac1

    CSS is inactive on these nodes.rac2Local node checking complete.Run root.sh on remaining nodes to start CRS daemons.#

    Ignore the directory ownership warnings. We should really use a separate directory structure for theclusterware so it can be owned by the root user, but it has little effect on the finished results.

    The output from the RAC2 node is listed below.# /u01/crs/oracle/product/10.2.0/crs# ./root.shWARNING: directory '/u01/crs/oracle/product/10.2.0' is not owned byroot

    WARNING: directory '/u01/crs/oracle/product' is not owned by rootWARNING: directory '/u01/crs/oracle' is not owned by rootWARNING: directory '/u01/crs' is not owned by rootWARNING: directory '/u01' is not owned by rootChecking to see if Oracle CRS stack is already configured/etc/oracle does not exist. Creating it now.

    Setting the permissions on OCR backup directorySetting up NS directoriesOracle Cluster Registry configuration upgraded successfullyWARNING: directory '/u01/crs/oracle/product/10.2.0' is not owned byrootWARNING: directory '/u01/crs/oracle/product' is not owned by root

    WARNING: directory '/u01/crs/oracle' is not owned by rootWARNING: directory '/u01/crs' is not owned by rootWARNING: directory '/u01' is not owned by root

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    15/39

    clscfg: EXISTING configuration version 3 detected.clscfg: version 3 is 10G Release 2.assigning default hostname rac1 for node 1.assigning default hostname rac2 for node 2.Successfully accumulated necessary OCR keys.Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

    node : node 1: rac1 rac1-priv rac1node 2: rac2 rac2-priv rac2clscfg: Arguments check out successfully.

    NO KEYS WERE WRITTEN. Supply -force parameter to override.-force is destructive and will destroy any previous clusterconfiguration.Oracle Cluster Registry for cluster has already been initializedStartup will be queued to init within 90 seconds.Adding daemons to inittabExpecting the CRS daemons to be up within 600 seconds.CSS is active on these nodes.

    rac1rac2CSS is active on all nodes.Waiting for the Oracle CRSD and EVMD to startWaiting for the Oracle CRSD and EVMD to startWaiting for the Oracle CRSD and EVMD to startWaiting for the Oracle CRSD and EVMD to startWaiting for the Oracle CRSD and EVMD to startWaiting for the Oracle CRSD and EVMD to startWaiting for the Oracle CRSD and EVMD to startOracle CRS stack installed and running under init(1M)Running vipca(silent) for configuring nodeappsThe given interface(s), "eth0" is not public. Public interfaces

    should be used to configure virtual IPs.#

    Here you can see that some of the configuration steps are omitted as they were done by the first node.In addition, the final part of the script ran the Virtual IP Configuration Assistant (VIPCA) in silentmode, but it failed. This is because my public IP addresses are actually within the "192.168.255.255"range which is a private IP range. If you were using "legal" IP addresses you would not see this andyou could ignore the following VIPCA steps.

    Run the VIPCA manually as the root user on the RAC2 node using the following command.# cd /u01/crs/oracle/product/10.2.0/crs/bin# ./vipca

    Click the "Next" button on the VIPCA welcome screen.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    16/39

    Highlight the "eth0" interface and click the "Next" button.

    Enter the vitual IP alias and address for each node. Once you enter the first alias, the remaining valuesshould default automatically. Click the "Next" button to continue.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    17/39

    Accept the summary information by clicking the "Finish" button.

    Wait until the configuration is complete, then click the "OK" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    18/39

    Accept the VIPCA results by clicking the "Exit" button.

    You should now return to the "Execute Configuration Scripts" screen on RAC1 and click the "OK"button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    19/39

    Wait for the configuration assistants to complete.

    When the installation is complete, click the "Exit" button to leave the installer.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    20/39

    The clusterware installation is now complete.

    Install the Database Software

    Login to RAC1 as the oracle user and start the Oracle installer.cd /u02/database./runInstaller

    On the "Welcome" screen, click the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    21/39

    Select the "Enterprise Edition" option and click the "Next" button.

    Enter the name and path for the Oracle Home and click the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    22/39

    Select the "Cluster Install" option and make sure both RAC nodes are selected, the click the "Next"button.

    Wait while the prerequisite checks are done. If you have any failures correct them and retry the testsbefore clicking the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    23/39

    Select the "Install database Software only" option, then click the "Next" button.

    On the "Summary" screen, click the "Install" button to continue.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    24/39

    Wait while the database software installs.

    Once the installation is complete, wait while the configuration assistants run.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    25/39

    Execute the "root.sh" scripts on both nodes, as instructed on the "Execute Configuration scripts"screen, then click the "OK" button.

    When the installation is complete, click the "Exit" button to leave the installer.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    26/39

    TNS Configuration

    Once the installation is complete, the "$ORACLE_HOME/network/admin/listener.ora" file in theshared $ORACLE_HOME will contain the following entries.LISTENER_RAC2 =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.lynx.co.uk)(PORT

    = 1521)(IP = FIRST)))(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.102)(PORT =

    1521)(IP = FIRST)))(ADDRESS_LIST =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))

    ))

    )

    LISTENER_RAC1 =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.lynx.co.uk)(PORT

    = 1521)(IP = FIRST)))(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.101)(PORT =

    1521)(IP = FIRST)))

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    27/39

    (ADDRESS_LIST =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))

    ))

    )

    The shared "$ORACLE_HOME/network/admin/tnsnames.ora" file will contain the following entries.

    RAC =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.lynx.co.uk)(PORT =

    1521))(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.lynx.co.uk)(PORT =

    1521))(LOAD_BALANCE = yes)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = RAC.WORLD)

    ))

    LISTENERS_RAC =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.lynx.co.uk)(PORT =

    1521))(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.lynx.co.uk)(PORT =

    1521)))

    RAC2 =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip.lynx.co.uk)(PORT =

    1521))(CONNECT_DATA =

    (SERVER = DEDICATED)(SERVICE_NAME = RAC.WORLD)(INSTANCE_NAME = RAC2)

    ))

    RAC1 =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip.lynx.co.uk)(PORT =

    1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = RAC.WORLD)

    (INSTANCE_NAME = RAC1)))

    Create a Database using the DBCA

    Login to RAC1 as the oracle user and start the Database Configuration Assistant.dbca

    On the "Welcome" screen, select the "Oracle Real Application Clusters database" option and click the"Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    28/39

    Select the "Create a Database" option and click the "Next" button.

    Highlight both RAC nodes and click the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    29/39

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    30/39

    Accept the management options by clicking the "Next" button. If you are attempting the installation ona server with limited memory, you may prefer not to configure Enterprise Manager at this time.

    Enter database passwords then click the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    31/39

    Select the "Cluster File System" option, then click the "Next" button.

    Select the "Use Oracle-Managed Files" option and enter "/u01/oradata/" as the database location, thenclick the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    32/39

    Check the "Specify Flash Recovery Area" option and accept the default location by clicking the "Next"button.

    Uncheck all but the "Enterprise Manager Repository" option, then click the "Standard DatabaseComponents..." button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    33/39

    Uncheck all but the "Oracle JVM" option, then click the "OK" button, followed by the "Next" buttonon the previous screen. If you are attempting the installation on a server with limited memory, you may

    prefer not to install the JVM at this time.

    Accept the current database services configuration by clicking the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    34/39

    Select the "Custom" memory management option and accept the default settings by clicking the "Next"button.

    Accept the database storage settings by clicking the "Next" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    35/39

    Accept the database creation options by clicking the "Finish" button.

    Accept the summary information by clicking the "OK" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    36/39

    Wait while the database is created.

    Once the database creation is complete you are presented with the following screen. Make a note of theinformation on the screen and click the "Exit" button.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    37/39

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    38/39

    The V$ACTIVE_INSTANCES view can also display the current status of the instances.$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 18 12:15:15 2006

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 -ProductionWith the Partitioning, Real Application Clusters, OLAP and DataMining options

    SQL> SELECT * FROM v$active_instances;

    INST_NUMBER INST_NAME-----------------------------------------------------------------------

    1 rac1.localdomain:RAC12 rac2.localdomain:RAC2

    SQL>

    Finally, the GV$ allow you to display global information for the whole RAC.SQL> SELECT inst_id, username, sid, serial# FROM gv$session WHEREusername IS NOT NULL;

    INST_ID USERNAME SID SERIAL#---------- ------------------------------ ---------- ----------

    1 SYS 127 21 SYS 128 281 SYS 130 10

    1 SYS 131 41 SYS 133 91 DBSNMP 134 271 DBSNMP 135 11 SYS 153 1222 SYSMAN 120 2432 DBSNMP 122 372 DBSNMP 124 93

    INST_ID USERNAME SID SERIAL#---------- ------------------------------ ---------- ----------

    2 SYSMAN 125 22 SYSMAN 127 6

    2 SYS 128 262 SYS 129 302 SYS 130 32 SYS 133 1492 SYSMAN 134 582 SYS 136 32

    19 rows selected.

    SQL>

    If you have configured Enterprise Manager, it can be used to view the configuration and current statusof the database.

  • 8/8/2019 Oracle 10g RAC on Linux Using NFS

    39/39