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

2.2.6 Oracle Database Creation and Setting

It is necessary to create a database on the shared disk. The creation should be performed on an operation node. After that, setup on standby nodes in the same configuration to be accessible to the database from the standby nodes.

Example

  • Mutual standby

  • 2:1 Standby

  1. Startup of userApplication.

    Start up userApplication on an operation node where a database is created.

  2. Creation of database

    Create a database on a shared disk mounted to the operation node.

    Note

    If multiple Oracle homes are configured on one server, a different Oracle instance name must be assigned for each Oracle home.

    Information

    • Refer to the Oracle Database manual.

    • Check if the Oracle user has privileges to write in a shared disk before creating the database.

    • Confirm the contents of "Chapter 5 Notice" before creating.

    • Destination of database files

      Files

      Locations

      Note

      Initialization Parameter File (PFILE)

      Arbitrary

      Recommend to allocate on a local disk of each node.

      Server Parameter File (SPFILE)

      Share

      See "Server Parameter File (SPFILE)" below.

      Password file

      Arbitrary

      See "Password file" below.

      Control Files

      Share

      -

      Data Files

      Share

      -

      Redo Log Files

      Share

      -

      Archived Redo Log Files

      Arbitrary

      Recommend to be multiplexed, allocating on a shared disk and a local disk.

      Flash Recovery Area

      Share

      -

      log files

      AUDIT_FILE_DEST

      Local

      To be gathered surely for trouble investigation, allocate them on a local disk of each node.

      BACKGROUND_DUMP_DEST

      Local

      CORE_DUMP_DEST

      Local

      USER_DUMP_DEST

      Local

      DIAGNOSTIC_DEST

      Local

      Note

      • Note that there is sufficient space to archive for archived redo log files if they are located on shared disks. If there is insufficient space, and data updating processing through monitoring SQL hangs, an oracle resource might fail. Afterwards, the service might stop finally on both operating node and standby node, because the space of shared disk is insufficient and the failover of userApplication fails on the standby node.

      • If you install Oracle database software on the shared disk, locate database files referring to "Appendix D Using Oracle Database software on shared disks".

    • Initialization Parameter File (PFILE)

      The initial parameter setting of LOCAL_LISTENER must be compatible with that of listener.ora and tnsnames.ora. You should also pay close attention to set up Oracle network.

    • Server Parameter File (SPFILE)

      If you use the server parameter file, store it on a shared disk. If it is not stored on the shared disk, the settings will be inconsistent between operating and standby nodes. After you allocate server parameter file on a shared disk, configure the settings in an operating and a standby both nodes for referring the server parameter file.

      Example

      • Method of making a symbolic link file to the server parameter file

        $ ln -s <the mount point of a shared disk>/spfile<$ORACLE_SID>.ora <$ORACLE_HOME>/dbs/spfile<$ORACLE_SID>.ora
      • Method to write the path of the server parameter file in initialization parameter file

        How to set the initialized parameter file (<$ORACLE_HOME>/dbs/init<$ORACLE_SID>.ora):

        spfile = /mnt2/db/parameter/spfile.ora

      Note

      If you create a database using DBCA (Database Configuration Assistant), you might not be able to specify where the server parameter file is stored. If this occurs, move the server parameter file to the shared disk after creating the database as follows:

      1. Mount the shared disk if it is not mounted. Start userApplication that is created at "2.2.3 userApplication Configuration".

      2. Move the server parameter file to the shared disk.

        # mv <$ORACLE_HOME>/dbs/spfile<$ORACLE_SID>.ora <shared disk>/spfile<$ORACLE_SID>.ora
      3. Edit the initialized parameter file <$ORACLE_HOME>/dbs/init<$ORACLE_SID>.ora as follows:

        spfile=<shared disk>/spfile<$ORACLE_SID>.ora

      Execute step "3" on both of the operating node and standby nodes.
      You can also use "cloracpy" command to execute it on the standby nodes after the operating node.

    • Password file

      Allocate Password file on either a local disk or a shared disk. To which allocate it, refer to the following.

      • Local disk
        When allocate Password file on a local disk, it is necessary to edit it of each node. Therefore, the maintenance efficiency decreases compared with the case allocated on a shared disk.

      • Shared disk
        When allocate Password file on a shared disk, it only has to edit on a shared disk. Therefore, the maintenance efficiency improves compared with the case allocated on a local disk.

        When allocate Password file on a shared disk, make a symbolic link file under the "$ORACLE_HOME/dbs" of each node.

        $ ln -s <the mount point of a shared disk>/orapw<SID> <$ORACLE_HOME>/dbs/orapw<SID>

    Other notices for database creation are below.

    Note

    • If you use Oracle ASM, it is necessary to register the Oracle ASM as an RMS resource. Refer to "2.3.2 Oracle ASM (Automatic Storage Management)".

    • The processes other than definition of system environment variables must not be added to login.sql of Oracle DBA users.
      SQL can be described in the SQL*Plus profile login.sql. However, it might automatically be executed and affect ongoing operations because Oracle instance is controlled through SQL*Plus in PRIMECLUSTER Wizard for Oracle.
      It is available to setup the system environment variables to login.sql by SET command.

  3. Configuration of Oracle Net Services

    Configure Oracle Net Services such as Listener and net service name on operation node.

    • Network setup

      Files

      Locations

      Note

      listener.ora

      Arbitrary

      For placement of the file, refer to the below "information".

      tnsnames.ora

      Arbitrary

      Same as above

      <LISTENER>.log

      Local

      Information

      Allocate listener.ora file and tnsnames.ora file on either a local disk or a shared disk. To which allocate them, refer to the following.

      • Local disk
        When allocate those files on a local disk, it is necessary to edit them of each node. Therefore, the maintenance efficiency decreases compared with the case allocated on a shared disk. In one side, it is possible to gather the files surely when the trouble is investigated because the influence of the state of the mount of a shared disk is not received.

      • Shared disk
        When allocate those files on a shared disk, it only has to edit them on a shared disk. Therefore, the maintenance efficiency improves compared with the case allocated on a local disk. In one side, when the mount is not done, a shared disk might not be able to gather the necessary files for the trouble is investigated.

        When allocate those files on a shared disk, make a symbolic link file under the "$ORACLE_HOME/network/admin" of each node.

        In the case of listener.ora

        $ ln -s <the mount point of a shared disk>/listener.ora <$ORACLE_HOME>/network/admin/listener.ora

        In the case of tnsnames.ora

        $ ln -s <the mount point of a shared disk>/tnsnames.ora <$ORACLE_HOME>/network/admin/tnsnames.ora
    • Oracle listener

      Create a Listener by editing listener.ora file, or using netca (Oracle Net Configuration Assistant).

      $ORACLE_HOME/network/admin/listener.ora

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

      Example

      LISTENER =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = <logical IP address>)(PORT = 1521))
        )
      
      SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
            (GLOBAL_DBNAME = ora)
            (ORACLE_HOME = /u01/app/oracle/product/db)
            (SID_NAME = ora)
          )
        )
    • Net Service Name

      If the Oracle listener is monitored through "tnsping" command, set up the tnsnames.ora file, or using netca (Oracle Net Configuration Assistant).

      $ORACLE_HOME/network/admin/tnsnames.ora

      Then, specify the network service name set for tnsnames.ora in the environment setting of the Oracle listener of PRIMECLUSTER Wizard for Oracle. In that case, ORACLE_SID, host (logical IP address), and port number must be the same as those of the Oracle listener.

      Example

      Network service name =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = <logical IP address>)(PORT = 1521))
          (CONNECT_DATA = (SID = ora))
        )

    Notices for Configuring Oracle Net Services are below.

    Note

    • The Oracle "TWO_TASK" environment variable must not be used.

      It is used to add a connect identifier to connect to Oracle database then automatically connect to network. In PRIMECLUSTER Wizard for Oracle, network connection is not supported. Users are supposed to connect to Oracle instances in local connection (" / as sysdba"). If network connection is required, specify "@connect identifier" instead of using the "TWO_TASK" environment variable at the connecting.

    • OS authentication of Listener must be enabled.

      There are two methods to enable it:

      • Define a parameter in sqlnet.ora file as below.

        LOCAL_OS_AUTHENTICATION_<LISTENER_NAME> = ON
      • Not define the "LOCAL_OS_AUTHENTICATION_<LISTENER_NAME>" parameter in sqlnet.ora file. (default)

    • If multiple Oracle homes are configured on one server, a different Oracle Listener name must be assigned for each Oracle home.

  4. Site preparation for standby nodes

    Set up the standby nodes in the same configuration for the database (directory creation, file copy, and links) as the operating node.

    • Agreement of configuration

      All configurations of the database and Oracle Net Services on standby nodes must match that of the operating node.

      • Under <$ORACLE_HOME>/dbs

      • Under <$ORACLE_BASE>/admin/<$ORACLE_SID>

      • Under <$ORACLE_BASE>/diag

      • Under <$ORACLE_HOME>/network/admin

      The access privilege to the directories and files above must be also the same as that on the operating node.
      If you set where archive log is output on the operating node, it is necessary to set the same on the standby nodes.

      Information

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

    • SYSTEM user password

      PRIMECLUSTER Wizard for Oracle accesses and monitors Oracle instances as the Oracle SYSTEM user. Therefore, the SYSTEM user's password must be registered in PRIMECLUSTER Wizard for Oracle. Refer to "4.3 clorapass - Register Password for Monitoring" to register the password.

    • Define the full path of the log file

      Define the full path of the alert log and the listener log in /opt/FJSVclora/etc/clgetoralog.conf. See the Note in “4.5 clgetoralog - Collect Troubleshooting Information" for details.

  5. Check Oracle database operation

    PRIMECLUSTER Wizard for Oracle starts and stops the Oracle instance and Oracle listener after changing from the root user to the Oracle user by using su(1M).

    Check if Oracle database is properly running by starting and stopping the Oracle instance and Oracle listener manually after changing from the root user to the Oracle user by using su(1M) as follows.

    # su - <Oracle user>
    $ lsnrctl start <Listener>
    $ lsnrctl stop <Listener>
    $ sqlplus /nolog
    SQL> connect / as sysdba
    SQL> startup
    SQL> shutdown immediate

    Note

    Before switching userApplication from the operating node to standby nodes, shut down all databases and Listeners on the operating node. If not, all processes associated with Oracle instance would be forcibly killed.

    After the check completed, shut down all databases and Listeners, and stop RMS on all nodes.