Order of Applying Patches
1. To determine the release information for these databases:
Start SQL*Plus from the Oracle home directory:
sqlplus /nolog
SQL> conn / as sysdba
The output is:
Connected
Check the version,Enter the following command:
SQL> select * from v$version;
2. To determine if you have an earlier CPU installed, run:
% ORACLE_HOME%/OPatch/opatch lsinventory
opatch lsinventory
If patch 5881721 (CPUJan2007), 5901891 (CPUApr2007), or 6064331 (CPUApr2007 Merge) is present, then run the appropriate rollback command
5881721 (CPUJan2007): opatch rollback -id 5881721
5901891 (CPUApr2007): opatch rollback -id 5901891
6064331 (CPUApr2007 Merge): opatch rollback -id 6064331
You do not need to run catcpu_rollback.sql after you run the above rollback command.
3. Shut down all services in the Oracle home on the every node
lsnrctl stop
srvctl stop database –d DB_NAME
srvctl stop asm –n hostname
srvctl stop nodeapps –n hostname
check all oracle process had be stop
ps –ef|grep ora
In each node to repeat the above operation
% cd $ORACLE_HOME run some command first
su
$ /usr/sbin/slibclean
exit
cd 6864068
opatch napply -skip_subset -skip_duplicate
encounter error
The following actions have failed:
Copy failed from '/oracle/dbs10g/10.2/patches/6864068/6121268/files/lib/libjox10.a' to
'/oracle/dbs10g/10.2/lib/libjox10.a'...
The following actions have failed:
Copy failed from '/oracle/dbs10g/10.2/patches/6864068/6121268/files/lib/libjox10.a' to
'/oracle/dbs10g/10.2/lib/libjox10.a'...
i open anther window and login as root run
/usr/sbin/slibclean
# cp libjox10.a /oracle/dbs10g/10.2/lib/
cp: /oracle/dbs10g/10.2/lib/libjox10.a: Cannot open or remove a file containing a
running program.
then open another session as root perform. the steps below:
mv /oracle/dbs10g/10.2/lib/libjox10.a /oracle/dbs10g/10.2/lib/libjox10.a_backup
Then, as oracle user copy the '/oracle/dbs10g/10.2/patches/6864068/6121268/files/lib/libjox10.a' to
$ORACLE_HOME/lib
go back the opatch prompt and continue the installation by repsonding 'Y'
Do you want to proceed? [y|n] y
Then completed it but has warning
4. Post Installation Instructions
Loading Modified .sql Files into the Database
If there is a database in the Oracle home that you are patching, start all database instances running from this Oracle home.
For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run thecatcpu.sqlscript. as follows:
cd $ORACLE_HOME/cpu/CPUApr2008sqlplus /nologSQL> CONNECT / AS SYSDBASQL> STARTUPSQL> @catcpu.sqlSQL> QUITWhen I run this script. ,received error as follows:CREATE OR REPLACE PACKAGE BODY dbms_reputil2 wrapped
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object SYS.DBMS_REPUTIL2create or replace type exf$xpposlst is VARRAY(100) of NUMBER;
*
ERROR at line 1:
ORA-02303: cannot drop or replace a type with type or table dependents
catcpu.sqlreports any Invalid Objects, run the following commands:
cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> @utlrp.sql
check for any invalid objects by executing following statement:
SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS= 'INVALID';
5. Recompiling Views in the Database
Run the pre-check script. which reports the maximum number of views and objects that may be recompiled:
Note that this script. is run with the database in upgrade mode, which restricts connections as SYSDBA
cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP NOMOUNT
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;
SQL> SHUTDOWN
SQL> STARTUP UPGRADE
SQL> @view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP NOMOUNT;
Set the CLUSTER_DATABASE initialization parameter to TRUE:
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;
Restart the database:
SHUTDOWN;
STARTUP;
QUIT
6. Check the log file for any errors. The log file is in the current directory and is named:vcomp_
If any invalid objects were reported, run theutlrp.sqlscript. as follows:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
7. Verify that the view recompilation has been performed for the database, by executing the following statement:
SELECT * FROM registry$history where ID = '6452863';
If the view recompilation has been performed, this statement returns one row. If the view recompilation has not been performed, this statement returns no rows.
For the waning and received error ,I have create a “TAR”on metalink to get oracle support ,then oracle has give me some advice to resolve those problems as follows:
04-JUN-08 09:26:18 GMT
(Update for record id(s): 232119668)
UPDATE
======
Hi Us Oracle,
Regarding the warnings documented above (the ones received in opatch log):
These seem to be all warnings only so the relink will most likely have succeeded. To verify, I would suggest you to check the time stamp of the oracle executable as the executable will not be replaced if the relink failed.
1. check the timestamp of oracle executable:
ls -l $ORACLE_HOME/bin/oracle
if the timestamp is current (time of opatch run) the relink succeeded and no further actions are required.
2. if the oracle executable wasn't replaced try to relink again using the following command:
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk rac_off ioracle
This means that RAC objects will not be included during the linking phase and it should result in a 'cleaner' link.
Regarding the errors from running catcpu.sql:
1. for the first error:
CREATE OR REPLACE PACKAGE BODY dbms_reputil2 wrapped
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object SYS.DBMS_REPUTIL2
Usually this error occurs when the database is started in Normal mode when running catc
pu.sql. How did you startup the database?
Follow this action plan:
1. shutdown immediate
2. startup migrate
3. @catcpu.sql
4. shutdown immediate
5. startup
2. for the second error:
create or replace type exf$xpposlst is VARRAY(100) of NUMBER;
*
ERROR at line 1:
ORA-02303: cannot drop or replace a type with type or table dependents
This error is documented in the README file of the CPU (Known Issues section) and can be ignorred.
Thank you,
Stefan Damian
Global Customer Services
STATUS
======
@CUS -- Waiting for customer response