DB SERVER SOFTWARE
PATCH MANAGEMENT
Types of patches:
Interim patch (off one/single) utility: opatch
Patchset patch (collection of interim patches) utility: oracle universal installer (oui)
Applying
Interim patch
Utility: optach Location: $ORACLE_HOME/OPatch
Steps:
1 Download the
patch and unzip the patch (It will create a patch directory which contains patch
related
files)
2 Go inside that directory and
open the readme.txt
3 See which bug it is going to fix.
4 Stop all the db services (database, listener etc.)
5 Set the path for opatch utility
$export PATH=$ORACLE_HOME/OPatch:$PATH:.
to apply
the patch
$opatch
apply <patch id>
To
see the information which problem patch is going to fix
$opatch query
To get
the installed patches information
$opatch
lsinventory // It reads
$ORACLE_HOME/ContentsXML/comps.xml
to see version of opatch utility
$opatch version
to rollback the patch
$opatch
rollback -id <patch id>
Patch_id
à patch number
$opatch
rollback -id 6011182
To
restore a failed patch
$cd
$ORACLE_HOME/.patch_storage/<patchid-timestamp>
$./restore.sh
Applying
patchset:
Steps:
1 Take the backup of ORACLE_HOME using cp
2 Unzip the patchset patch.(it will create a
directory named DISK1)
3 Go to DISK1 directory and run the installer
4 After upgrading the software upgrade the
data dictionary of database.
Start the database in
upgrade mode and run catupgrd.sql script
Sql>startup
upgrade;
Sql>@$ORACLE_HOME/rdbms/admin/catupgrd.sql
5
Find invalid db object and recompile them using utlrp.sql script
Sql>select
count (*) from dba_objects where status=’INVALID’;
To compile
Sql>@$ORACLE_HOME/rdbms/admin/utlrp.sql;
To downgrade the database
from restoring ORACLE_HOME (binaries)
Sql>startup downgrade
Sql>@$ORACLE_HOME/rdbms/admin/catdwngrd.sql
1. Find invalid db
object and recompile them using utlrp.sql
script
Sql>select
count (*) from dba_objects where status=’INVALID’;
To compile
Sql>@$ORACLE_HOME/rdbms/admin/utlrp.sql;
//utility recompile//
No comments:
Post a Comment