4 Updating Your Schemas with Patch Set Assistant

The Patch Set Assistant is used in patch set releases only to update the database schemas of Oracle Fusion Middleware components. The schemas that are valid for updating with the Patch Set Assistant must meet one of the following criteria:

Note:

The Patch Set Assistant does not upgrade schemas that are in customer databases, which includes any database that has not been updated using the Upgrade Assistant (UA), Repository Creation Utility (RCU), or Patch Set Assistant (PSA).

The Patch Set Assistant updates 11g Release 2 schema versions starting at 11.1.2.0.0 to version 11.1.2.1.0 See Table 4-1 for specific information.

If you are interested in creating new schemas or dropping existing schemas, you must use the Repository Creation Utility (RCU). Information is provided in Oracle Fusion Middleware Repository Creation Utility User's Guide.

This chapter contains the following topics:

4.1 Which Schemas Need to be Updated with Patch Set Assistant?

The component schemas in Table 4-1 (default names shown) must be updated with the Patch Set Assistant in order to update them to 11g Release 2 (11.1.2.1.0).

Table 4-1 lists only the schemas for products that are available in the latest Oracle Identity and Access Management 11g Release 2 (11.1.2.1.0) patch set.

Table 4-1 Schemas That Require Updating for the Latest Release

Component Name Schema(s) Schema Version Before Upgrade Schema Version After Upgrade Dependencies

Oracle Privileged Account Manager (OPAM)

prefix_OPAM

11.1.2.0.0

11.1.2.1.0

The prefix_OPSS schema must be updated first.

Oracle Identity Manager (OIM)

prefix_OIM

11.1.2.0.0

11.1.2.1.0

 

Oracle Access Manager (OAM)

prefix_OAM

11.1.2.0.0

11.1.2.1.0

 

4.2 Before You Begin Using the Patch Set Assistant

This section contains information about things you should check before you run the Patch Set Assistant:

4.2.1 Back Up Your Database and Database Schemas

Make sure you have backed up your existing database and database schemas before you run the Patch Set Assistant, as instructed in Section 3.2.7, "Backing Up Your Database and Database Schemas".

4.2.2 Check Your Database and Schemas

Before running Patch Set Assistant, you should check to make sure that your database is up and running and that the schemas you want to upgrade are at versions that are supported for upgrade. To check this, perform the following SQL command:

SELECT OWNER, VERSION, STATUS, UPGRADED FROM SCHEMA_VERSION_REGISTRY;

If the number in the "VERSION" column is 11.1.1.2.0 or greater, then the schema is supported for upgrade.

If you are using an Oracle database, you should recompile database objects before running the Patch Set Assistant to check for invalid objects before the upgrade. Connect to the database as SYS and run the following from SQL*Plus:

/rdbms/admin/utlrp.sql

After running utlrp.sql, and before you upgrade your schema, issue the following query to ensure there are no longer any invalid database objects:

SELECT owner, object_name FROM all_objects WHERE status='INVALID';

Take note of any invalid objects. The existence of invalid database objects may prevent the upgrade from completing successfully.

4.2.3 Shut Down All Components Using the Schemas You Want to Update

Before running Patch Set Assistant, shut down all Oracle Fusion Middleware components (including the Managed Server and Oracle instances) that may be using the schemas you want to update.

4.3 Running the Patch Set Assistant

The following sections describe how to run the Patch Set Assistant when you are installing the Oracle Fusion Middleware 11g Release 2 (11.1.2.1.0) patch set:

4.3.1 General Information about the Patch Set Assistant

The Patch Set Assistant is installed into the bin directory in the Oracle Common home by the Product or Patch Set Installer (see Section 3.3.1, "About the Installer Used for Patching").

You can use the Patch Set Assistant to patch any component schema in the Middleware home from where the Patch Set Assistant started.

4.3.2 Starting the Patch Set Assistant

To start Patch Set Assistant, go to the bin directory in the Oracle Common home, then run the following command:

On UNIX operating systems:

cd MW_HOME/oracle_common/bin
./psa

On Windows operating systems:

CD MW_HOME\oracle_common\bin
psa.bat

4.3.3 Using the Patch Set Assistant Graphical Interface

Follow the instructions in Table 4-2 to use the Patch Set Assistant to update your schemas.

If you need additional help with any of the screens, click Help on the screen to access the online help.

Table 4-2 Patch Set Assistant Screens

Screen Description

Welcome

This page introduces you to the Patch Set Assistant.

Select Component

Select the single top-level component you want to upgrade. You may only upgrade one component at a time.

Prerequisites

Verify that you have satisfied the database prerequisites.

Schema

Specify your database credentials to connect to your database, then select the schema you want to update.

Note that this screen appears once for each schema that must be updated as a result of the component you selected on the Select Component screen.

Examine

This page displays the status of the Patch Set Assistant as it examines each component schema. Verify that your schemas have a "succeeded" or "already upgraded" indicator in the Status column.

Upgrade Summary

Verify that the schemas listed to be upgraded are the ones you expect.

Upgrade Progress

This screen shows the progress of the schema update.

Upgrade Success

 

4.3.4 Using the Patch Set Installer from the Command Line

The full command line syntax for the Patch Set Assistant is shown below:

./psa (or psa.bat)
   -response response_file
   [-logLevel log_level
   [-help]]

See Table 4-3 for descriptions for these parameters.

Table 4-3 Patch Set Assistant Command Line Parameters

Parameter Required or Optional Parameter? Description

-response

Required.

Full path and name of the input response file.

-logLevel

Optional.

Logging level. One of the following:

  • TRACE

  • NOTIFICATION

  • WARNING

  • ERROR

  • INCIDENT_ERROR

The default logging level is NOTIFICATION.

-help

Optional.

View all of the command line options.


To generate the response file used with the -response parameter, you should run the Patch Set Assistant GUI (Section 4.3.3, "Using the Patch Set Assistant Graphical Interface"). On the Upgrade Summary screen, click Save Response File to save your information to a response file.

Note:

When Patch Set Assistant is run in -response file mode, it will not upgrade any schemas that return "already upgraded" during the Examine phase. These schemas will skip the upgrade phase entirely. This applies only when Patch Set Assistant is run in -response file mode.

4.3.5 Verifying the Schema Version Number After Update

You can use the SQL command below to verify that the schema version in schema_version_registry has been properly updated:

SQL> select owner,version,upgraded,status from schema_version_registry where owner='DEV_OPAM';

OWNER VERSION U STATUS
--------------------------------------------------
DEV_OPAM 11.1.2.1.0 Y VALID

Check that the number in the "VERSION" column matches the latest version number for that schema. See Table 4-1 to verify that the updated version number is correct for your schema.

If the status appears as "INVALID" then the schema update failed. You should examine the logs files to determine the reason for the failure. For more information, see Section 4.4, "Patch Set Assistant Log Files".

4.3.6 Checking for Invalid Database Objects

If you are using an Oracle database, you should recompile database objects after running the Patch Set Assistant by connecting to the database as SYS and running the following from SQL*Plus:

cd $DB_HOME
SQL> @rdbms/admin/utlrp.sql

This will compile the database objects that were updated by Patch Set Assistant.

Then issue the following query to ensure there are no longer any invalid database objects:

SELECT owner, object_name FROM all_objects WHERE status='INVALID';

None of the database objects for the updated schema should be invalid at this point. If there are any, run the utlrp.sql command again and check again. If the problem persists, you should file a service request.

4.4 Patch Set Assistant Log Files

The Patch Set Assistant writes log files to the following locations:

On UNIX operating systems:

MW_HOME/oracle_common/upgrade/logs/psatimestamp.log

On Windows operating systems:

MW_HOME\oracle_common\upgrade\logs\psatimestamp.log

Some components will create a second log file called psatimestamp.out, also in the same location.

The timestamp will reflect the actual date and time that Patch Set Assistant was run.

Should any failures occur when running Patch Set Assistant, these log files will be needed to help diagnose and correct the problem; do not delete them. You can alter the contents of your log files by specifying a different -logLevel from the command line.

Some of the operations performed by the Patch Set Assistant may take longer to complete than others. If you want to see the progress of these long operations, you can see this information in the log file, or you can use the following query:

SELECT VERSION, STATUS, UPGRADED FROM SCHEMA_VERSION_REGISTRY WHERE OWNER='schema_name';

In the query results, the STATUS field will be either "UPGRADING" or "UPGRADED" during the schema patching operation, and will become "VALID" when the operating is finished.