How To Rollback 11.2.0.4.1 to 10.2.0.4.0

i’d been doing a lot of upgrade for the last month, and one it decided to rollback
due to some application incompatibility. Continue reading

Advertisements

Instance terminated : ORA-7445 in post-upgrade steps

it’s Maundy Thursday and i’m doing database upgrade from 11.1.0.7.0 to 11.2.0.4.1. Database is a production and it’s 9TB.
i always DBUA silent when doing upgrade to make my life easier.

completed all pre upgrade task, same task i’m doing for the past month. been upgrading 4-5 production DB per week since February.

Below is the output of DBUA on my console. Continue reading

Post upgrade : Update Timezone Version

i’d been doing a lot of database updgrade now from 10.2.0.4/11.1.0.7 to 11.2.0.4.1 but i never updated the timezone versions.
so i decided to it now.

below step are done after doing the upgrade.

1. Start the database in upgrade mode.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup upgrade;
ORACLE instance started.
 Continue reading 

Unable to initialize Oracle call interface

Today i installed a new Oracle Software 11.2.0.3 on our existing production database running 11.1.0.7
the problem is so simple but sometime we forgot the basic things..

PROBLEM : Unable to start sqlplus after installing new ORACLE_HOME

Note : this is my 2nd ORACLE HOME
Continue reading

Patch 15887843 MERGE REQUEST ON TOP OF 11.2.3.2.0 FOR BUGS 15841041, 15874381

Patching time again..

Patch 15887843 MERGE REQUEST ON TOP OF 11.2.3.2.0 FOR BUGS 15841041, 15874381
Below are the list of bug fixed on this release.

========== Bug fixes or Diagnostics included in this ONEOFF ===========
Bug Fixes:
        11903713:CELL-2628 DURING LOOP TEST OF CELLCLI LIST QUERIES
        14337259:ASM ARB0 HANG ON REBALANCE IO THAT IS NOT ALIGNED IF BLOCK DIRTY IN FLASH CACHE
        14540423:ORA-7445 [__INTEL_NEW_MEMCPY() CAUSED BY INCORRECT MANAGEMENT OF CHAINED ROWS
        14763896:TOO MANY FILE SYSTEM IOS MAY CAUSE CONFINEMENT DETECTION ON SYSTEM DISKS
        14798635:DOM CONFINEMENT TRIGGERED ON PARTNER CELLS WITH NO WORKLOAD
        14823493:DO NOT POWER CYCLE FOR IO HANG ON WRITE BACK FLASHCACHE
        14841379:SAFEFILE NEEDS FSYNC SUPPORT TO COMMIT CHANGES
        15834287:IF CANNOT GET LOCK ON GRIDDISK LIST ON FLASH DISK, DURING IO HANG DONT REBOOT
        14828059:ORA-1578 REPORTED IN SUPERCLUSTER WITH EXADATA

Continue reading

Patch 13517481: EXADATA COLLECTION OF ONE OFF S FOR RELEASES OLDER THAN 11.2.2.4.2

This is my first time to do patching on exadata… yes!! 😀

Oracle release the patch 13517481 to be applied on 11.2.2.4.1 and below.
currently we are running on 11.2.2.3.2.

Patch 13517481: EXADATA COLLECTION OF ONE OFF S FOR RELEASES OLDER THAN 11.2.2.4.2
Continue reading

Sanity Check Before Upgrade/Migration

Check for Invalid Objects

select unique OBJECT_NAME, OBJECT_TYPE,
OWNER from DBA_OBJECTS where
STATUS='INVALID';

–> Fix all INVALID objects BEFORE the upgrade or migration
if invalid objects found on SYS/SYSTEM need to fix it.

@?/rdbms/admin/utlrp.sql

Check for Duplicate Objects

Check for duplicate objects on SYS/SYSTEM

select OBJECT_NAME, OBJECT_TYPE from
DBA_OBJECTS where OBJECT_NAME||OBJECT_TYPE
in (select OBJECT_NAME||OBJECT_TYPE from
DBA_OBJECTS where OWNER='SYS') and
OWNER='SYSTEM' and OBJECT_NAME not in
('AQ$_SCHEDULES_PRIMARY', 'AQ$_SCHEDULES',
'DBMS_REPCAT_AUTH');

–> Fix all DUPLICATE objects BEFORE the upgrade or migration
Note:1030426.6 How to Clean Up Duplicate Objects Owned by SYS and SYSTEM Schema

Check for Invalid Components

select substr(COMP_ID, 1,10) compid,
substr(COMP_NAME,1,24) compname, STATUS,
VERSION from DBA_REGISTRY where
STATUS'VALID';

–>Try to fix all NON VALID components BEFORE the upgrade
compile using @?/rdbms/admin/utlrp.sql but if it dows not fix it. see notes

Note:472937.1 Information On Installed Database Components
Note:753041.1 How to diagnose Components with NON VALID status

Purge Recycle Bin (10g/11g)

purge DBA_RECYCLEBIN;

Remove Old Parameters

.
.
_always_semi_join=off
_unnest_subquery=false

optimizer_features_enable=9.2.0.8

event = "10061 trace name context forever, level 10"

.
.

.
.

Applying Patch Set Update

For this test i’ll be applying 10.2.0.4.4 PSU update with my test environment with physical standby.
Patch 9352164 – 10.2.0.4.4 Patch Set Update

my current environment
[PRIMARY]

[oracle@lnxdg01 ~]$ /opt/app/oracle/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/app/oracle/product/10.2.0/db_1
Central Inventory : /opt/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.4.0
OUI location      : /opt/app/oracle/product/10.2.0/db_1/oui
Log file location : /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-10-31_23-49-52PM.log

Patch history file: /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-10-31_23-49-52PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2): 

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.

--------------------------------------------------------------------------------
OPatch succeeded.
[oracle@lnxdg01 ~]$ 

[STANDBY]

[oracle@lnxdg02 installer]$ /opt/app/oracle/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/app/oracle/product/10.2.0/db_1
Central Inventory : /opt/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.4.0
OUI location      : /opt/app/oracle/product/10.2.0/db_1/oui
Log file location : /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-10-31_23-50-37PM.log

Patch history file: /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-10-31_23-50-37PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2): 

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.

--------------------------------------------------------------------------------

OPatch succeeded.

shutdown both primary and standby database/listener.

[oracle@lnxdg01 installer]$ ps -ef | grep pmon
oracle   16683 16832  0 00:14 pts/1    00:00:00 grep pmon
[oracle@lnxdg01 installer]$ ps -ef | grep lsnrctl
oracle   16685 16832  0 00:14 pts/1    00:00:00 grep lsnrctl

oracle@lnxdg02 installer]$ ps -ef | grep pmon
oracle   16048  3311  1 00:14 pts/1    00:00:00 grep pmon
[oracle@lnxdg02 installer]$ ps -ef | grep lsnrctl
oracle   16051  3311  0 00:15 pts/1    00:00:00 grep lsnrctl
unzip p9352164_10204_Linux-x86-64.zip 

Determine whether any currently installed one-off patches conflict with the PSU patch as follows:

[oracle@lnxdg01 installer]$ $ORACLE_BASE/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352164
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /opt/app/oracle/product/10.2.0/db_1
Central Inventory : /opt/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.4.0
OUI location      : /opt/app/oracle/product/10.2.0/db_1/oui
Log file location : /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-11-01_00-19-39AM.log

Patch history file: /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

Apply patch

[oracle@lnxdg01 9352164]$ $ORACLE_BASE/OPatch/opatch apply
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /opt/app/oracle/product/10.2.0/db_1
Central Inventory : /opt/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.4.0
OUI location      : /opt/app/oracle/product/10.2.0/db_1/oui
Log file location : /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-11-01_00-46-26AM.log

Patch history file: /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '9352164' to OH '/opt/app/oracle/product/10.2.0/db_1'

Running prerequisite checks...
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:          

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.


Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/opt/app/oracle/product/10.2.0/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '9352164' for restore. This might take a while...
Backing up files affected by the patch '9352164' for rollback. This might take a while...
Execution of 'sh /u01/installer/9352164/custom/scripts/pre -apply 9352164 ':


Return Code = 0

Patching component oracle.rdbms.rsf, 10.2.0.4.0...
Updating archive file "/opt/app/oracle/product/10.2.0/db_1/lib/libgeneric10.a"  with "lib/libgeneric10.a/qcodfdef.o"
.
.
.
Updating archive file "/opt/app/oracle/product/10.2.0/db_1/lib32/libnro10.a"  with "lib32/libnro10.a/ncrfgp.o"

Patching component oracle.network.listener, 10.2.0.4.0...

Patching component oracle.ctx, 10.2.0.4.0...
Copying file to "/opt/app/oracle/product/10.2.0/db_1/ctx/admin/driutl.plb"

Patching component oracle.sdo.locator, 10.2.0.4.0...
Copying file to "/opt/app/oracle/product/10.2.0/db_1/md/admin/locdbmig.sql"

Patching component oracle.rdbms.plsql, 10.2.0.4.0...

Patching component oracle.sqlplus, 10.2.0.4.0...
Updating archive file "/opt/app/oracle/product/10.2.0/db_1/lib/libsqlplus.a"  with "lib/libsqlplus.a/aficon.o"
Updating archive file "/opt/app/oracle/product/10.2.0/db_1/lib/libsqlplus.a"  with "lib/libsqlplus.a/aficmx.o"
Updating archive file "/opt/app/oracle/product/10.2.0/db_1/lib32/libsqlplus.a"  with "lib32/libsqlplus.a/aficon.o"
Updating archive file "/opt/app/oracle/product/10.2.0/db_1/lib32/libsqlplus.a"  with "lib32/libsqlplus.a/aficmx.o"
Running make for target iextjob
Running make for target iextjobo
Running make for target client_sharedlib
Running make for target idgmgrl
Running make for target ioracle
Running make for target client_sharedlib
Running make for target itnslsnr
Running make for target iwrap
Running make for target genplusso
ApplySession adding interim patch '9352164' to inventory

Verifying the update...
Inventory check OK: Patch ID 9352164 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 9352164 are present in Oracle Home.

--------------------------------------------------------------------------------
********************************************************************************
********************************************************************************
**                                ATTENTION                                   **
**                                                                            **
** Please note that the Patch Set Update Installation (PSU Deinstallation)    **
** is not complete until all the Post Installation (Post Deinstallation)      **
** instructions noted in the Readme accompanying this PSU, have been          **
** successfully completed.                                                    **
**                                                                            **
********************************************************************************
********************************************************************************

--------------------------------------------------------------------------------

Execution of 'sh /u01/installer/9352164/custom/scripts/post -apply 9352164 ':


Return Code = 0

The local system has been patched and can be restarted.


OPatch succeeded.

If you use the Job Scheduling system, run psu_root.sh as root to complete the installation of molecule 7155248. To run psu_root.sh, go to the directory where you downloaded the patch (if you are not already in that directory) and enter the following command:

sh psu_root.sh

If you are unable to run psu_root.sh during the PSU patch installation because of the additional access rights required, it can be scheduled to run at a later time, and the database does not need to be shut down.
If you do not run psu_root.sh, which changes the permissions on the binary extjob, executable jobs can fail with the following error:

ORA-27369: job of type EXECUTABLE failed with exit code: ...

Note that this step has no impact on the implementation of the PSU security fixes; it only affects the successful execution of the Job Scheduling system. That is, if you do not run psu_root.sh when you should, or if you run psu_root.sh but fail to run it as root, the PSU security fixes are still installed; however, the Job Scheduling system will fail.

[root@lnxdg01 ~]# /u01/installer/9352164/psu_root.sh 
/u01/installer/9352164/psu_root.sh: line 5: ORACLE_HOME is not set. Please set the ORACLE_HOME and rerun psu_root.sh: command not found
/u01/installer/9352164/psu_root.sh: line 6: Script terminated: command not found
[root@lnxdg01 ~]# export ORACLE_HOME=/opt/app/oracle/product/10.2.0/db_1
[root@lnxdg01 ~]# /u01/installer/9352164/psu_root.sh 
[root@lnxdg01 ~]# 

Post Installation
The following steps load modified SQL files into the database. For a RAC environment, perform these steps on only one node.
For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
cd $ORACLE_HOME/rdbms/admin


SQL> startup

ORACLE instance started.

Total System Global Area  268435456 bytes
Fixed Size		    2083304 bytes
Variable Size		  205522456 bytes
Database Buffers	   54525952 bytes
Redo Buffers		    6303744 bytes
Database mounted.
Database opened.
SQL> @catbundle.sql psu apply

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed

Generating apply and rollback scripts...
Check the following file for errors:
/opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/catbundle/catbundle_PSU_TEST01_GENERATE_2011Nov01_01_08_46.log
Apply script: /opt/app/oracle/product/10.2.0/db_1/rdbms/admin/catbundle_PSU_TEST01_APPLY.sql
Rollback script: /opt/app/oracle/product/10.2.0/db_1/rdbms/admin/catbundle_PSU_TEST01_ROLLBACK.sql

PL/SQL procedure successfully completed.

Executing script file...
.
.
.
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/catbundle/catbundle_PSU_TEST01_APPLY_2011Nov01_01_08_56.log

execute utlrp script
SQL>  @utlrp

For information about the catbundle.sql script, see My Oracle Support Note 605795.1 Introduction to Oracle Database catbundle.sql.
Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle for any errors:

checking the inventory again.

[oracle@lnxdg01 admin]$ $ORACLE_BASE/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /opt/app/oracle/product/10.2.0/db_1
Central Inventory : /opt/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.4.0
OUI location      : /opt/app/oracle/product/10.2.0/db_1/oui
Log file location : /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-11-01_01-21-42AM.log

Patch history file: /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-11-01_01-21-42AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2): 

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.


Interim patches (1) :

Patch  9352164      : applied on Tue Nov 01 00:57:11 SGT 2011
Unique Patch ID:  12307477
   Created on 1 Apr 2010, 11:33:14 hrs PST8PDT
   Bugs fixed:
     9377578, 6418420, 7835247, 7207654, 7592346, 6724797, 7936993, 7331867
     9093300, 7535152, 7552067, 5879114, 8866013, 5457450, 8344348, 7272297
     7136866, 7196894, 6258480, 7013124, 6512622, 6355586, 7196532, 8568395
     8309587, 7557226, 5399699, 6509115, 8568397, 8568398, 7127618, 5701695
     6052226, 7424804, 6817593, 7553884, 6741425, 7513673, 6783812, 8437213
     6452766, 6469211, 7527650, 8309592, 8479537, 5991038, 5686407, 6945157
     7639602, 9119226, 6403091, 7589862, 7552082, 6711853, 8304589, 6052169
     8199266, 6327692, 5756769, 9352191, 7460818, 6268409, 8232056, 6687381
     6972843, 8230457, 6800507, 7027551, 6778714, 6200820, 6645719, 7393804
     6775231, 3934160, 6683178, 6650256, 5085288, 7528105, 7329252, 6378112
     6151380, 6844866, 4723109, 8544896, 5126719, 5890312, 5934363, 7036453
     7610362, 8426816, 8433026, 7270434, 7172531, 6451626, 8247855, 5497338
     6324944, 6874522, 7175513, 6960489, 7341598, 8576156, 6797677, 8342923
     5895190, 6756739, 7150470, 7593835, 7356443, 7044551, 8227106, 4695511
     7298688, 5747462, 8556340, 7197445, 5348308, 7937113, 8341623, 7569205
     8409848, 6053134, 6163771, 6851669, 6181488, 6375150, 6825866, 7210921
     7295780, 6345573, 7033630, 6954722, 6824129, 7523475, 7457766, 7309458
     8324577, 6840740, 6804746, 7375611, 8268054, 6981690, 6512811, 6988017
     7375613, 8344399, 7340448, 8362683, 7375617, 8251247, 5933656, 6005347
     9145204, 6599920, 7238230, 6379441, 6452375, 6352003, 6833965, 7136489
     6610218, 7612639, 6392076, 7225204, 9119194, 5476236, 9442328, 7609057
     7609058, 6605106, 6374297, 6193945, 4693355, 8217795, 7039896, 7432514
     7330909, 6952701, 7190270, 8287155, 7587008, 7207932, 6802650, 7189447
     8481935, 4598439, 9442331, 6615740, 7155655, 6749617, 9442335, 7159505
     5868257, 5727166, 7173005, 6917874, 9442339, 7013768, 7691766, 7385253
     7291739, 7225720, 7257770, 7363767, 7244238, 6941717, 8267348, 7710551
     8354686, 7247217, 8328954, 7299153, 8909984, 6681695, 8702276, 9119284
     8217011, 7661251, 6265559, 6823287, 6991626, 6954829, 5259835, 6500033
     5923486, 7432601, 7022234, 8534387, 5147386, 7697802, 6653934, 7375644
     6490140, 7662491, 8331466, 5623467, 6070225, 6635214, 7396409, 6638558
     7038750, 6714608, 6838714, 6870937, 7219752, 7263842, 7278117, 6882739
     5404871, 8836667, 8373286, 7393292, 6678845, 6903051, 7936793, 6600051
     7155248, 4966512, 7155249, 7197637, 8836308, 8568402, 8568404, 8568405
     8431487, 5704108, 6343150, 7280764, 6923450, 7643632, 6145177, 8836671
     8310931, 6640411, 8347704, 8836675, 7155250, 7155251, 8836677, 7155252
     8836678, 7155253, 8292378, 7155254, 6219529, 7411865, 8227091, 8340379
     7276960, 6145687, 7659217, 5863926, 7022905, 6852598, 7123643, 6596564
     6413089, 6851438, 8836681, 8836683, 8836684, 8836686, 7579469, 7494333
     7315642, 8340383, 6786022, 8340387, 6926448, 7600026, 7462072, 6679303
     8815639, 7197583, 7172752, 7326645, 7008262, 9173244, 9173248, 7573151
     8490879, 7477934, 6725634, 6733655, 6799205, 6980597, 7499353, 6084232
     6014513, 7140204, 7254987, 8833280, 6647480, 6120004, 7693128, 6760697
     6051177, 8247215, 6858062, 7189645, 6844739, 6768251, 7196863, 5630796
     7378661, 7378735, 5970301, 6705822, 8290506, 6658484, 7599944, 9173253
     8309623, 7125408, 7257461, 6987790, 7568556, 6919819, 8886674, 5883691
     6955744, 7801939, 6074620, 7149004, 6857917, 8283650, 6445948, 5929055
     6110752, 7552042, 8210889, 8287504, 6506617, 7306915, 6271590, 5386204
     6976005, 8330783, 7606362, 5377242, 7043989, 8309632, 7575925, 6870047
     8309637, 5902053, 8309639, 7028176, 6827260, 7588384, 4726401, 6720712
     5910650, 6752765, 6971433, 6024730, 8315482, 6628122, 8239142, 9352164
     5695562, 4637902, 7345904, 8309642, 6994160, 8556586, 6404447, 8220734
     6919764, 7597354, 7523787, 6029179, 5231155, 6455659
--------------------------------------------------------------------------------

OPatch succeeded.

Recompiling Views in the Database
Recompiling views in the database is a one-time action that is required to complete the installation of CPU fixes that were initially released in January, 2008. It requires that the database be in upgrade mode, so this step is not rolling RAC installable. You may defer this step to a later downtime. If you do this, your system will continue to work; however, the installation of the January 2008 CPU fixes will not be complete until the view recompilation is completed.
Skip this section if you have recompiled views for this database during the installation of a previous PSU or CPU.
The time required to recompile the views and related objects depends on the total number of objects and on your system configuration. In one internal Oracle test with approximately 2000 views and 4000 objects, the total execution time for view_recompile_jan2008cpu.sql and utlrp.sql was about 30 minutes.
If you want to check whether view recompilation has already been performed for the database, execute the following statement:

SELECT * FROM registry$history where ID = '6452863';
If the view recompilation has been performed, this statement returns one or more rows. If the view recompilation has not been performed, this statement returns no rows.

The following steps recompile the views in the database. For a RAC environment, perform these steps on only one node.
Run the pre-check script (so named because it was initially released in CPUJan2008), which reports the maximum number of views and objects that may be recompiled:

SQL> @recompile_precheck_jan2008cpu.sql

Running precheck.sql...

Number of views to be recompiled :2043
-----------------------------------------------------------------------

Number of objects to be recompiled :4114
Please follow the README.txt instructions for running viewrecomp.sql

PL/SQL procedure successfully completed.

The purpose of this step is to help you determine whether view recompilation should be done at the same time as the PSU install, or scheduled later.

Run the view recompilation script. Note that this script is run with the database in upgrade mode, which restricts connections as SYSDBA.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup upgrade;
ORACLE instance started.

Total System Global Area  268435456 bytes
Fixed Size		    2083304 bytes
Variable Size		  205522456 bytes
Database Buffers	   54525952 bytes
Redo Buffers		    6303744 bytes
Database mounted.
Database opened.
SQL> @view_recompile_jan2008cpu.sql
PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.

1 row created.

Commit complete.

No. of Invalid Objects is :50
Please refer to README.html to for instructions on validating these objects

PL/SQL procedure successfully completed.

Logfile for the current viewrecomp.sql session is : vcomp_TEST01_01Nov2011_01_44_49.log

SQL> @$ORACLE_HOME/rdbms/admin/utlrp

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2011-11-01 01:49:54


PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END  2011-11-01 01:50:36


PL/SQL procedure successfully completed.

DOC> The following query reports the number of objects that have compiled
DOC> with errors (objects that compile with errors have status set to 3 in
DOC> obj$). If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
		  0

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
			  0


PL/SQL procedure successfully completed.

SQL>
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  268435456 bytes
Fixed Size		    2083304 bytes
Variable Size		  205522456 bytes
Database Buffers	   54525952 bytes
Redo Buffers		    6303744 bytes
Database mounted.
Database opened.
SQL>

Restart database, now on standby database start database and listener assuming that the patch is already installed.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  268435456 bytes
Fixed Size		    2083304 bytes
Variable Size		   92276248 bytes
Database Buffers	  167772160 bytes
Redo Buffers		    6303744 bytes
SQL> alter database mount standby database;

Database altered.

SQL> alter database recover managed standby database disconnect;

Database altered.

SQL> 

DONE!
BAI

upgrade 10.2.0.1 to 10.2.0.4 on linux with physical standby

PRIMARY : TEST01
STANDBY : TEST01DR

1.Unzip Oracle Installer

oracle@lnxdg01 installer]$ ls -lrt
total 176
drwxr-xr-x 5 oracle oinstall   4096 Mar 12  2008 Disk1/
-rwxr-xr-x 1 oracle oinstall 171882 Mar 17  2008 README.html*
[oracle@lnxdg01 installer]$

2. Stop all services

-stop database and listener  [primay and stadby]

3. execute the installer in silent mode in both primary and standby server.

runInstaller -silent                                 \
      -responseFile /u01/installer/Disk1/response/patchset.rsp   \
       ORACLE_HOME=/opt/app/oracle/product/10.2.0/db_1 \
       ORACLE_HOME_NAME=ORADB102_Home10

[oracle@lnxdg02 Disk1]$ ./runInstaller -silent -responseFile /u01/installer/Disk1/response/patchset.rsp ORACLE_HOME=/opt/app/oracle/product/10.2.0/db_1 ORACLE_HOME_NAME=ORADB102_Home10
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1, asianux-2 or asianux-3
                                      Passed

All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-10-31_05-06-37AM. Please wait ...[oracle@lnxdg02 Disk1]$ Oracle Universal Installer, Version 10.2.0.4.0 Production
Copyright (C) 1999, 2008, Oracle. All rights reserved.

You can find a log of this install session at:
 /opt/app/oracle/oraInventory/logs/installActions2011-10-31_05-06-37AM.log
.................................................................................................... 100% Done.

Loading Product Information
.......................................................................................................... 100% Done.

Starting execution of Prerequisites...
Total No of checks: 2

Performing check for checkToInstallCCR
Checking the Components installed in Oracle Home
Check complete. The overall result of this check is: Passed

Check complete: Passed
=======================================================================
Performing check for CompatibilityChecks
Checking for Oracle Home incompatibilities ...
Check complete. The overall result of this check is: Passed

Check complete: Passed
=======================================================================
PrereqChecks complete

Analyzing dependencies 
............................................................................................................. 100% Done.

-----------------------------------------------------------------------------
Summary
Global Settings
    Source: /u01/installer/Disk1/stage/products.xml
    Oracle Home: /opt/app/oracle/product/10.2.0/db_1 (ORADB102_Home10)
Product Languages
   English
Space Requirements
   / Required 1.42GB (includes 55MB temporary) : Available 11.32GB
New Installations (81 products)
   Oracle Notification Service Patch 10.2.0.4.0 
   Database Configuration and Upgrade Assistants Patch 10.2.0.4.0 
   Character Set Migration Utility Patch 10.2.0.4.0 
   Oracle Database 10g Patch 10.2.0.4.0 
   Oracle JDBC/OCI Instant Client Patch 10.2.0.4.0 
   Oracle Database 10g Patch 10.2.0.4.0 
   Enterprise Manager plugin Common Files Patch 10.2.0.4.0 
   SQL*Plus 10.2.0.4.0 
   HAS Common Files Patch 10.2.0.4.0 
   HAS Files for DB Patch 10.2.0.4.0 
   Oracle Java Client Patch 10.2.0.4.0 
   Oracle JVM Patch 10.2.0.4.0 
   Oracle Internet Directory Client Patch 10.2.0.4.0 
   iSQL*Plus 10.2.0.4.0 
   Oracle Advanced Security Patch 10.2.0.4.0 
   Oracle Net Patch 10.2.0.4.0 
   Oracle Net Listener Patch 10.2.0.4.0 
   Oracle Wallet Manager Patch 10.2.0.4.0 
   Precompiler Common Files Patch 10.2.0.4.0 
   Secure Socket Layer Patch 10.2.0.4.0 
   Oracle ODBC Driver Patch 10.2.0.4.0 
   Oracle OLAP Patch 10.2.0.4.0 
   Oracle OLAP API Patch 10.2.0.4.0 
   OLAP SQL Scripts Patch 10.2.0.4.0 
   Oracle interMedia Client Option Patch 10.2.0.4.0 
   Oracle Database 10g interMedia Files Patch 10.2.0.4.0 
   Oracle interMedia Patch 10.2.0.4.0 
   PL/SQL Embedded Gateway Patch 10.2.0.4.0 
   Oracle XML Development Kit Patch 10.2.0.4.0 
   Oracle Text Patch 10.2.0.4.0 
   Oracle Clusterware RDBMS Files Patch 10.2.0.4.0 
   Database SQL Scripts Patch 10.2.0.4.0 
   Oracle Data Mining RDBMS Files Patch 10.2.0.4.0 
   Generic Connectivity Common Files Patch 10.2.0.4.0 
   Installation Common Files Patch 10.2.0.4.0 
   Oracle Starter Database Patch 10.2.0.4.0 
   Sample Schema Data Patch 10.2.0.4.0 
   Oracle interMedia Locator RDBMS Files Patch 10.2.0.4.0 
   Oracle Call Interface (OCI) Patch 10.2.0.4.0 
   Oracle OLAP RDBMS Files Patch 10.2.0.4.0 
   Oracle Partitioning Patch 10.2.0.4.0 
   PL/SQL 10.2.0.4.0 
   Oracle Recovery Manager Patch 10.2.0.4.0 
   Oracle Database Utilities Patch 10.2.0.4.0 
   Oracle interMedia Locator Patch 10.2.0.4.0 
   XML Parser for Java Patch 10.2.0.4.0 
   Assistant Common Files Patch 10.2.0.4.0 
   Oracle JDBC Thin Driver for JDK 1.2 Patch 10.2.0.4.0 
   Oracle JDBC Thin Driver for JDK 1.4 Patch 10.2.0.4.0 
   Oracle interMedia Java Advanced Imaging Patch 10.2.0.4.0 
   SQLJ Runtime Patch 10.2.0.4.0 
   XML Parser for Oracle JVM Patch 10.2.0.4.0 
   Enterprise Manager Agent DB 10.2.0.4.0 
   Enterprise Manager Baseline 10.2.0.4.0 
   Oracle Enterprise Manager Console DB 10.2.0.4.0 
   XDK Required Support Files Patch 10.2.0.4.0 
   Agent Required Support Files Patch 10.2.0.4.0 
   DBJAVA Required Support Files Patch 10.2.0.4.0 
   LDAP Required Support Files Patch 10.2.0.4.0 
   Precompiler Required Support Files Patch 10.2.0.4.0 
   Oracle RAC Required Support Files-HAS Patch 10.2.0.4.0 
   RDBMS Required Support Files for Instant Client Patch 10.2.0.4.0 
   RDBMS Required Support Files Patch 10.2.0.4.0 
   SQL*Plus Required Support Files Patch 10.2.0.4.0 
   SSL Required Support Files for InstantClient Patch 10.2.0.4.0 
   Oracle Net Required Support Files Patch 10.2.0.4.0 
   Oracle Globalization Support Patch 10.2.0.4.0 
   Oracle Core Required Support Files Patch 10.2.0.4.0 
   Platform Required Support Files 10.2.0.4.0 
   Oracle Message Gateway Common Files Patch 10.2.0.4.0 
   Enterprise Manager Agent Core Patch 10.2.0.4.0a 
   Enterprise Manager Common Core Patch 10.2.0.4.0a 
   Enterprise Manager Repository Core patch 10.2.0.4.0a 
   Oracle Containers for Java 10.2.0.4.0 
   Enterprise Manager Repository DB 10.2.0.4.0 
   Oracle LDAP administration patch 10.2.0.4.0 
   Oracle Required Support Files 32 bit Patch 10.2.0.4.0 
   JDBC Common Files 10.2.0.4.0 
   Database Workspace Manager 10.2.0.4.0 
   Oracle Configuration Manager 10.2.7.1.0 
   Oracle Real Application Testing 10.2.0.4.0 
Upgrades (5 products)
   Oracle Universal Installer 10.2.0.4.0 
   Oracle One-Off Patch Installer 10.2.0.4.0 
   Installer SDK Component 10.2.0.4.0 
   Java Runtime Environment 1.4.2.14.0 
   Sun JDK 1.4.2.14.0 
Already Installed (79 products)
   Oracle Notification Service 10.1.0.3.0 
   Database Configuration and Upgrade Assistants 10.2.0.1.0 
   Character Set Migration Utility 10.2.0.1.0 
   Oracle Database 10g 10.2.0.1.0 
   Oracle JDBC/OCI Instant Client 10.2.0.1.0 
   Oracle Database 10g 10.2.0.1.0 
   Enterprise Manager plugin Common Files 10.2.0.1.0 
   SQL*Plus 10.2.0.1.0 
   HAS Common Files 10.2.0.1.0 
   HAS Files for DB 10.2.0.1.0 
   Oracle Java Client 10.2.0.1.0 
   Oracle JVM 10.2.0.1.0 
   Oracle Internet Directory Client 10.2.0.1.0 
   iSQL*Plus 10.2.0.1.0 
   Oracle Advanced Security 10.2.0.1.0 
   Oracle Net 10.2.0.1.0 
   Oracle Net Listener 10.2.0.1.0 
   Oracle Wallet Manager 10.2.0.1.0 
   Precompiler Common Files 10.2.0.1.0 
   Secure Socket Layer 10.2.0.1.0 
   Oracle ODBC Driver 10.2.0.1.0 
   Oracle OLAP 10.2.0.1.0 
   Oracle OLAP API 10.2.0.1.0 
   OLAP SQL Scripts 10.2.0.1.0 
   Oracle interMedia Client Option 10.2.0.1.0 
   Oracle Database 10g interMedia Files 10.2.0.1.0 
   Oracle interMedia 10.2.0.1.0 
   PL/SQL Embedded Gateway 10.2.0.1.0 
   Oracle XML Development Kit 10.2.0.1.0 
   Oracle Text 10.2.0.1.0 
   Oracle Clusterware RDBMS Files 10.2.0.1.0 
   Database SQL Scripts 10.2.0.1.0 
   Oracle Data Mining RDBMS Files 10.2.0.1.0 
   Generic Connectivity Common Files 10.2.0.1.0 
   Installation Common Files 10.2.0.1.0 
   Oracle Starter Database 10.2.0.1.0 
   Sample Schema Data 10.2.0.1.0 
   Oracle interMedia Locator RDBMS Files 10.2.0.1.0 
   Oracle Call Interface (OCI) 10.2.0.1.0 
   Oracle OLAP RDBMS Files 10.2.0.1.0 
   Oracle Partitioning 10.2.0.1.0 
   PL/SQL 10.2.0.1.0 
   Oracle Recovery Manager 10.2.0.1.0 
   Oracle Database Utilities 10.2.0.1.0 
   Oracle interMedia Locator 10.2.0.1.0 
   XML Parser for Java 10.2.0.1.0 
   Assistant Common Files 10.2.0.1.0 
   Oracle JDBC Thin Driver for JDK 1.2 10.2.0.1.0 
   Oracle JDBC Thin Driver for JDK 1.4 10.2.0.1.0 
   Oracle interMedia Java Advanced Imaging 10.2.0.1.0 
   SQLJ Runtime 10.2.0.1.0 
   XML Parser for Oracle JVM 10.2.0.1.0 
   Enterprise Manager Agent DB 10.2.0.1.0 
   Enterprise Manager Baseline 10.2.0.1.0 
   Oracle Enterprise Manager Console DB 10.2.0.1.0 
   XDK Required Support Files 10.2.0.1.0 
   Agent Required Support Files 10.2.0.1.0 
   DBJAVA Required Support Files 10.2.0.1.0 
   LDAP Required Support Files 10.2.0.1.0 
   Precompiler Required Support Files 10.2.0.1.0 
   Oracle RAC Required Support Files-HAS 10.2.0.1.0 
   RDBMS Required Support Files for Instant Client 10.2.0.1.0 
   RDBMS Required Support Files 10.2.0.1.0 
   SQL*Plus Required Support Files 10.2.0.1.0 
   SSL Required Support Files for InstantClient 10.2.0.1.0 
   Oracle Net Required Support Files 10.2.0.1.0 
   Oracle Globalization Support 10.2.0.1.0 
   Oracle Core Required Support Files 10.2.0.1.0 
   Platform Required Support Files 10.2.0.1.0 
   Oracle Message Gateway Common Files 10.2.0.1.0 
   Enterprise Manager Agent Core 10.2.0.1.0 
   Enterprise Manager Common Files 10.2.0.1.0 
   Enterprise Manager Repository Core 10.2.0.1.0 
   Oracle Containers for Java 10.2.0.1.0 
   Enterprise Manager Repository DB 10.2.0.1.0 
   Oracle LDAP administration 10.2.0.1.0 
   Oracle Required Support Files 32 bit 10.2.0.0.0 
   JDBC Common Files 10.2.0.1.0 
   Database Workspace Manager 10.2.0.1.0 
-----------------------------------------------------------------------------

Deinstall in progress (Monday, October 31, 2011 5:13:11 AM SGT)
...............................................................   0% Done.
...............................................................  14% Done.
...............................................................  29% Done.
...............................................................  44% Done.
...............................................................  59% Done.
...............................................................  74% Done.
..............................................                  100% Done.

Deinstall successful

Installation in progress (Monday, October 31, 2011 5:13:12 AM SGT)
...............................................................  14% Done.
...............................................................  29% Done.
...............................................................  44% Done.
...............................................................  59% Done.
...............................................................  74% Done.
......................................................           87% Done.
Install successful

Linking in progress (Monday, October 31, 2011 5:18:35 AM SGT)
...                                                              87% Done.
Link successful

Setup in progress (Monday, October 31, 2011 5:26:05 AM SGT)
.........                                                       100% Done.
Setup successful

End of install phases.(Monday, October 31, 2011 5:26:27 AM SGT)
WARNING:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/opt/app/oracle/product/10.2.0/db_1/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts

The installation of Oracle Database 10g Release 2 Patch Set 3 was successful.
Please check '/opt/app/oracle/oraInventory/logs/silentInstall2011-10-31_05-06-37AM.log' for more details.

[oracle@lnxdg02 Disk1]$ su -
Password: 
[root@lnxdg02 ~]# /opt/app/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/app/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@lnxdg02 ~]#

4. Start Database and upgrade.

SQL> startup
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size		    2019320 bytes
Variable Size		   92274696 bytes
Database Buffers	   71303168 bytes
Redo Buffers		    2174976 bytes
Database mounted.
Database opened.

SQL> spool upgrade.log
SQL> @$ORACLE_HOME/rdbms/admin/catupgrd.sql
.
.
.
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UPGRD_END  2011-10-31 07:36:19
.
Oracle Database 10.2 Upgrade Status Utility           10-31-2011 07:36:19
.
Component                                Status         Version  HH:MM:SS
Oracle Database Server                    VALID      10.2.0.4.0  00:18:01
JServer JAVA Virtual Machine              VALID      10.2.0.4.0  00:05:55
Oracle XDK                                VALID      10.2.0.4.0  00:00:31
Oracle Database Java Packages             VALID      10.2.0.4.0  00:00:55
Oracle Text                               VALID      10.2.0.4.0  00:00:25
Oracle XML Database                       VALID      10.2.0.4.0  00:02:17
Oracle Workspace Manager                  VALID      10.2.0.4.3  00:01:09
Oracle Data Mining                        VALID      10.2.0.4.0  00:00:32
OLAP Analytic Workspace                   VALID      10.2.0.4.0  00:00:32
OLAP Catalog                              VALID      10.2.0.4.0  00:00:58
Oracle OLAP API                           VALID      10.2.0.4.0  00:01:20
Oracle interMedia                         VALID      10.2.0.4.0  00:22:32
Spatial                                   VALID      10.2.0.4.0  00:03:11
Oracle Expression Filter                  VALID      10.2.0.4.0  00:00:31
Oracle Enterprise Manager                 VALID      10.2.0.4.0  00:02:17
Oracle Rule Manager                       VALID      10.2.0.4.0  00:00:11
.
Total Upgrade Time: 01:01:29
DOC>#######################################################################
DOC>#######################################################################
DOC>
DOC>   The above PL/SQL lists the SERVER components in the upgraded
DOC>   database, along with their current version and status.
DOC>
DOC>   Please review the status and version columns and look for
DOC>   any errors in the spool log file.  If there are errors in the spool
DOC>   file, or any components are not VALID or not the current version,
DOC>   consult the Oracle Database Upgrade Guide for troubleshooting
DOC>   recommendations.
DOC>
DOC>   Next shutdown immediate, restart for normal operation, and then
DOC>   run utlrp.sql to recompile any invalid application objects.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

5. Verify again that all components are valid.

SQL> col COMP_NAME format a50
set linesize 200
set pagesize 200
 select comp_name,version, status from dba_registry;SQL> SQL> SQL> 

COMP_NAME					   VERSION			  STATUS
-------------------------------------------------- ------------------------------ -----------
Oracle Database Catalog Views			   10.2.0.4.0			  VALID
Oracle Database Packages and Types		   10.2.0.4.0			  VALID
Oracle Workspace Manager			   10.2.0.4.3			  VALID
JServer JAVA Virtual Machine			   10.2.0.4.0			  VALID
Oracle XDK					   10.2.0.4.0			  VALID
Oracle Database Java Packages			   10.2.0.4.0			  VALID
Oracle Expression Filter			   10.2.0.4.0			  VALID
Oracle Data Mining				   10.2.0.4.0			  VALID
Oracle Text					   10.2.0.4.0			  VALID
Oracle XML Database				   10.2.0.4.0			  VALID
Oracle Rule Manager				   10.2.0.4.0			  VALID
Oracle interMedia				   10.2.0.4.0			  VALID
OLAP Analytic Workspace 			   10.2.0.4.0			  VALID
Oracle OLAP API 				   10.2.0.4.0			  VALID
OLAP Catalog					   10.2.0.4.0			  VALID
Spatial 					   10.2.0.4.0			  VALID
Oracle Enterprise Manager			   10.2.0.4.0			  VALID

17 rows selected.

6. Start the Physical standby

SQL> startup nomount;

ORACLE instance started.

Total System Global Area  268435456 bytes
Fixed Size		    2083304 bytes
Variable Size		   88081944 bytes
Database Buffers	  171966464 bytes
Redo Buffers		    6303744 bytes
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;

Database altered.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;

Database altered.

Check alert log for any error. all changes in primary will be applied once standby is in sync.