Top
PRIMECLUSTER Wizard for Oracle (PRIMEQUEST) 4.3 Configuration and Administration Guide
FUJITSU Software

Appendix C Oracle Grid Infrastructure Installation and Oracle ASM instance, Oracle Database Creation

This section describes how to install Oracle Grid Infrastructure and Oracle Database when you use Oracle ASM of Oracle Database 11g R2/12c R1.

Point

When Oracle ASM of Oracle Database 11g R2/12c R1 is used in standby operation, it is necessary to install Oracle Grid Infrastructure.

Note

  • In order to use Oracle ASM of Oracle Database 11g R2/12c R1, it is necessary to install Oracle Grid Infrastructure. When installing Oracle Grid Infrastructure, the composition which separates the installation user of Oracle Database and the installation user of Oracle Grid Infrastructure is supported. The composition which creating one user is not supported.
    A different directory must be assigned respectively for an ORACLE_BASE of the installation user of Oracle Database and an ORACLE_BASE of the installation user of Oracle Grid Infrastructure.

  • When using Oracle ASM of Oracle Database 11g R2/12c R1 in standby node, database services are not available.

Install Oracle Grid Infrastructure and Oracle Database on the local disk of each node.

The Oracle ASM instance and database are only created on the operating node. The standby node will only set the Oracle ASM instance and the database made by the operation node.

The table below shows the procedure for settings of Oracle Grid Infrastructure and Oracle Database.

No

Overview

Operating node

Standby node

1

Set up the kernel parameter

Set up the kernel parameter

2

Create Grid user, Oracle user

Create Grid user, Oracle user

3

Set up shared disk units

4

Create userApplication
with No Oracle Resources

Create userApplication
with No Oracle Resources

5

userApplication startup

6

Install Oracle Grid Infrastructure

7

Install Oracle Database

8

Create Oracle Database

9

Change IP address of the Oracle listener

10

Check SPFILE of Oracle ASM

11

Check parameter file of the database

12

Stop Oracle Database, Oracle ASM,
Oracle listener

13

userApplication switch

14

Install Oracle Grid Infrastructure

15

Install Oracle Database

16

Copy directory of Oracle

Copy directory of Oracle

17

Restart the Oracle listener

18

Change SPFILE of Oracle ASM

19

Stop temporary diskgroup

20

Restart the Oracle ASM

21

Delete temporary diskgroup

22

Register Oracle Database resource

23

Start Oracle Database resource

24

Stop Oracle Database, Oracle ASM,
Oracle listener

For details of each step as follows.

  1. Set up the kernel parameter
    Set up values in the /etc/sysctl.conf file for Oracle database in addition to the values for PRIMECLUSTER.
    The kernel parameter values vary depending on the implemented Oracle Database versions.
    Refer to the Oracle Database installation guide. The parameter values should be the same on all the nodes.

    For semopm, specify a value of 4 or more.

  2. Create Grid user, Oracle user

    Create separate users, Grid user and Oracle user. Grid user is for installation of Oracle Grid Infrastructure and Oracle user is for Oracle Database.
    Set a different directory for an ORACLE_BASE of the installation user of Oracle Database and an ORACLE_BASE of the installation user of Oracle Grid Infrastructure, respectively.
    Set ORACLE_HOME of Oracle Grid Infrastructure to Grid user's ORACLE_HOME environment variable.
    Set ORACLE_HOME of Oracle Database to Oracle user's ORACLE_HOME environment variable.
    Set ORACLE_SID of Oracle Grid Infrastructure to Grid user's ORACLE_SID environment variable.
    Set ORACLE_SID of Oracle Database to Oracle user's ORACLE_SID environment variable.The user ID, the group ID and environment variable must be the same on all nodes.

    Example

    The example of setting Oracle user's environment variable.
    (.bash_profile)

    ORACLE_BASE=/u01/app/oracle;  export ORACLE_BASE
    ORACLE_HOME=/u01/app/oracle/product/db;  export ORACLE_HOME
    ORACLE_SID=ora;  export ORACLE_SID
    LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
    PATH=$ORACLE_HOME/bin:/usr/bin:/bin:/usr/bin/X11/:/usr/local/bin;  export PATH

    Example

    The example of setting Grid user's environment variable.

    (.bash_profile)

    ORACLE_BASE=/u01/app/grid;  export ORACLE_BASE
    ORACLE_HOME=/u01/app/grid/product/db;  export ORACLE_HOME
    ORACLE_SID=+ASM;  export ORACLE_SID
    PATH=$ORACLE_HOME/bin:/usr/bin:/bin:/usr/bin/X11/:/usr/local/bin;  export PATH
  3. Set up shared disk units

    Set shared disk units that are managed by Oracle ASM. At this time, create at least more than two volumes (devices) on share disk. These volumes are used for storing database or making temporary diskgroup on the step 14. Set the Grid user to the owner of the device files of the shared disk.

  4. Create userApplication with No Oracle Resources

    Create userApplication that does not include Oracle resources before installing Oracle Grid Infrastructure.
    For information on how to create the userApplication, see following.

  5. userApplication startup on operation node

    Start userApplication on operation node, and verify the shared disk units and the takeover IP address are enabled.

  6. Install Oracle Grid Infrastructure on operation node

    Install Oracle Grid Infrastructure to the local disks on operation node with Grid user according to the Oracle Database manuals and the installation guide.

    • Oracle Database 11g R2
      Select the "Configure Oracle Grid Infrastructure for a Standalone Server" option to install and create the Oracle ASM instance and the diskgroup which stores the database.

    • Oracle Database 12c R1
      Select the "Install and Configure Oracle Grid Infrastructure for a Standalone Server" option to install and create the Oracle ASM instance and the disk group which stores the database.

    The Oracle ASM instance name must begin with "+". The default name is "+ASM".

  7. Install Oracle Database on operation node

    Install Oracle Database to the local disks on operation node with Oracle user by referring to the Oracle Database manual and installation guide. Install only Oracle Database software, and do not create the database in this step.

  8. Create Oracle Database on operation node

    On operation node, create Oracle Database on diskgroup made at step 6.

  9. Change IP address of the Oracle listener

    If you use Oracle listener switching operation using a logical IP address, specify the logical IP address for the IP address of the Oracle listener.

    • <Grid user's $ORACLE_HOME>/network/admin/listener.ora

      If the Oracle listener is monitored through tnsping, set up the following file.

    • <Oracle user's $ORACLE_HOME>/network/admin/tnsnames.ora

    • <Grid user's $ORACLE_HOME>/network/admin/tnsnames.ora

    For information on how to modify, see "2.2.6 Oracle Database Creation and Setting".

  10. Check SPFILE of Oracle ASM

    Execute the following command as a Grid user on operation node and record the location of the Oracle ASM SPFILE.

    # su - <Grid user>
    $ export ORACLE_SID=+ASM
    $ asmcmd spget
    +DATA/asm/asmparameterfile/registry.xxx  <-- record this line
  11. Check parameter file of the database

    Execute the following command as a Grid user on operation node and record the location of the SPFILE.

    # su - <Grid user>
    $ crsctl status resource <Oracle Database resource name> -p | grep SPFILE
    SPFILE=+DATA/xxxx/spfilexxxx.ora  <-- record after "SPFILE =" of this line

    Example

    You can confirm <Oracle Database resource name> using "crsctl status resource -t" command.

    # su - <Grid user>
    $ crsctl status resource -t
    --------------------------------------------------------------------------------
    NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.DATA.dg
                   ONLINE  ONLINE       node1                                        
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       node1                                        
    ora.asm
                   ONLINE  ONLINE       node1                    Started             
    ora.ons
                   OFFLINE OFFLINE      node1                                        
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.orcl.db
          1        ONLINE  ONLINE       node1                    Open                
    ora.cssd
          1        ONLINE  ONLINE       node1                                        
    ora.diskmon
          1        OFFLINE OFFLINE                                                   
    ora.evmd
          1        ONLINE  ONLINE       node1                                        
    $

    In the above configuration, <Oracle Database resource name> is "ora.racdb.db".

  12. Stop Oracle Database, Oracle ASM, Oracle listener

    Execute the following command as a Grid user on operation node to stop Oracle instance, Oracle ASM, Oracle listener. Specify the database name made at step 8 for <db_name>. Specify the Diskgroup made at step 6 for <diskgroup_name>.

    # su - <Grid user>
    $ srvctl stop database -d <db_name>
    $ srvctl stop diskgroup -g <diskgroup_name>
    $ srvctl stop asm
    $ srvctl stop listener
  13. userApplication switch

    Switch userApplication to the standby node, and verify the shared disk units and the takeover IP address are enabled.

  14. Install Oracle Grid Infrastructure on standby node

    Install Oracle Database to the local disks on standby node with Grid user according to the Oracle Database manuals and the installation guide.

    • Oracle Database 11g R2
      Select the "Configure Oracle Grid Infrastructure for a Standalone Server" option to unstall and create Oracle ASM instance and the temporary diskgroup.

    • Oracle Database 12c R1
      Select the "Install and Configure Oracle Grid Infrastructure for a Standalone Server" option to install and create Oracle ASM instance and the temporary diskgroup.

    Specify the Oracle ASM instance name. The Oracle ASM instance name must be same made at step 6.

    Specify the temporary diskgroup name. The temporary diskgroup name must be different name made at step 6.

  15. Install Oracle Database on standby node

    Install Oracle Database to the local disks on standby node with Oracle user by referring to the Oracle Database manual and installation guide. Install only Oracle Database software, and do not create the database in this step.

  16. Copy directory of Oracle database

    Copy the following directories of the operation node to the standby node.

    • Under <Oracle user’s $ORACLE_HOME>/dbs

    • Under <$ORACLE_BASE>/admin/$ORACLE_SID

    • Under <$ORACLE_BASE>/diag

    • Under <Grid user’s $ORACLE_HOME>/network/admin

    The access privilege to the directories and files must be also the same as that on the operating node.

    Information

    The required files on the operating node can be backed up in the tar format with the "cloracpy" command. See "4.4 cloracpy - Create Backup File for Oracle Database Setup".

    If you use the "cloracpy" command, you must execute respectively by the Oracle user and the Grid user.

  17. Restart the Oracle listener

    Execute the following command as a Grid user on standby node and verify that the Oracle listener restarts.

    # su - <Grid user>
    $ srvctl stop listener
    $ srvctl start listener
  18. Change SPFILE of Oracle ASM

    Set the location of the Oracle ASM SPFILE recorded at step 10.

    • Oracle Database 11g R2
      Execute the following command as a Grid user on standby node.

      # su - <Grid user>
      $ export ORACLE_SID=<ASM SID>
      $ asmcmd spset <SPFILE PATH>
    • Oracle Database 12c R1
      Execute the following command as a Grid user on standby node.
      Specify the diskgroup made at step 6 for <diskgroup_name>.

      # su - <Grid user>
      $ export ORACLE_SID=<ASM SID>
      $ sqlplus / as sysasm
      SQL> alter diskgroup <diskgroup_name> mount;
      SQL> exit
      $ asmcmd spset <SPFILE PATH>
      # su - <Grid user>
      $ srvctl stop diskgroup -g <diskgroup_name>
  19. Stop temporary diskgroup

    Execute the following command as a Grid user on standby node to stop temporary diskgroup.

    Specify the temporary diskgroup name made at step 14 for <diskgroup_name>.

    # su - <Grid user>
    $ srvctl stop diskgroup -g <diskgroup_name>
  20. Restart the Oracle ASM

    Execute the following command as a Grid user on standby node to restart the Oracle ASM.

    # su - <Grid user>
    $ srvctl stop asm
    $ srvctl start asm
  21. Delete temporary diskgroup

    Execute the following command as a Grid user on standby node to delete temporary diskgroup.
    Specify the temporary diskgroup name made at step 14 for <diskgroup_name>.

    # su - <Grid user>
    $ srvctl remove diskgroup -g <diskgroup_name>
  22. Register Oracle Database resource

    Execute the following command as an Oracle user on standby node to register database resource made at step 8 to Oracle Restart of the standby node.

    Specify the database name made at step 8 for <db_unique_name>, <db_name>.

    Specify the Oracle user's ORACLE_HOME for <oracle_home>.

    Specify the SPFILE recorded at step 11 for <SPFILE PATH>

    Specify the Diskgroup made at step 6 for <disk_group_list>.

    # su - <Oracle user>
    $ srvctl add database -d <db_unique_name> -o <oracle_home> -p <SPFILE PATH> -n <db_name> -a <disk_group_list>
  23. Start Oracle Database resource on standby node

    Execute the following command as a Grid user on standby node and verify the Oracle Database can be started. Specify the database name made at step 8 for <db_name>.

    # su - <Grid user>
    $ srvctl start database -d <db_name>
  24. Stop Oracle Database, Oracle ASM, Oracle listener

    Execute the following command as a Grid user on standby node to stop Oracle Database, Oracle ASM and Oracle listener. Specify the database name made at step 8 for <db_name>. Specify the Diskgroup made at step 6 for <diskgroup_name>.

    # su - <Grid user>
    $ srvctl stop database -d <db_name>
    $ srvctl stop diskgroup -g <diskgroup_name>
    $ srvctl stop asm
    $ srvctl stop listener

After the installation of Oracle Grid Infrastructure and Oracle Database is completed, change Oracle Restart Settings and create userApplication. For details, see "2.3.2.2 Environment configuration with Oracle Database 11g R2/12c R1".