Incorrect database parameter causes the database not to start, on an RSA Identity Governance & Lifecycle Appliance
2 years ago
Originally Published: 2018-12-28
Article Number
000040289
Applies To
RSA Product Set: RSA Identity Governance and Lifecycle
RSA Product/Service Type: Appliance
RSA Version/Condition: 6.9.1 and above
Issue
An Oracle database parameter has been given a value that results in the database not opening, because of an error.
For example:
ORA-00821: Specified value of sga_target 512M is too small, needs to be at least 768M
Consequently, the RSA Identity Governance and Lifecycle product cannot be started because the database is not running.
Cause
An ALTER SYSTEM SET <parameter>=<value> SCOPE=SPFILE command was issued on the database, but the parameter value was bad.
The problem does not appear until the database is re-started, because SCOPE=SPFILE was used.
Resolution
These steps will use the existing Oracle database SPFILE to create a PFILE that can be edited.
Once the bad parameter value has been fixed, the PFILE can then be converted back into the SPFILE, and used to start the database.
 
Login to the RSA Appliance as root, and then substitute root with the oracle user.
  1. login as root
  2. su - oracle

Confirm the ASM path for the SPFILE

The default location and name for the Oracle database parameter file (PFILE) is $ORACLE_HOME/dbs/initAVDB.ora.
However, when Oracle ASM is being used, the parameters are stored in the Oracle ASM instance as an SPFILE.
So, to confirm the ASM path for the SPFILE, we need to examine the contents of the default PFILE, because it points to the SPFILE in the Oracle ASM instance.

  1. Show the ASM path for the SPFILE, that is contained in the PFILE.
    oracle@igl-710:~> cat $ORACLE_HOME/dbs/initAVDB.ora
    SPFILE='+DG01/AVDB/PARAMETERFILE/spfileAVDB.ora_1520389862115'

Copy the existing SPFILE to /tmp

Next, we need to copy the SPFILE to the /tmp directory for conversion and editing.
  1. Set the environment for Oracle ASM, and run the Oracle ASM Command-Line Utility.
    oracle@igl-710:~> export ORACLE_SID=+ASM
    oracle@igl-710:~> export ORACLE_HOME=/u01/app/12.1.0/grid
    oracle@igl-710:~> asmcmd 
    ASMCMD>
  2. Using the ASM path from step 3, copy the SPFILE to the /tmp directory, and then exit the ASMCMD utility.
    ASMCMD> cp +DG01/AVDB/PARAMETERFILE/spfileAVDB.ora_1520389862115 /tmp/spfileAVBD.ora
    copying +DG01/AVDB/PARAMETERFILE/spfileAVDB.ora_1520389862115 -> /tmp/spfileAVDB.ora
    
    ASMCMD> exit
    oracle@igl-710:~>

Create the new SPFILE

Now that we have extracted the database SPFILE file from the Oracle ASM instance, we need to convert it to a PFILE so it can be edited.
Once the parameter has been fixed, we then convert the PFILE back into an SPFILE.
  1. Run SQL*Plus and connect as SYSDBA.
    oracle@igl-710:~> sqlplus / as sysdba
    
  2. Create the PFILE, and then exit out of SQL*Plus.
    SQL> create PFILE='/tmp/pfileAVDB.ora' from SPFILE='/tmp/spfileAVDB.ora';
    File created.
    SQL> exit
    oracle@igl-710:~>
    
  3. Edit the /tmp/pfileAVDB.ora file, and make the necessary changes.
    oracle@igl-710:~> vi /tmp/pfileAVDB.ora
    
  4. Convert the PFILE back into an SPFILE using SQL*Plus, then exit.
    oracle@igl-710:~> sqlplus / as sysdba
    SQL> create SPFILE='/tmp/new_spfileAVDB.ora' from PFILE='/tmp/pfileAVDB.ora'; 
    File created. 
    SQL> exit

Replace the SPFILE

Specifically, we will be replacing the SPFILE for the AVDB database in the Oracle ASM instance, with the new SPFILE we created in the /tmp directory.
  1. Use the ASMCMD utility to replace the SPFILE, then exit the ASMCMD utility.
    (still need to actually do this)
    
    oracle@igl-710:~> asmcmd
    
    ASMCMD> rm +DG01/AVDB/PARAMETERFILE/spfileAVDB.ora_1520389862115
    
    ASMCMD> cp /tmp/new_spfileAVBD.ora +DG01/AVDB/PARAMETERFILE/spfileAVDB.ora_1520389862115 
    copying /tmp/new_spfileAVDB.ora -> +DG01/AVDB/PARAMETERFILE/spfileAVDB.ora_1520389862115
    
    ASMCMD> exit 
    oracle@acm-710:~>
  2. Return to the normal RSA Identity Governance and Lifecycle environment by running setDeployEnv.sh, then start the database and application.
    oracle@acm-710:~> cd /home/oracle
    oracle@acm-710:~> . setDeployEnv.sh
    
    oracle@acm-710:~> acm startdb
    Database is running.
    
    oracle@acm-710:~> acm start