Wednesday, 14 March 2012

Migrate Oracle 10.2.0.3 to Oracle 10.2.0.5


The following are the steps performed to migrate a database from 10.2.0.3 to 10.2.0.5
  

  •      Download oracle installables (Software, 10.2.0.5 Patchset)
  •      Install new oracle home. 
  •      Migrate ASM instance and database to new Oracle home.
  •      Upgrade database to 10.2.0.5

       *** Please note. ASM is started in a non-open state and consequently does not need to be upgraded after    moving the necessary files.

Download oracle installable files (Software, 10.2.0.5 Patchset)

Download the files to a location with enough space to contain the zipped files .
After the download the installables should be unzipped and renamed (It’s a personal thing, but I like to do this to know what the folders contain).

Install and upgrade new oracle home

The new oracle home can be installed following the usual steps using Oracle’s runInstaller utility after performing the pre-installation tasks.
Following the successful installation, the 10.2.0.5 patch was applied to the home using the runInstaller utility located in the patch folder and selecting the home to upgrade.

Migrate ASM and database to new Oracle home.

·         shutdown all database instances and afterwards ASM
·         stop listener(s)
·         change the entries in oratab
·         Since this is ASM the files(control and data) are located in a centralized location and do not need to be moved.
·         copy and modify init.ora for relevant databases and ASM
·         copy/move password files to new home
·         copy/move tnsnames and sqlnet.ora to new ORACLE_HOME location
·         startup ASM and migrated database to confirm that the change took effect.
·         Shutdown database




Upgrade Database to 10.2.0.5

Usually the Oracle Database Upgrade Assistant (DBUA) will be run from the new oracle home to upgrade the selected database. However sometimes  due to network issues, the upgrade can be run manually. See below:
  1. Start the database in the UPGRADE mode:
SQL> STARTUP UPGRADE
  1. Set the system to spool results to a log file for later analysis:
SQL> SPOOL upgrade_info.log
  1. Run the Pre-Upgrade Information Tool:
SQL> @/rdbms/admin/utlu102i.sql
  1. Turn off the spooling of script results to the log file:
SQL> SPOOL OFF

5.       Enter the following SQL*Plus commands:

SQL> SPOOL patch.log
SQL> @?/rdbms/admin/catupgrd.sql

This was run in nohup mode i.e.

SQL> nohup sqlplus "/ as sysdba" @?/rdbms/admin/catupgrd.sql &
SQL> SPOOL OFF

6.       Restart the database:

SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP

7.       Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
SQL> @?/rdbms/admin/utlrp.sql

8.       Run the following command to check the status of all the components after the upgrade:
SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;

No comments:

Post a Comment