2012-09-09

BSU & OPatch commands


Just a little reminder, because I’m fed up with being forced to look for them everytime I have to work with patches …

BSU

Listing all the current applied patches

[admin@machine bsu]$ ./bsu.sh -view -status=applied -prod_dir=yourBEAHome/wlserver_10.3/
ProductName:       WebLogic Server
ProductVersion:    10.3 MP4
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/WebLogic Web Server Plugins,WebLogi
                   c Server/UDDI and Xquery Support,WebLogic Server/Workshop Co
                   de Completion Support
BEAHome:           yourBEAHome
ProductHome:       yourBEAHome/wlserver_10.3
PatchSystemDir:    yourBEAHome/utils/bsu
PatchDir:          yourBEAHome/patch_wls1034
Profile:           Default
DownloadDir:       yourBEAHome/utils/bsu/cache_dir
JavaVersion:       1.6.0_21
JavaVendor:        Sun

Patch ID:          QWG8 (9923849)
Patch ID:          Q8SV (11677325)
Patch ID:          LCYX (BUG8268373)
Patch ID:          PIEF (11733525)

Removing patch PIEF

[admin@machine bsu]$ ./bsu.sh -remove -patchlist=PIEF -prod_dir=yourBEAHome/wlserver_10.3/ Checking for conflicts..
No conflict(s) detected
Removing Patch ID: PIEF.
Result: Success

Re-installing patch PIEF

[admin@machine bsu]$ ./bsu.sh -install -patchlist=PIEF -prod_dir=yourBEAHome/wlserver_10.3/ Checking for conflicts..
No conflict(s) detected
Installing Patch ID: PIEF.
Result: Success

Get an old BEA Patch

In My Oracle Support, choose the tab "Patches & Updates" and enter the patch ID. Then you should be proposed to download the patch.

OPatch

 

Pre-requisites

http://docs.oracle.com/cd/B28359_01/em.111/b31207/oui7_opatch.htm
The OPatch utility requires the following environment:
  • The Oracle home environment variable (ORACLE_HOME) must point to a valid Oracle home directory and match the value used during installation of the Oracle home directory.
  • JRE version 1.4 or higher, Java commands for Windows, and ar, cp, fuser, and make commands for UNIX must be made available.
  • The library path must be set correctly for Oracle Real Application Clusters environments. OPatch uses some APIs to detect if the system is a Real Application Clusters system. Ensure that the library path is set correctly as follows:
    For Solaris:
    LD_LIBRARY_PATH = $ORACLE_HOME/lib32:$ORACLE_HOME/lib
    
    For HP-UX:
    SHLIB_PATH=$ORACLE_HOME/lib32:/usr/lib



 



Listing applied patches



yourBEAHome/soa/OPatch/opatch lsinventory -jre yourBEAHome/jdk1.6_64





Apply a patch



yourBEAHome/soa/OPatch/opatch apply -jre yourBEAHome/jdk1.6_64





Uninstall a patch



yourBEAHome/soa/OPatch/opatch rollback -id 13986504 -jre yourBEAHome/jdk1.6_64





Mots clés Technorati : ,,,

No comments: