Install Oracle patch set 4 and bundle 10 on RAC environment


Install Oracle 10g R2 Patch Set 4 (10.2.0.5) and Patch bundle 10.

Oracle database throw ORA-4031 errors and restarting the database resolve the issue. I analyzed oracle database alert log. I found the error caused by a bug in oracle database so I installed the latest service packs Patch Set 4 (10.2.0.5) and Patch bundle 10.

Bug 8211733  Shared pool latch contention when shared pool is shrinking

Shared Pool Affected

The shared pool may be affected. Issues which affect the shared pool may lead to wider problems for other users such as ORA-4031 errors, very slow performance, increased CPU etc

Our environment is Oracle 1og R2 patch set 3(10.2.0.4) RAC with two nodes on windows 2003 64 bit, I downloaded patch set 4 and bundle 10 and I read the install instructions and I summarized the steps to install patch set 4/bundle 10 as below:

 Preinstall

  • Delete the log files on C:\oracle\product\10.2.0\asm\NETWORK\log
  • Delete the log files on C:\oracle\product\10.2.0\db\NETWORK\log
  • Perform Full backup of oracle home folder and the database
  • Create Snapshot on the SAN using iscsi software if we can

Install Patch set 4 on Oracle CRS(cluster ready services)

  • Perform clean shutdown to the database in Node 1 and Node 2
  • Shutdown ASM services on Node 1 and Node 2
  • Shutdown CRS services on Node 1 and Node 2
  • Navigate to patch set 3 (8202632) on Node 1
  • Launch oracle universal  installer
  • On the destination page select Oracle CRS home path
  • Click Next….…………
  • After the installer complete the task and you will see info message
  •  Run the batch file located at: C:\oracle\product\10.2.0\crs\install\patch102.bat on node 1 and Node 2 and this batch file will automatically start the CRS services on the patched node upon completion

Install Patch set 4 on Oracle ASM(automatic storage management)

  • Perform clean shutdown to the database in Node 1 and Node 2
  • Shutdown ASM services on Node 1 and Node 2
  • Shutdown CRS services on Node 1 and Node 2
  • Navigate to patch set 3 (8202632) on Node 1
  • Launch oracle universal installer
  • On the destination page select oracle ASM home path
  • Click Next……………..

Install Patch set 4 on Oracle database

  • Perform clean shutdown to the database in Node 1 and Node 2
  • Shutdown ASM services on Node 1 and Node 2
  • Shutdown CRS services on Node 1 and Node 2
  • Navigate to patch set 3 (8202632) on Node 1
  • Launch oracle universal installer
  • On the destination page select oracle Database home path
  • Click Next……………..
  • Set the CLUSTER_DATABASE initialization parameter to FALSE
SQL> STARTUP NOMOUNT

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;

  • Shut down the database:

SQL> SHUTDOWN Immediate

  • Startup the database in upgrade mode and run the upgrade script
SQL> STARTUP UPGRADESQL> @C:\oracle\product\10.2.0\db\RDBMS\ADMIN\utlu102i.sqlSQL> SPOOL patch.logSQL> @C:\oracle\product\10.2.0\db\RDBMS\ADMIN\catupgrd.sqlSQL> SPOOL OFF
  • Restart  the database
  • recompile all invalid PL/SQL packages
SQL> SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID'SQL> @C:\oracle\product\10.2.0\db\RDBMS\ADMIN\utlrp.sql
  • 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;

  • Set the CLUSTER_DATABASE initialization parameter to TRUE
SQL> STARTUP NOMOUNT

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=True SCOPE=spfile;

SQL> SHUTDOWN Immediate

  • Start  the database
  • configure and secure Enterprise Manager

Ensure the database and Listener are operational and run emca -upgrade db –cluster

Install the latest OPatch patch 6880880

  • Backup OPatch folder on Oracle home for CRS, ASM and the database
  • copy Opatch folder from patch 6880800 to Oracle home for CRS, ASM and the database
  • Stop CRS, ASM and database services in Node 1 and Node 2

Install bundle 10(12429524) on Oracle CRS(cluster ready services)

  • set Oracle_Home to C:\oracle\product\10.2.0\crs
  • opatch  apply

Install Bundle 10(12429524) on Oracle ASM ( automatic storage management)

  • set Oracle_Home to C:\oracle\product\10.2.0\asm
  • opatch  apply

Install bundle 10(12429524) on Oracle database

  • set Oracle_Home to C:\oracle\product\10.2.0\db
  • opatch  apply
  • restart Node1 and Node 2
  • run the upgrade script
SQL> @C:\oracle\product\10.2.0\db\bundle\Patch10\catcpu.sql
  • run compilation script
SQL> @C:\oracle\product\10.2.0\db\RDBMS\ADMIN\utlprp.sql 0
  • check for invalid objects
SQL> SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID'
  • Set the CLUSTER_DATABASE initialization parameter to FALSE
SQL> STARTUP NOMOUNT

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;

SQL> Shutdown Immediate
  • Recompiling Views in the Database
SQL> STARTUP UPGRADESQL> @C:\oracle\product\10.2.0\db\bundle\view_recompile\view_recompile_jan2008cpu.sql
  • Set the CLUSTER_DATABASE initialization parameter to TRUE
SQL> STARTUP NOMOUNTSQL> ALTER SYSTEM SET CLUSTER_DATABASE=True SCOPE=spfileSQL> Shutdown
  • Start the Database
  • Verify that the view recompilation has been performed for the database

SELECT * FROM registry$history where ID = ‘12429524’;

  • If any invalid objects were reported

SQL>@C:\oracle\product\10.2.0\db\RDBMS\ADMIN\utlrp.sql

  • manually recompile any invalid objects

SQL>alter <object_type> schemaname.<object_name> compile;

Advertisements

About Tarek

I have been working in IT for years and I thought it might be good to share my experience using real life scenarios.
This entry was posted in Oracle Database and tagged , , , . Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s