Oracle Applications Release 10.7 Interoperability Patch for Oracle8i Server Release 8.1.6

March 2000

These release notes describe how to set up Oracle Applications Release 10.7 to run with Oracle8i Server Release 8.1.6. These notes include instructions for applying the interoperability patch and contain the following sections:

Section 1: Server Partitioning


Oracle Applications Release 10.7 supports Oracle8i Server Release 8.1.6 through server partitioning. In this model, the Oracle Applications file system is linked with an Oracle7 Server Release 7.3.4 (or higher) ORACLE_HOME. The Oracle Applications database uses Oracle8i Server Release 8.1.6 located in a separate ORACLE_HOME, which is not necessarily on the same machine or node as Oracle Applications. Objects and data are stored in this database.

SQL*Net Version 2 handles communication between the Oracle Applications file system on the Oracle7 Server and the Oracle8i Server Release 8.1.6 Oracle Applications database.

The following diagram illustrates the layers in a server partitioning model on two separate machines. However, the server partitioning model works just as well if both the Oracle7 Server Release 7.3.4 (or higher) ORACLE_HOME and the Oracle8i Server Release 8.1.6 ORACLE_HOME are on the same machine or node. In this case, however, the two ORACLE_HOME directories must be separate physical directories.
 
SQL*NET V2 Client
Oracle Applications
Oracle Reports
Oracle 7 Server Release 7.3.4
  (or higher) ORACLE_HOME
 ---------> 
 ---------> 
 SQL*NET V2--> 
 --Connect-> 
 ---------> 
Net8 listener
Oracle8i Server 8.1.6 ORACLE_HOME
Oracle Applications Database

Server partitioning provides all the functional and performance advantages of running Oracle Applications with Oracle8i Server Release 8.1.6 without having to link Oracle Applications executables. Using SQL*Net Version 2 to connect the Oracle7 Server 7.3.4 (or higher) ORACLE_HOME and the Oracle8i Server Release 8.1.6 ORACLE_HOME results in little or no degradation of performance.

If you are currently using Oracle Applications Release 10.7 with an Oracle7 Server Release 7.3.4 (or higher) database on separate nodes or machines, and are, therefore, already using SQL*Net Version 2, then upgrading to an Oracle8i Server Release 8.1.6 database (as described in these notes) should improve performance.
 
Attention: These notes assume that the Oracle8i ORACLE_HOME resides on the same machine or node as the Oracle7 ORACLE_HOME and Oracle Applications. If your Oracle8i ORACLE_HOME resides on a separate machine or node, you will need to log in to that machine before you perform steps that affect your Oracle8i ORACLE_HOME.


Section 2: Upgrading to Oracle8i Server Release 8.1.6



This section provides instructions for upgrading an Oracle7 Server or Oracle8 Server database directly to Oracle8i Server Release 8.1.6. The Oracle Applications Concurrent Managers must be shut down and all the users must have logged out before starting the upgrade. The Oracle Applications environment will be unavailable to the users during the upgrade process.

Preparing for your Oracle Applications Database Upgrade

Step 1: Verify your Oracle Applications version.

At a minimum, you must be running Oracle Applications Release 10.7 linked with Oracle7 Server Release 7.3.4 (or higher). If you are running Oracle7 Server Release 7.3.2.3 or Release 7.3.3, you must apply the interoperability patch for 7.3.4 (or higher) and upgrade to Oracle7 Server 7.3.4 (or higher) before you begin your upgrade to Oracle8i.

Step 2: Unload Oracle Applications patches.

Before you unload the patches, you must be logged in to the Oracle Applications login account (typically applmgr).

Oracle Applications patches 499648, 480129, 487890 and 1054707 are located in the /R1070/IOP816/<your platform> subdirectory on the CD. Patch 499648 includes the adprepdb.sql script, which prepares your existing database for Oracle8i Server Release 8.1.6.

Create an empty patch directory on your server and copy the patches for your platform to this directory from the /R1070/IOP816/<your platform> subdirectory on the CD.  Your patch directory will be called <patchdir> in these notes.

Setting Up the Oracle8i Environment

We recommend that you use a login account (such as oracle) other than the Applications login account (typically applmgr) to manage the Oracle8i Server files and database. Log in to that account and perform the following steps to set up your Oracle8i Server environment. Make sure that none of the environment settings, such as ORACLE_HOME, PATH, ORA_NLS, LD_LIBRARY_PATH, and so on, refers to Oracle7 environment. They must refer to the new Oracle8i environment.

Step 3: Install Oracle8i Server.

If you have not previously done so, follow the directions in the Oracle8i Installation Guide for <your platform> to install the Oracle8i Server and Oracle tools. Log in to the system as the oracle user. Set up all your environment settings to refer to the new Oracle8i environment. Install Oracle8i Server Release 8.1.6 in a new directory. This directory will be the ORACLE_HOME for the Oracle Applications database.

Step 4: Modify init<SID>.ora for Oracle8 Server Release 8.1.6.

If you are using Oracle8 Server Release 8.1.6, you must add the following event to the init<SID>.ora file for your database:
    event = "10932 trace name context level 2"
Also, you must remove the following obsolete parameters in the init<SID>.ora file for your database:
    SEQUENCE_CACHE_ENTRIES

    SEQUENCE_CACHE_HASH_BUCKETS

    USE_ISM

    DISTRIBUTED_LOCK_TIMEOUT

Step 5: Migrate your database to Oracle8i Server Release 8.1.6.

If your Oracle Applications database is currently using Oracle8 Server Release 8.0 and you wish to use Oracle8i Server Release 8.1.6, you must upgrade the database to Oracle8i Server Release 8.1.6.

If your Oracle Applications database is currently using Oracle7 Server Release 7.3, you must migrate the database from Oracle7 to Oracle8i. The migration utility requires enough space in the SYSTEM tablespace to hold both the Oracle8i data dictionary and the Oracle7 data dictionary simultaneously. The Oracle8i data dictionary typically is 50 percent larger than the Oracle7 data dictionary, so you must ensure that there is sufficient space to allow 150 percent growth in the SYSTEM tablespace. If there is insufficient space before the migration starts, the utility will fail. The migration utility also requires extra space in the TEMP tablespace.
 
Additional Information: Oracle8i Server Migration Guide

Step 6: Copy database preparation scripts.

Create the ORACLE_HOME/apps/admin directory in the Oracle8i Server ORACLE_HOME and copy the following database preparation scripts to this new directory:
    APPL_TOP/install/ad*.pls .



    <patchdir>/499648/install/adprepdb.sql .



    <patchdir>/499648/install/ad*.pls .
Warning: Any of these files that you patch in the future must be copied to the ORACLE_HOME/apps/admin directory and executed from this directory. 

Step 7: Run adprepdb.sql.

You must run the adprepdb.sql script from SQL*Plus now. This preparation script runs Oracle Server and Oracle Applications database scripts needed for working with Oracle8i Server Release 8.1.6.
 
Note:  For this step only, set your ORACLE_HOME environment settings to refer to your Oracle8i Server Release 8.1.6 environment. Make sure that the PATH environment setting refers to the Oracle8i ORACLE_HOME/bin directory for locating Oracle executables. Don't forget to reset these environment settings to their original values after you complete this step. 

This script prompts for the passwords for the Oracle Server SYS and SYSTEM schemas. It displays messages about the tasks it performs and returns to the operating system prompt when it finishes. On most systems, it takes between 30 minutes and one hour to run.

Your Oracle8i environment is now ready for server partitioning.

Completing the Oracle Applications File System Upgrade

Follow the steps in this section to complete your upgrade to Oracle Applications Release 10.7. Since the Oracle Applications binary executables will be linked with an Oracle7 Server, your environment (with the exception of TWO_TASK) must refer to the Oracle7 environment and not to the Oracle8i environment.

Make sure that the TWO_TASK setting points to the connect string of the Oracle8i database and that the SQL*Net connection between the Oracle7 Server and Oracle8i Server releases is set up properly. Also ensure that the ORACLE_SID environment setting is not set.

The Oracle7 Server linked to the Oracle Applications Server should be currently using Server Release 7.3.4 and must have the Oracle Developer 1.6.1 (Reports) and the Forms 2.4 installed in it.
 
Additional Information: Oracle Applications Interoperability Patch for Developer Release 1.6.1 Installation Notes (available at Oracle MetaLink).

Step 8: Log in to the Oracle Applications login account (typically applmgr).

Ensure that all the environment settings, such as ORACLE_HOME, PATH, ORA_NLS, LD_LIBRARY_PATH, and so on refer to the Oracle7 environment. TWO_TASK must refer to your Oracle8i database.

Step 9: Apply Oracle Applications Release 10.7 SmartClient/NCA Server patches.

If you are currently using Oracle8 Server for Oracle Applications Release 10.7, you can omit this step.

You must now apply either the Oracle Applications Release 10.7 SmartClient Production 16.1 or the Release 10.7 NCA Applications Database Server Updates. Applying these Updates is mandatory in order for Oracle Applications Release 10.7 to work with Oracle8i Server Release 8.1.6, even if you plan to use Release 10.7 in character mode only. It does not matter which of the Server Updates you apply, but do not apply both these patches as they are identical.

These product updates are available separately from your Oracle Support Representative.
 
Additional Information: The chapter titled "Applying the Updates" or "Applying the Applications Database Server Updates" in either the Release 10 SmartClient Production 16.1 installation manual  or the Release 10.7 NCA installation manual.

The appropriate chapter of one of these installation manuals contains a section called "Step 4: Apply the Release 10.7 driver files." This step instructs you to apply a series of AutoPatch driver files. While applying the db161sc.drv file, you may encounter some invalid PL/SQL packages, which are incompatible with Oracle8i Server Release 8.1.6.

These packages are listed in the Modifying PL/SQL packages for Oracle8i Server Release 8.1.6 section of these release notes. If you encounter the issues discussed in this section, follow the recommended modification and continue with your upgrade.

Step 10: Apply Oracle Applications patch 499648 for Oracle8i.

If you were previously using Oracle8 Server Release 8.0 for Oracle Applications Release 10.7, you  have already applied this patch and you should skip this step.

Log in to the system as applmgr. Make sure that all the required environment settings refer to Oracle7. Then apply patch 499648 to run Oracle Applications against an Oracle8i Server Release 8.1.6 database in the server partitioning model.

You must apply patch 499648 using AutoPatch (adpatch). Apply only the file portion of this patch (patch.drv), which is located in the <patchdir> you created in Step 3. Do not apply any of the database driver (*.drv) files that are available in the <patchdir>.

Step 11: Apply Oracle Applications patch 480129.

If you were previously using Oracle8 Server Release 8.0 for Oracle Applications Release 10.7, you should have already applied this patch, and you may omit this step.

Apply patch 480129 (located in the <patchdir>/480129 directory) using adpatch. Do not follow the special instructions, if any, in the readme.txt file in this directory.

Step 12: Apply Oracle Applications patch 1054707.

Apply patch 1054707 (located in the <patchdir>/1054707 directory) using adpatch. This patch fixes an incompatibility issue with Oracle Assets package body.

Step 13: Apply Oracle Applications patch 487890.

If you were previously using Oracle8 Server Release 8.0 for Oracle Applications Release 10.7, you have already applied this patch and you should skip this step.

Apply patch 487890 (located in the <patchdir>/487890 directory) using adpatch. Do not follow the special instructions, if any, in the readme.txt file in this directory.

This patch creates a new script called ADXGNPNS.sql, which you run in order to pin sequences. ADXGNPNS.sql is similar in function to ADXGNPIN.sql. If you run ADXGNPIN.sql, then you should also run ADXGNPNS.sql. See the comments in the script for more information.
 

Step 14: Modify PL/SQL packages for Oracle8i Server Release 8.1.6.

If you wish to upgrade your installation to a higher server-side patch set level of Oracle Applications Release 10.7 NCA/Production 16.1 at any point, or if you plan to apply additional server patches, you may find that some of the PL/SQL packages in Oracle8i Server Release 8.1.6 are incompatible. These packages are documented in the Modifying PL/SQL packages for Oracle8i Server Release 8.1.6 section of this document.

Instructions for maintaining the compatibility of PL/SQL packages in Oracle8i Server Release 8.1.6 are also listed in the Modifying PL/SQL Packages for Oracle8i Server Release 8.1.6 section of these release notes. If you apply any patch that updates these files, you may need to follow the instructions in that section to restore compatibility. The files are fixed in Oracle Applications Release 10.7 Patch Set 4.

Step 15: Compile invalid objects.

Run AD Administration (adadmin) and choose Maintain APPS Account(s) from the Maintain Applications Database Objects menu. When all objects are compiled, choose Return to the Main Menu, and then choose Exit.

If you encounter invalid objects in this step, see the Modifying PL/SQL Packages for Oracle8i Server Release 8.1.6 section of these release notes.


Section 3: Modifying PL/SQL Packages for Oracle8i Server Release 8.1.6


In Oracle8i Server Release 8.1.6, certain PL/SQL packages require modification for compatibility. The packages and package bodies with incompatible constructs fall into three categories.

Category 1

The following table lists the first set of packages and package bodies with incompatible constructs:
 
Package Body File name
HR_EXU_BUS  PAY_TOP/patchsc/107/sql/hrexuapi.pkb 
PAY_TOP/admin/sql/hrexuapi.pkb
PO_LINES_SV  PO_TOP/patchsc/107/sql/POXPOLIB.pls 
PO_TOP/admin/sql/POXPOLIB.pls
PO_SHIPMENTS_SV9  PO_TOP/patchsc/107/sql/POXPOSHB.pls 
PO_TOP/admin/sql/POXPOSHB.pls
WSH_SC_INTERFACE  OE_TOP/patchsc/107/sql/WSHSCOIB.pls 
OE_TOP/admin/sql/WSHSCOIB.pls

For these package bodies, you may get the following error messages during package compilation:

    PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the

    following: ( The symbol "(" was substituted for "VARCHAR2" to continue.
    PLS-00103: Encountered the symbol "DATE" when expecting one of the 

    following: ( The symbol "(" was substituted for "DATE" to continue.
    PLS-00103: Encountered the symbol "NUMBER" when expecting

    one of the following: ( The symbol "(" was substituted for "NUMBER" to continue.
These messages may occur if any procedure or function in a PL/SQL package body is called using a construct such as:
    hr_exu_bus.Check_Unique (p_rec.calendar_id  in number,

    p_rec.calendar_usage_id in number,

    p_rec.exception_id in number);
The error messages indicate that the type definition is not supported in the calling function. You must modify these segments as follows:
    hr_exu_bus.Check_Unique (p_rec.calendar_id,

    p_rec.calendar_usage_id,

    p_rec.exception_id);

Category 2

The following table lists an additional package with incompatible constructs:
 
Package  File name 
ARP_TAX  AR_TOP/patchsc/107/sql/arplstxm.sql 
AR_TOP/admin/sql/arplstxm.sql

For this package, you may get the following error messages during compilation:

    PLS-00566: type name "TAX_AMT_REC_TYPE" cannot be constrained.
This error message may occur due to the existence of the following section of code, which is no longer compatible in the Oracle8i PL/SQL.
    --- For each tax code, or rate, a total tax amount is accumulated.

    ---

    --- This is required for summary by tax rate in the sales order

    --- acknowledgment report.

    ---

    TYPE tax_amt_rec_type IS RECORD

    (

    tax_code          AR_VAT_TAX.TAX_CODE%TYPE

    tax_rate          AR_VAT_TAX.TAX_RATE%TYPE

    amount            NUMBER

    );

    ---
and
    tax_code_amt   tax_amt_rec_type(100), /* Store tax amount per tax code */

    tax_rate_amt   tax_amt_rec_type(100), /* Store tax amount per tax rate */
If you see this section of code in the SQL file, it is safe to remove it from the file and reinstall the object into the database. Refer to the Maintaining Compatibility section in this document for instructions on compiling arplstxm.sql.
 
 
Note: If you have not previously applied AR patchset P (included in Patchset 4), remove these lines from AR_TOP/admin/sql/arplstxm.sql.

Category 3

The following table lists packages with incompatible "FOR UPDATE" constructs:
 
Package  File name  Fixed Version 
AP_INV_SELECTION_CRITERIA_PKG  AP_TOP/patchsc/107/sql/apiinscb.pls 
AP_TOP/admin/sql/apiinscb.pls
80.20 
ARP_AA_HISTORY_PKG  AR_TOP/patchsc/107/sql/ARCIAAHB.pls 
AR_TOP/admin/sql/ARCIAAHB.pls
70.8 
ARP_CR_ICR_LINES_PKG  AR_TOP/patchsc/107/sql/ARRIICLB.pls 
AR_TOP/admin/sql/ARRIICLB.pls
70.7 
ARP_MISC_CASH_DIST_PKG  AR_TOP/patchsc/107/sql/ARRIMCDB.pls 
AR_TOP/admin/sql/ARRIMCDB.pls
70.7 

If you have the same or higher version of any of the packages listed above, then these packages will be valid in your database. Otherwise, please follow the instructions listed below.

AP_INV_SELECTION_CRITERIA_PKG
The first SELECT statement of the Procedure CB_Lock_Row has the construct "FOR UPDATE NOWAIT" at the end of the statement. This construct is no longer compatible.

This package will be invalid due to the following statement:

    SELECT sum(decode(c.status_lookup_code, 'NEGOTIABLE',

                      c.amount, 0)) batch_total,

           sum(decode(c.status_lookup_code, 'VOIDED', 1,

                        'STOP INITIATED', 1,

                        'RECONCILED', 1, 0))

    INTO   batch_total, num_non_negotiable

    FROM   ap_checks c

    WHERE  c.checkrun_id = X_CHECKRUN_ID

    FOR UPDATE NOWAIT;
Remove the last line of the SELECT statement containing these three words as shown here:
    SELECT sum(decode(c.status_lookup_code, 'NEGOTIABLE',

                      c.amount, 0)) batch_total,

           sum(decode(c.status_lookup_code, 'VOIDED', 1,

                        'STOP INITIATED', 1,

                        'RECONCILED', 1, 0))

    INTO   batch_total, num_non_negotiable

    FROM   ap_checks c

    WHERE  c.checkrun_id = X_CHECKRUN_ID ;
ARP_AA_HISTORY_PKG
The first SELECT statement of the Procedure lock_p has the construct "FOR UPDATE OF STATUS WAIT" at the end of the statement. This construct is no longer compatible. The last line of the SELECT statement containing this construct must be modified to "FOR UPDATE OF action_name NOWAIT".
ARP_CR_ICR_LINES_PKG
The first SELECT statement of the Procedure lock_p and lock_fetch_p has the construct "FOR UPDATE OF STATUS" at the end of the statement. The first SELECT statement of the Procedures nowaitlock_p and nowaitlock_fetch_p has the construct "FOR UPDATE OF STATUS NOWAIT" at the end of the statement. This construct is no longer compatible. In all these cases, you must replace the word "STATUS" with "payment_amount".
ARP_MISC_CASH_DIST_PKG
The first SELECT statement of the Procedure lock_p and nowaitlock_fetch_p has the construct "FOR UPDATE OF STATUS NOWAIT" at the end of the statement. This construct is no longer compatible. In all these cases, you must replace the word "STATUS" with "amount".

These package is invalid due to a statement like:

    SELECT  ...

    INTO    ...

    FROM    ...

    WHERE   ...

    FOR UPDATE OF STATUS NOWAIT;
This statement should be changed to:
    SELECT ...

    INTO   ...

    FROM   ...

    WHERE  ...

    FOR UPDATE OF variable_name NOWAIT;

Maintaining Compatibility

Your database objects were installed from either the patchsc/107/sql directory or the admin/sql directory. These files may exist in both subdirectories, in which case you should modify the files in the patchsc/107/sql directory.

Modify the lines causing the errors by removing the type definitions in the calling functions in the PL/SQL source file and updating the database objects. To identify the incompatible sections, you can try compiling the package in your database without modifications first. Connect to a SQL session as the apps user and use the following SQL command:

     SQL> alter package <package name> compile body;
This message will be displayed if the package body fails to compile:
    Warning: Package Body altered with compilation errors.
You may use the following two SQL queries to identify the code fragments in the PL/SQL package body that is causing the compilation errors. The first query shows you the details of the compilation errors:
    SELECT line, text from user_errors

    WHERE  name = upper ('<package name>')

           AND type = upper ('<package body>');
For example:
    SELECT line, text from user_errors

    WHERE  name = upper ('PO_Lines_SV')

           AND type = upper ('package body');
This query would show the offending line number and the compilation error causing the failure. The line numbers correspond to the source in the database, which may differ from the ones in the PL/SQL source file. The following query allows you to retrieve the source from the database:
   SELECT text from user_source

   WHERE  name = upper ('<package name>')

          AND type = upper ('<package body>');
For example:
   SELECT text from user_source

   WHERE  name = upper ('PO_Lines_SV')

          AND type = upper ('package body');