Oracle DBA – A lifelong learning experience

Downgrading a RAC database from to

Posted by John Hallas on May 4, 2017

It is not often that I see a database downgrade activity performed and so I thought it would be worthwhile just noting how it was done.
 2 node RAC database to, downgraded the database only and not the grid home.
Downgrade taking place on HP-UX, any downgrades taking place on Windows OS have several additional steps and won’t be covered in this post. 
This database does not use Database Vault and pre-requisite compatibility checks were carried out

Assume all commands are being run on node 1, any commands that need to be run on node 2 will be explicitly stated. Any commands will be formatted in italics.

Set ORACLE_HOME to current environment.
export ORACLE_HOME= /app/oracle/product/
Tail alert log of both nodes in separate windows
tail -f /app/oracle/diag/rdbms/soapre2a/SOAPRE2A1/trace/alert_SOAPRE2A1.log
1. Stop database using srvctl on primary node
srvctl stop database -d SOAPRE2A
Monitor the alert logs to confirm when database has successfully shutdown.
2. Create pfile from spfile
sqlplus / as sysdba
SQL>create pfile=’/home/oracle/SOAPRE2_downgrade/SOAPRE2_clusterdisable.ora’ from spfile=’+DATA/SOAPRE2A/spfilesoapre2a.ora’;
3. Alter pfile CLUSTER_DATABASE parameter to FALSE
4. Recreate spfile with new parameter
sqlplus / as sysdba
SQL>create spfile=’+DATA/SOAPRE2A/spfilesoapre2a.ora’ from pfile=’/home/oracle/SOAPRE2_downgrade/SOAPRE2_clusterdisable.ora’;
5. Startup database in downgrade mode using new spfile
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL>startup downgrade
6. Execute Oracle downgrade script
From the original OH –
SQL>spool /home/oracle/SOAPRE2_downgrade/downgrade.log
SQL>spool off
SQL>shutdown immediate;
This script can be run multiple times, in the event any errors are encountered correct them and rerun until completion.
7. Change environment variables and restore config files
Execute these steps on both nodes.
Alter ORACLE_HOME and PATH environment variable to point to downgraded directories, in our case for example:
export ORACLE_HOME=’/app/oracle/product/
Ensure any entries in your oratab file are also altered to reference the downgraded directory.
Copy password files and config files from current ORACLE_HOME to downgraded directory.
8. Reload version specific components
change to downgraded release home  –
cd /app/oracle/product/
SQL> sqlplus / as sysdba
SQL> startup upgrade
SQL>spool /home/oracle/SOAPRE2_donwgrade/reload.log
SQL>spool off
This step can take quite some time to complete, in our case ~2.5 hours
9. Recompile invalid objects
SQL> shutdown immediate
SQL> startup
SQL> @utlprp.sql
SQL> exit
10. Downgrade cluster services
The final step was to downgrade cluster services to our old ORACLE_HOME and version, using the following srvctl command:
srvctl downgrade database -d db-unique-name -o old_ORACLE_HOME t to_old_versnum
in our case this was the following:
srvctl downgrade database -d SOAPRE2A -o /app/oracle/product/ -t

3 Responses to “Downgrading a RAC database from to”

  1. Manoj Gorai said

    Thanks John for sharing the steps..

  2. Good the article. Tks so much 🙂

  3. Hi John, It would be more helpful if you could mention the reasons for downgrading the database alone.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: