Multiple Oracle Home Installation Guide for Oracle® 10g (10.2.0.3) on Red Hat® Enterprise Linux® 4 Update 5 x86_64 The purpose of this document is to provide a procedure for installing a multiple Oracle Home for Oracle 10g (10.2.0.3) RAC on Red Hat Enterprise Linux AS 4 Update 5 x86_64. ASM Installation – Best PracticesKeep the following in mind when installing ASM • When running more than one database instance on a single server or node, it is recommended that you install ASM in its own Oracle home on that server or node. This is advisable even if you are running only one database instance but plan to add one or more database instances to the server or node in the future. With separate Oracle homes, you can upgrade and patch ASM and databases independently, and you can deinstall database software without impacting the ASM instance. If an ASM instance does not already exist and you select the OUI option to install and configure ASM only, OUI installs ASM in its own Oracle home. • If you are running a single database instance on a server or node and have no plans to add one or more database instances to this server or node, ASM and the database can share a single Oracle home.Deploying Oracle Database with separate ASM Home and Database HomeThe following section provides the detailed steps on how to configure multiple Oracle Homes forASM and Oracle instances [i.e. we will have Automatic Storage Management (ASM) instancerunning in one Oracle Home and Database instance running in another one]. A. OS Groups and Users setup B. Tasks to be completed before Oracle Home Installations C. ASM Oracle Home Installation D. Database Oracle Home Installation E. ASM instance setup in ASM Oracle Home F. Database instance setup in Database Oracle Home
G. Verification and validation A. OS Groups and Users SetupThe OS groups and their description are as given below – i. oinstall - owner of oracle inventory ii. asmdba - osdba group for ASM Oracle Home iii. dba - osdba group for Database Oracle HomeNote: Make sure that GID for the above OS groups is uniform across all nodes in the cluster.The OS users and their description are as given below – 1. oracleasm - owner of ASM Oracle Home. Member of oinstall, amsdba groups 2. oracle - owner of Database Oracle Home. Member of oinstall, dba, asmdba groupsNote: The following points should be considered for providing permissions for above OS users. • The oracle user for Database instance (oracle) needs to be a member of the dba group for the ASM instance (asmdba). • ASM oracle user (oracleasm) does not need to be in the dba group for the DB instance (dba). • Also all ASM disks must have read/write permission to the ASM dba group.
B. Tasks to be completed before Oracle Home InstallationsComplete the following steps before starting the ASM and Database Oracle Home installations • Make entry for oracle and oracleasm users in the /etc/hosts.equiv file for public, private and public nodes. Below is an example of the /etc/hosts.equiv entries- node1.dell.com oracle node2.dell.com oracle pnode1.dell.com oracle pnode2.dell.com oracle vnode1.dell.com oracle vnode2.dell.com oracle node1.dell.com oracleasm node2.dell.com oracleasm pnode1.dell.com oracleasm pnode2.dell.com oracleasm vnode1.dell.com oracleasm vnode2.dell.com oracleasm • Change permissions for ASM disks to oracleasm:asmdba • Create Oracle Base and Oracle Homes for ASM Oracle Home and Database Oracle Home as shown below. Oracle Base : /opt/oracle ASM Oracle Home : /opt/oracle/product/10.2.0/asm_1 Database Oracle Home : /opt/oracle/product/10.2.0/db_1 • Change ownership and permissions for ASM Oracle Home as shown below. chown –R oracleasm:asmdba /opt/oracle/product/10.2.0/asm_1 chmod 775 /opt/oracle/product/10.2.0/asm_1 • Change ownership and permissions for Database Oracle Home as shown below. chown –R oracleasm:asmdba /opt/oracle/product/10.2.0/db_1 chmod 775 /opt/oracle/product/10.2.0/db_1 • Create the OraInventory directory and set the permissions for that as shown below. OraInventory location : /opt/oracle/oraInventory chown –R oracleasm:asmdba /opt/oracle/oraInventory chmod 775 /opt/oracle/oraInventory
C. ASM Oracle Home Installation1. As root user, type: xhost +2. Login as oracleasm user and set the Oracle Home as /opt/oracle/product/10.2.0/asm_13. Start Oracle Universal Installer (OUI) by running runIstaller from the staging area.4. In the Specify Home Details window in the Path field, verify that the complete Oracle home path is /opt/oracle/product/10.2.0/asm_1 and click Next.5. In the privileged Operating System Groups window, provide the OSDBA and OSOPER group as ‘asmdba’6. Run the root.sh script as per the instruction to complete the installation.D. Database Oracle Home Installation1. Login as oracle user and set the Oracle Home as /opt/oracle/product/10.2.0/db_12. Start Oracle Universal Installer (OUI) by running runIstaller from the staging area.3. In the Specify Home Details window in the Path field, verify that the complete Oracle home path is a. /opt/oracle/product/10.2.0/db_1 and click Next.4. In the privileged Operating System Groups window, provide the OSDBA and OSOPER group as ‘dba’5. Run the root.sh script as per the instruction to complete the installation. Please note that while running root.sh, it recognizes the CSS daemon which was started during the previous root.sh script execution and hence it does not perform any additional actions.ASM and database instances can be created after the installations of above two OracleHomes.
E. ASM Instance Setup in ASM Oracle Home1. Invoke DBCA from the ASM Oracle Home (i.e. /opt/oracle/product/10.2.0/asm_1)2. In Select Storage Mechanism screen select “Use ASM as the storage for this database”.3. Clicking on the Next button, will create the ASM instance and prompts for creation of disk groups. Specify the disks you want to add to the disk group.4. Once the disk group is created and the ASM instance is up and running, go through the rest of the steps of DBCA and at the end, select “Save as a Database Template”. Please note that do not choose “Create Database” at the end, because the database will be created from the database Oracle Home.F. Database Instance Setup in Database Oracle Home1. Invoke DBCA from database Oracle Home (i.e. /opt/oracle/product/10.2.0/db_1)2. Provide Global Database name and SID as appropriate.3. Choose ASM as storage for database.4. When you click on Next, DBCA discovers that ASM instance is already up and running and it shows up the diskgroup created in the previous section.5. Go through the rest of the steps of DBCA and start choose to “Create Database” at the end.G. Verification and validation of the setupYou can check the status of Oracle instances, use and verify the following command andoutput.[oracle@node1 ~]$ ps –ef | grep pmonoracleasm 19958 1 0 14:01 ? 00:00:00 asm_pmon_+ASMoracle 20004 1 0 14:45 ? 00:00:00 ora_pmon_testdbAs shown above, +ASM instance is running under oracleasm user and testdb database isrunning under oracle user.
Also you can login to ASM instance and check that testdb as a client for ASM instance. Thefollowing command and output validate the sameSQL> select * from v$asm_client;INSTANCE_NAME DB_NAME STATUStestdb test_db connected