Tuesday, May 10, 2011

Simple and silent upgrade of Oracle database

The regular manual method of upgradation of the database, includes series of prechecks, followed by catupgrd.sql and post tasks, depending upon the upgraded version.
Oracle provides detailed documentation for the same.
However, if you want to get away from all the hassle and keep upgradation simple enough, you can use the following command for silent upgrade to any oracle version.

Following example upgrades the database 'demo' to 11.2.0.2 version.
Please note that before we execute the command we need to ensure that 11.2.0.2 binaries have been installed and the init.ora file for the database is present with upgraded parameters in $ORACLE_HOME/dbs directory. Also, the DIAGNOSTIC_DEST directories mentioned in the init.ora files should be physically present on the server.
Once the above mentioned basic things are taken into consideration, run the following command..sit back..and enjoy!

dbua -silent -dbname demo -oracleHome /opt/oracle/product/11.2.0.2 -sysDBAUserName sys -sysDBAPassword  mysyspwd -recompile_invalid_objects true


It completes all the necessatry pre-checks, upgradation, and post tasks.. with proper log files and leaves the database back in open state.. all upgraded for you!

No comments:

Post a Comment