Skip Headers
Oracle® Smart Update Applying Patches to Oracle WebLogic Server
Release 3.3.0

Part Number E14143-12
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

8 Using the Command-Line Interface

This section describes the Smart Update bsu command, which you can use to apply patches, interactively or through a script, that have been downloaded into a patch download directory. When you use bsu commands in a script, you can create a mechanism for replicating a specific maintenance level of a product that is installed on multiple systems. This capability is especially valuable in production environments, in which the distribution of software updates to systems must be implemented in a controlled, reliable, and reproducible manner.

The following topics are included:

About the bsu Command

When using the bsu command, either interactively or through a script, note that this command:

bsu Command Reference

This section describes the bsu command syntax. Square brackets appearing with a parameter argument indicate that the argument is optional.

The bsu command has the parameters and arguments listed and described in Table 8-1.

Note:

In Table 8-1, the square brackets, [..], represent arguments that are optional. For example, [-profile=profile_name] is an optional argument for the -install parameter

Table 8-1 bsu Command Parameters and Arguments

Parameter Description Arguments

-help

Displays a summary of bsu parameters and arguments

None.

-install

Applies specified patches to the target installation. You must specify a valid profile name.

[-patchlist=patch1[,patch2,patch3]

Specifies the identifier of each patch to be applied, represented as patch1, patch2, and patch3.

[-profile=profile_name]Specifies the patch profile to which the patches are to be applied, represented as profile_name.See the note at the end of the table.[-patch_download_dir=path]Specifies the patch download directory from which the patches are to be applied, represented as path. If you do not specify a patch download directory, the patch download directory designated in the Preference dialog box in the Smart Update graphical interface is used by default. (If none is designated in the Preference dialog box, MW_HOME\utils\bsu\cache_dir is used.)[-verbose]Displays the full set of details associated with each patch applied.[-prod_dir=path]Specifies the target installation to which the patches are to be applied, represented as path. For example, MW_HOME\wlserver_10.3 for WebLogic Server and Portal.

-gui

Starts the Smart Update graphical interface.

None.

-log

Creates a file, in the specified location, in which the corresponding bsu command logging information is to be sent.

Note: The -log parameter logs only bsu command activity, and not activity related to patches or profiles.

=path

Specifies the file name and location of the log file to be created, represented as path.

[-log_priority= {trace|debug|info|warn|error|fatal}]

Specifies the priority of log information to be captured. The default priority is debug.

-remove

Removes specified patches from the profile.

[-patchlist=patch1[,patch2,patch3]

Specifies the identifier of each patch to be applied, represented as patch1[,patch2, and patch3.[-profile=profile_name]Specifies the patch profile from which the patches are to be removed, represented as profile_name. See the note at the end of the table.[-prod_dir=path]Specifies the target installation from which the patches are to be removed, represented as path.[-verbose]Displays the full set of details associated with each patch applied.

-report

Generates a report showing the applied patches and associated file changes in a Middleware home directory.

-BEA_HOME=path

Specifies the target installation where the patches are applied, represented as path. If no path is specified, this option generates report for all product installations. Specify the appropriate Middleware home directory.[-product_mask=regexp]Limits the report to the matching product(s), represented by the regular expression regexp.

Note: The regular expression is used to delimit multiple arguments. For example, -product_mask=WebLogic.* filters all products starting with WebLogic.[-release_mask=regexp]Limits the report to the matching product release(s), represented by the regular expression regexp.[-profile_mask=regexp]Limits the report to the matching patch profile(s), represented by the regular expression regexp.[-patch_id_mask=regexp]Limits the report to the matching patch(es), represented by the regular expression regexp.[-output_format=text|xml]Specifies the format of the report. Options available are text and xml. Default: text.[-output_file=path]Specifies the directory where the report is saved, represented as path. If no path is specified for the report output, stdout is used.

-version

Displays version information.

For example:

Oracle Smart Update. Version: 3.3.3.0

None.

-view

Displays the identifiers of patches that are either applied or in the patch download directory

[-profile=profile_name]

Displays identifiers of patches applied to the profile represented as profile_name. If you do not specify this argument, the default patch profile is used by default.

See the note at the end of the table.[-patch_download_dir=path]Displays the identifiers of patches that have been downloaded into the patch download directory represented as path. If you do not specify a patch download directory, the patch download directory designated in the Preference dialog box is used by default. (If none is designated in the Preference dialog box, MW_HOME\utils\bsu\cache_dir is used.)[-status={applied|downloaded}Displays the current status of the patches viewed. If you specify applied for this argument, bsu displays identifiers of patches that have been applied to the target installation. Use this argument, with -profile, to create a maintenance snapshot for the specific profile. If you specify downloaded, bsu displays identifiers of patches in the download directory but not yet applied

.[-verbose]Displays the full set of details associated with each patch displayed.-prod_dir=path

Displays the identifiers of patches applied to the target installation in the location represented as path.


Note:

If profile is not specified, the Default profile is used.

If the profile argument is used and an invalid profile is specified, it is not set to default; it displays the error:

$ bsu -view -status=applied -prod_dir=C:/10_WLP/wlserver_version-profile=profile3
The specified profile could not be found.[profile_name] 

Command-Line Interface Examples

This section includes the following bsu command examples:

Installation Example

The following command installs the patch IRZ2 from the patch download directory that has been established for the current system:

bsu -prod_dir=c:\Oracle\Middleware\wlserver_10.3 -patchlist=IRZ2 -verbose -install

When executed, the preceding command displays the following output showing that the patch was successfully applied:

Checking for conflicts.
No conflict(s) detected

Starting installation of Patch ID: IRZ2
Installing C:\Oracle\Middleware\download-dir\IRZ2.jar
Result: Success

View Patches Example

The following command displays a list of patches that exist in the patch download directory, c:\patchdir:

bsu -view -status=downloaded -prod_dir=C:\Oracle\Middleware\wlserver_10.3
 -patch_download_dir=C:\patchdir

When executed, the preceding command generates a display similar to the following:

C:\Oracle\Middleware\utils\bsu>bsu -view -status=downloaded
 -prod_dir=C:\Oracle\Middleware\wlserver_10.3 –patch_download_dir=C:\patchdir
ProductName:     WebLogic Platform
ProductVersion:  10.3
Components:      WebLogic Platform/WebLogic Server,WebLogic Platform/Workshop
for WebLogic Platform,WebLogic Platform/WebLogic Portal
BEA_HOME:         C:\Oracle\Middleware
ProductHome:     C:\Oracle\Middleware\wlserver_10.3
PatchSystemDir:  C:\Oracle\Middleware\utils\bsu
PatchDir:    C:\Oracle\Middleware\patch_wls_1032
Profile:         Default
DownloadDir:     C:\patchdir
JavaHome:        C:\Oracle\Middleware\jrockit160_14_R27.6.5-32
JavaVersion:     160_14_R27.6.5-32
JavaVendor:      ORACLE
Patch ID:        9A5T (10131320)
Patch ID:        585H (10201173)
Patch ID:        8LU6 (10106400)
Patch ID:        AFJ5 (10111681)
Patch ID:        Q8K5 (10085296)

Another View Patches Example

The following command displays the set of patches for a target installation that have been downloaded to the system's designated patch download directory:

bsu -view -prod_dir=C:\Oracle\Middleware\wlserver_10.3 -status=downloaded -verbose 

When executed, the preceding command generates a display similar to the following:

ProductName:       WebLogic Platform
ProductVersion:    10.3
Components:        WebLogic Server/Server,WebLogic Server/Server Examples,
AquaLogic Service Bus/Service Bus
BEA_HOME:           C:\Oracle\Middleware
ProductHome:       C:\Oracle\Middleware\wlserver_10.3
DownloadDir:       C:\Oracle\Middleware\download-dir
JavaHome:        C:\Oracle\Middleware\jrockit160_14_R27.6.5-32
JavaVersion:     160_14_R27.6.5-32
JavaVendor:        ORACLE
Patch ID:          FZN2
PatchContainer:    FZN2.jar
Checksum:          -174938558
Component:         WebLogic Server
Severity:          critical
Category:          Security
CR:                CRxxyyzz
Restart:           false
Description:       ATN fix for xxxx
Patch ID:          GWQR
PatchContainer:    GWQR.jar
Checksum:          1170817068
Component:         AquaLogic Service Bus
Severity:          optional
Category:          Multiple
CR:                CRxxyyzz
Restart:           true
Description:       One more ALSB patch

Display Maintenance Snapshot

The following command displays a maintenance snapshot of the default patch profile:

bsu -view -status=applied -prod_dir=c:\BEA\wlserver_10.0

When executed, the preceding command generates a display similar to the following:

C:\Oracle\Middleware\utils\bsu>bsu -view -status=applied
 -prod_dir=C:\Oracle\Middleware\wlserver_10.0
ProductName:       WebLogic Server
ProductVersion:    10.0
Components:        WebLogic Server/Server,WebLogic Server/Server Examples,
WebLogic Server/Server
BEA_HOME:   C:\Oracle\Middleware
ProductHome:       C:\Oracle\Middleware\wlserver_10.0
PatchSystemDir:    C:\Oracle\Middleware\utils\bsu
PatchDir:          C:\Oracle\Middleware\patch_wls1000
Profile:           Default
DownloadDir:       C:\Oracle\Middleware\utils\bsu\cache_dir
JavaHome:          c:\Oracle\Middleware\jdk150_06
JavaVersion:       1.5.0_06
JavaVendor:        Sun
Patch ID:          PBLW (CR838734)

ProductName:       WebLogic Portal
ProductVersion:    10.0
Components:        WebLogic Portal/Portal Server,WebLogic Portal/WebLogic Works
                  WebLogic Portal/Portal Examples
BEA_HOME:   C:\Oracle\Middleware
ProductHome:       C:\Oracle\Middleware\wlserver_10.0
PatchSystemDir:    C:\Oracle\Middleware\utils\bsu
PatchDir:          C:\Oracle\Middleware\patch_wlp1000
Profile:           Default
DownloadDir:       C:\Oracle\Middleware\utils\bsu\cache_dir
Patch ID:          FJTH (CR861234)

C:\Oracle\Middleware\utils\bsu>
C:\Oracle\Middleware\utils\bsu>bsu -view -status=applied -prod_dir=C:\10_WLP_0
320\workshop_10.0
ProductName:       Workshop for WebLogic
ProductVersion:    10.0
Components:        Workshop for WebLogic Platform/Workshop,Workshop for WebLogic Platform/Workshop Examples
BEA_HOME:          C:\Oracle\Middleware
ProductHome:       C:\Oracle\Middleware\workshop_10.0
PatchSystemDir:    C:\Oracle\Middleware\utils\bsu
PatchDir:          C:\Oracle\Middleware\patch_wlw1000
Profile:           Default
DownloadDir:       C:\Oracle\Middleware\utils\bsu\cache_dir
Patch ID:          8K9T (CR873456)

Report of Applied Patches

The following command generates a report of patches applied to an MW_HOME, where the first character of the patch IDs is "6":

bsu -report -patch_id_mask=6.*

When executed, the preceding command generates a display similar to the following:

Patch Report
============
Report Info
Report Option
BEA_HOME ### OPTION NOT SET
product_mask.. ### OPTION NOT SET
release_mask.. ### OPTION NOT SET
profile_mask.. ### OPTION NOT SET
patch_id_mask. 6.*
Report Messages
BEA_HOME D:\Platform92\BEA_HOME
Product Description
Product Name.. WebLogic Platform
Product Version.. 9.2.0.0
Installed Components WebLogic Server, Workshop for WebLogic Platform,
 WebLogic Integration, WebLogic Portal
Product Install Directory. D:\Platform92\BEA_HOME\weblogic92
Java Home.. D:\Platform92\BEA_HOME\jrockit90_150_04
Jave Vendor BEA
Java Version.. 1.5.0_04
Patch Directory.. D:\Platform92\BEA_HOME\patch_weblogic920

Profile. Default

Patch ID 6L1H
CR(s) CR285988
Description Fix P13N processing of Platform Domain Upgrade.
  Intended for use with WLI 9.2
Classpath
Classpath type SYSTEM
Classpath control jar.. weblogic_patch.jar
Jar.. CR285988_920.jar
File.com/BEA/p13n/upgrade/LibraryModuleConfigProcessor.class
File. com/BEA/p13n/upgrade/P13nDatabasePlugIn.class
File. resources/p13n-upgrade.xml
File. resources/P13nCommonPlugIn-definition.xml
File. resources/portal-upgrade.xml
File. META-INF/MANIFEST.MF

Patch ID 6MK8
CR(s) CR262488
Description Allow WLI Domains to be upgraded by Domain Upgrade Wizard
Classpath
Classpath type SYSTEM
Classpath control jar.. weblogic_patch.jar
Jar.. CR262488_920.jar
File.weblogic/upgrade/domain/directoryselection/DomainDirectorySelectionPlugIn.class
File.weblogic/upgrade/domain/directoryselection/i18n_DomainDirectorySelectionPlugIn.properties
File. META-INF/MANIFEST.MF