Steps to run the BMC provided script on Oracle RAC environment


You can perform the following tasks from any of the available RAC nodes to set the parameters or to create tablespaces and user accounts.

Note

The ORACLE_SID for the RAC is different from the RAC Service Name. The following sections refer to the service as RAC_ORACLE_SERVICE_NAME. For example, a RAC setup can have SIDs for node1 as OR112DB1, for node2 as OR112DB2, and the service name of the RAC setup can be ORA112DB.

  1. Set up the Linux/Solaris operating system environment variables for Oracle (if Oracle is on Linux or Solaris platform)
    $ . oraenv
    ORACLE_SID = [oracle] ? <RAC_ORACLE_SERVICE_NAME>
  2. Change directory to the folder where BMC provided Oracle scripts are copied.
  3. Log on to SQLPlus by using the following command:
    $ sqlplus sys/<sys_pwd>@<RAC_ORACLE_SERVICE_NAME> as sysdba
  4. Run the run_oracle_db_scripts.sql script:
    SQL> @run_oracle_db_scripts.sql

To back up the SPFILE file in Oracle RAC

The following tasks help you to back up of the SPFILE from another SQLPlus prompt:

  1. Identify an AMS instance by entering the following command:

    ps -ef|grep smon|grep ASM

    For example:

    oracle 3023 1 0 Jun04 ? 00:00:19 asm_smon_+ASM1 is displayed. The +ASM1 is the ASM instance.

  2. Go to <ORACLE_HOME>/grid/bin of any Oracle RAC node.
  3. At the command prompt, enter the following command:
    $ . oraenv

    ORACLE_SID = [OR112DB] ? +ASM1

  4. Enter the following command:
    $ asmcmd
  5. Change the directory to ASM disk. For example: ASMCMD>cd<ASM_diskname>/
  6. Access the Oracle RAC service by entering the following command:
    ASMCMD> cd <RAC_ORACLE_SERVICE_NAME>
  7. Determine the name of the SPFILE by entering the following command to list the contents of the directory:
    ASMCMD> ls

    The contents of the directory are displayed as follows:

    CONTROLFILE/DATAFILE/
    ONLINELOG/
    PARAMETERFILE/
    TEMPFILE/
    spfile<RAC_ORACLE_SERVICE_NAME>.ora

  8. Create a backup copy of the SPFILE file by entering the following command: ASMCMD> cp spfile<RAC_ORACLE_SERVICE_NAME>.ora BackUpDirectoryName/RAC_ORACLE_SERVICE_NAME.ora_backup

Restarting Oracle RAC

To set Oracle_SID on RAC

Open a SQLPlus prompt.

$ . oraenv ORACLE_SID = [oracle] ? <ORACLE_SERVICE_NAME>

To stop the RAC system

  1. Run the following command:
    srvctl stop database -d <RAC_ORACLE_SERVICE_NAME> 
  2. Run the following command to see the status of the nodes. All the nodes must be in the "not running" status.
    srvctl status database -d <RAC_ORACLE_SERVICE_NAME> 

To start the RAC system

  1. Run the following command:
    srvctl start database -d <RAC_ORACLE_SERVICE_NAME>
  2. Run the following command to see the status of the nodes. All nodes must be up and running.
    srvctl status database -d <RAC_ORACLE_SERVICE_NAME>

Note

Enter the following values against the following mandatory fields:

  • Username: sys
  • password: <syspassword>
  • SID: <RAC_ORACLE_SERVICE_NAME>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*