Wednesday, October 17, 2012

Applying Oracle Critical Patch - CPU

Follow these steps:

Assume that we are in a single instance (Not RAC), shut down all instances and listeners associated with the Oracle home that you
are updating.

Ensure that the $PATH has the following executables: make, ar, ld, and nm.
The location of these executables depends on your operating system. On many operating systems, they are
located in /usr/ccs/bin, in which case you can set your PATH as follows:

export PATH=$PATH:/usr/ccs/bin
or
export PATH=$PATH:$ORACLE_HOME/OPatch


Set your current directory to the directory where the patch is located and then run the OPatch utility by entering
the following commands:
unzip p14390377_112020_.zip
cd 14390377

Then run

opatch napply -skip_subset -skip_duplicate

After installing succefully check

opatch lsinventory

You can see the latest patch versions updated

connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql cpu apply
SQL> QUIT

If catbundle is not recognizing run it with the path

SQL > @?/rdbms/admin/catbundle.sql cpu apply

Finally check the below path for any errors

catbundle_CPU__APPLY_.log
catbundle_CPU__GENERATE_.log

References
https://updates.oracle.com/Orion/Services/download?type=readme&aru=15433726#CHDCBBFE

Monday, October 8, 2012

Recovering from Missed /Deleted dbf file in Oracle

Scenerio- one or more datafiles are deleted from OS level and databae is not geeting open. Issue SQL> startup ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance ORACLE instance started. Total System Global Area 534462464 bytes Fixed Size 2215064 bytes Variable Size 390071144 bytes Database Buffers 134217728 bytes Redo Buffers 7958528 bytes Database mounted. ORA-01157: cannot identify/lock data file 8 - see DBWR trace file ORA-01110: data file 8: '/u01/app4/oracle/oradata/uatdb3/rman_tbs02.dbf' Solution SQL> alter database datafile '/u01/app4/oracle/oradata/uatdb3/rman_tbs02.dbf' offline drop; Database altered. SQL> alter database backup controlfile to trace as '/u01/app/test.ctl'; Database altered. SQL> alter database open 2 ; Database altered.