This blog post outlines the steps involved in patching an existing Oracle 10
g RDBMS environment to a higher patch set with an example showing the steps for upgrading from 10.2.0.1 to 10.2.0.3. For detailed instructions, check the README page that is associated with the patch{set}. Use these instructions at your own risk.
- First of all, Oracle wouldn't let you start the database up after simply installing the latest patch set on top of an existing Oracle RDBMS environment. The following steps must be followed before it starts up successfully. Otherwise, during startup Oracle throws errors like:
ORA-01092: ORACLE instance terminated.
ORA-39700: database must be opened with UPGRADE option.
- In order to install 10.2.0.3 patch set, download the patch 5337014 from metalink.oracle.com for your OS; and install it on top of 10.2.0.1. Make sure the listener and the database are down before you apply the patch.
- Set
SHARED_POOL_SIZE
and JAVA_POOL_SIZE
parameters to at least 150M {in the DB initialization file}, if they are either not set or the existing value is < 150M.
- Start up the database in upgrade mode.
SQL> STARTUP UPGRADE
ORACLE instance started.
Total System Global Area 1.0385E+10 bytes
Fixed Size 2047256 bytes
Variable Size 1241514728 bytes
Database Buffers 9126805504 bytes
Redo Buffers 14729216 bytes
Database mounted.
Note:
If you see an error like ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
with STARTUP UPGRADE
, clear the logs as shown below:
SQL> ALTER DATABASE OPEN RESETLOGS: <- NORESETLOGS doesn't work here.
SQL> SHUTDOWN
SQL> STARTUP UPGRADE
ORACLE instance started.
Total System Global Area 5553258496 bytes
Fixed Size 2038008 bytes
Variable Size 1241515784 bytes
Database Buffers 4294967296 bytes
Redo Buffers 14737408 bytes
Database mounted.
Database opened.
- Finally run the command line database upgrade assistant tool,
dbua
, to do pre upgrade checks, to upgrade the Oracle server and to perform any post upgrade activity. Here is the syntax:
% dbua -silent -dbname $ORACLE_SID -oracleHome $ORACLE_HOME -sysDBAUserName sys
-sysDBAPassword change_on_install -recompile_invalid_objects true
You may have to slightly modify the above command esp. the password part to make it work in your environment. The dbua
should return a status message like Database upgrade has been completed successfully, and the database is ready to use.
. Otherwise review the log file (usually $ORACLE_HOME/cfgtoollogs/dbua/logs/silent*.log), make the changes as necessary and re-run the dbua
tool until it succeeds.
Using dbua
is only one way of upgrading the database to the latest patch set. You can also upgrade it with the help of dbua
's graphical interface or by manually executing few SQL scripts. Check the README file that is bundled with the patch for detailed steps on using the dbua
GUI or the manual execution of the required SQL scripts.
____________________
Oracle |
RDBMS |