Upgradation database 10.2.0.1g to 10.2.0.5g on Red hat

Upgradation database 10.2.0.1g to 10.2.0.5g on RED HAT 5.4 Version
 
1. Check the invalid object in the database.

select object_name,status from dba_objects where status='INVALID';

2. Check the time zone of the database.

SELECT version FROM v$timezone_file;

If this gives 4 then you may simply proceed with the upgrade even if you have TZ data.
If this gives higher then 4 look at the Meta link note: Note 553812.1
If this gives lower then 4 perform the following steps:
@?/rdbms/admin/utltzpv4.sql;
 
OUTPUT:
Your current timezone version is 2!
Do a select * from sys.sys_tzuv2_temptab; to see if any TIMEZONE
data is affected by version 4 transition rules.
Any table with YES in the nested_tab column (last column) needs
a manual check as these are nested tables.
PL/SQL procedure successfully completed.
Commit complete.
————————————————————
select * from sys.sys_tzuv2_temptab;

If it returns no rows, there is nothing that needs to be done. Just proceed with the upgrade.
If it retunrs the detail of columns that contain TZ data which may be affected by the upgrade, see metalink note: Note 553812.1
The Note 553812.1 states that if you see SYS owned SCHEDULER objects then it is safe to ignore them and proceed with the upgrade. But if you see user data or user created jobs here then you need to take a backup of data before upgrade and restore it back after the upgrade. Remove any user created jobs and re-create them after the upgrade.
 
3. Stop all oracle components running like LISTENER, EM , ISQLPLUS and DB itself etc

# sqlplusctl stop
# emctl stop dbconsole
# lsnrctl stop
$ sqlplus / as sysdba
SQL> shutdown immediate

4. Take backup of Cluster home, ASM HOME, Oracle Home and Database.

$tar czf /u01/app/crs10201g.tar.gz  /u01/app/crs (backup of cluster home)
$tar czf /u01/app/asm10201g.tar.gz /u01/app/asm(backup of asm home)
$tar czf /u01/app/10g10201.tar.gz /u01/app/10g ( Backup of database at oradba)

5. Install the oracle patch 10.2.0.5 with runinstaller on oracle 10.2.0.1 version
Install the Oracle patch on Same location of dbhome where the 10.2.0.1 version is installed. It simply upgrade that dbhome.
 
5. Go to $oracle_home/rdbms/admin

$ sqlplus / as sysdba
SQL> startup upgrade
 
6. Run the following script :
This script is run to check whether the database is ok for the upgrade and if there is something to be changed before we upgrade the datbase.
Check the pre_upgrade.log.

SQL> spool pre_upgrade.log
SQL> @utlu102i.sql

Note: perform all the steps present in pre upgrade log file.
7. Move to upgrade script:

SQL> spool upgrade.log
SQL> @catupgrd.sql
When the upgrade script catupgrd.sql finishes shutdown the database and open the spool of the upgrade process and try to find out if anything failed
SQL> shutdown immediate

8. Recomplie invalid object :
The upgrade will leave some objects invalid in the database. Perform normal startup and run utlrp.sql script

$ sqlplus / as sysdba
Connected to an idle instance.
SQL> startup
SQL> spool recompile.log
SQL> @utlrp.sql
 When the script utlrp.sql completes go ahead and verify if all the components are  upgraded to 10.2.0.5
sql > spool off

9. Check Registry version:

set lines 10000
set pages 1000
column comp_name format a40
column version format a12
column status format a6
select comp_name, version, status from sys.dba_registry;

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.