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.
- 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> - Change directory to the folder where BMC provided Oracle scripts are copied.
- Log on to SQLPlus by using the following command:
$ sqlplus sys/<sys_pwd>@<RAC_ORACLE_SERVICE_NAME> as sysdba - 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:
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.
- Go to <ORACLE_HOME>/grid/bin of any Oracle RAC node.
At the command prompt, enter the following command:
$ . oraenvORACLE_SID = [OR112DB] ? +ASM1
- Enter the following command:
$ asmcmd - Change the directory to ASM disk. For example: ASMCMD>cd<ASM_diskname>/
- Access the Oracle RAC service by entering the following command:
ASMCMD> cd <RAC_ORACLE_SERVICE_NAME> 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- 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
- Run the following command:
srvctl stop database -d <RAC_ORACLE_SERVICE_NAME> - 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
- Run the following command:
srvctl start database -d <RAC_ORACLE_SERVICE_NAME> - 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>
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*