New Release 12.2.11 Upgrade Guide Available!

Check out my most recent book: Oracle E-Business Suite: the little r12.2.11 upgrade essentials for managers and team members. It’s available on Amazon at https://www.amazon.com/s?k=978-1387919871

Here’s a description:

This is the latest edition of Mike Swing’s book on upgrading to Oracle E-Business Suite R12.2.11. The book covers the nuances and lessons learned from many upgrades performed since Release 12 was first released.

Putting together the right team to tackle the Oracle E-Business Suite R12.2.11 upgrade, and understanding the issues that the team needs to consider to be successful, can be quite a challenge. “the little r12.2.11 upgrade essentials for managers and team members” describes the big picture of what you need to consider before tackling the Release 12.2.11 upgrade. Based on TruTek’s popular R11i to R12 Technical Upgrade training classes, this book describes what managers, functional, and technical team members need to know to prepare to upgrade from Release 11i to Release 12.2.11 of Oracle’s E-Business Suite of Applications. Enhanced topics with this edition include: Online Patching, the ADOP Patching Cycle, Materialized Views, Customizations, Development Standards for Edition Based Redefinition, How Cross-Edition Triggers Work, and Understanding the Release 12.2 Architecture.

12.2.11 RUP Patch 31856789

1.       The EBS Release 12.2.11 RUP (Patch 31856789) was released on November 9 2021, in MOS Doc. ID: 2758997.1, Oracle E-Business Suite Release 12.2.11 Readme New Features in R12.AD.C.Delta.7 and R12.TXK.C.Delta.7. It includes suite-wide and family-level granularity (unlike Release 12.2.3 and Release 12.2.2). You should apply the Release 12.2.11 RUP using Downtime Mode: 

$ adop phase=apply patches=31856789  apply_mode=downtime

$ . <INSTALL_BASE>/EBSapps.env run
$ adop phase=cleanup

$ adop phase=fs_clone

  • Apply the Oracle E-Business Suite Online Help for 12.2.11 Release Update Pack using adop Hotpatch Mode on the Run File System. Oracle strongly recommends installing this patch.

$ adop phase=apply patches=31856799 hotpatch=yes

  • Grant Flexfield Value Set Access to specific users (required). Release12.2 includes a new security feature, Flexfield Value Set Security. It controls who can create or modify flexfield values in the Flexfield Values Setup window (FNDFFMSV). These are mandatory setup steps before any users can create or update values in the Values window.

However, if you choose not to implement Flexfield Value Set Security upon upgrading to or installing Release 12.2, you have two options to give users access to all Value Sets for backwards compatibility:

  1. Assign the seeded unlimited-access role (“Flexfield and Report Values: All privileges”) directly to users, responsibilities, or roles. With this option, users who have function security access to the Segment Values form and have this role either directly or indirectly can see, insert, and update values for any value set.
  2. Create an “all-value-sets, all-privileges, all-users”. With this option, any users who have function security access to the Segment Values form can view, insert, and update values for any value set.
  • Register new/custom products (conditional).

After completing the steps to update all database tier nodes with the latest code level, perform the post-update steps for HR Legislative only if you have licensed that module. Refer to the Human Resources tasks step from MOS Doc. ID: 2230783.1, Oracle E-Business Suite Release 12.2.7 Readme. Follow MOS Doc. ID: 2393232.1, Applying the R12.HR_PF.C.Delta.12 Release Update Pack.

  • If you are an E-Business Suite Information Discovery customer, see MOS Doc. ID: 2214431.1, Installing Oracle E-Business Suite Information Discovery, Release 12.2 V8.
  • If you support languages other than American English, perform NLS-related Step (conditional) from MOS Doc. ID: 2495027.1, Oracle E-Business Suite Release 12.2.11 Readme.
  • Run Patch Wizard for current recommended and high priority product patches. See MOS Doc. ID: 1400757.1, How to Find E-Business Suite Recommended Patches.

Patch Wizard is a tool included with Oracle Application Manager. Patch Wizard reviews recommended and high priority patches against those that have been applied on your system. Patches can be downloaded and merged using the tool. You can review patch impact to determine how a specific patch or several patches will affect your system. Review MOS Doc. ID: 976188.1, Patch Wizard Utility.

If your environment does not allow the Patch Wizard utility, review MOS Doc. ID: 1400757.1, How to Find Oracle E-Business Suite Recommended Patches.

  • Perform the following three checks to verify the directory service assignments:
  • Log in to Oracle E-Business Suite as the SYSADMIN user and check whether the Application Diagnostics responsibility appears for this user in the navigator. If not, then run the Workflow Directory Services User/Role Validation Concurrent Program with the parameters listed below.
  • Run the following SQL query:
  • SQL> SELECT ASSIGNING_ROLE, LAST_UPDATE_DATE, USER_ORIG_SYSTEM, USER_ORIG_SYSTEM_ID, ROLE_ORIG_SYSTEM, ROLE_ORIG_SYSTEM_ID FROM WF_USER_ROLE_ASSIGNMENTS WHERE USER_NAME = ‘SYSADMIN’ AND ROLE_NAME = ‘FND_RESP|FND|APPLICATION_DIAGNOSTICS|STANDARD’;
  • If the originating system or originating system ID is null for either the user or the role in any of the records returned by this query, then run the Workflow Directory Services User/Role Validation Concurrent Program with the parameters listed below.
  • Run the following SQL query to obtain the originating system ID of the Application Diagnostics responsibility in your Oracle E-Business Suite instance:

SQL> SELECT ORIG_SYSTEM_ID FROM WF_LOCAL_ROLES WHERE NAME = ‘FND_RESP|FND|APPLICATION_DIAGNOSTICS|STANDARD’;

Next, run the following SQL query, replacing <RESP_ID> with the originating system ID returned by the previous query:

SQL> SELECT * FROM FND_USER_RESP_GROUPS WHERE RESPONSIBILITY_ID = <RESP_ID> AND USER_ID = 0;

If this query does not return any rows, then run the Workflow Directory Services User/Role Validation concurrent program with the parameters listed below.

To update the assignment records for the SYSADMIN user, run the Workflow Directory Services User/Role Validation concurrent program with the following parameters:

  • Batch size: 10000 (the default value)
  • User name: SYSADMIN
  • Role name:  FND_RESP|FND|APPLICATION_DIAGNOSTICS|STANDARD
  • Fix dangling users: No
  • Add missing user/role assignments: Yes
  • Update WHO columns in WF tables: Yes
  • Number of Parallel Processes: Optionally specify the number of parallel processes you want to use when running the program.

Apply the Latest AD/TXK RUP11 Patches

See MOS Doc. ID: 1583092.1, E-Business Suite RUP, AD and TXK RUP Information and MOS Doc. ID: 1617461.1, Applying the Latest AD and TXK Release Update Packs to Oracle E-Business Suite Release 12.2.

This AD-TXK codelevel has a dependency on Oracle Fusion Middleware:

  • For FMW 11.1.1.6, see Patch 20642039
  • For FMW 11.1.1.7, see Patch 20756887

However, if you are using startCD51, the version of FMW should be 11.1.1.9, and there should be no need to apply these patches. See MOS Doc. ID: 2073977.1, How To Find The Version Of Oracle Fusion Middleware Used By E-Business Suite Release 12.2.

  • Ensure all the required ETCC database objects will be found by the Delta 10 RUP installation process. This means that you must still run the latest version of ETCC on your database, even if you already have all the required database patches installed.
  • Use the checkMTpatch.sh script supplied in Patch 17537119 to check your Fusion Middleware version and identify the patches required by ETCC. For the database use checkDBpatch.sh.
  • You should check to see if there is a new version of the ETCC patch about every 30 days. The xml file that contains the list of recent patches is released about every 30 days. The ETCC scripts check to see if the xml file is older than 30 days, if so, they terminate. In the upgrade environment, you can query the contents of the TXK_TCC_RESULTS table to make sure the dates are current.

[WARNING] DB-ETCC: Bugfix XML file (./db/onprem/txk_R1220_DB_base_bugs.xml) is more than 30 days old.  Check if a newer version is available in Patch 17537119.

In our case, on February 5th, the base_bugs.xml is more than 30 days old:

grep Header <ETCC_LOC>/db/onprem/txk_R1220_DB_base_bugs.xml

grep Header <ETCC_LOC>/db/onprem/txk_R1220_DB_mappings.xml

30465 Nov  1 09:47 txk_R1220_DB_base_bugs.xml, but the patch says it was updated 29 days ago:

  • There may be an error depending on the case of your servers listed in the TXK_TCC_RESULTS table. Check the case of the servers in the TXK_TCC_RESULTS table to make sure they are valid if you get an error on the TXK_TCC_RESULTS table.

select count(table_name) from all_tables where table_name=’TXK_TCC_RESULTS’;

select DATABASE_NAME, COMPONENT_NAME, CHECK_DATE, CHECK_RESULT, CHECK_MESSAGE from TXK_TCC_RESULTS;

  • Applying the latest AD/TXK Delta patches is highly recommended. AD/TXK Delta 11 was released in June 2019.  One of the major changes in AD-TXK Delta 10 was the addition of a new context variable s_srvctl_thread_count. You can now tune the thread count with this new context variable, s_srvctl_thread_count to optimize startup and shutdown.

AD/TXK Delta 9 was released in March 2017. AD/TXK Delta 9 introduced full support for the Oracle Grid Listener used by ASM. The Grid Listener requires all registered service names to be unique. In AD/TXK Delta 8 and earlier, the service name for connections to the Patch Edition of the database was ebs_patch. In AD/TXK Delta.9, the service name to connect to the Patch Edition has been changed to <instance_name>_ebs_patch.

Apply the latest application tier technology patches to the run file system. Refer to MOS Doc.ID: 1355068.1, Oracle E-Business Suite 12.2 Patching Technology Components Guide for instructions on how to do this.

  1. Start only the WebLogic Admin Server on the application tier.

$ sh $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh start

  • Download and unzip the AD/TXK Delta 13 patches and run adgrants:

Execute adgrants.sql (currently version 89, by following the instructions in the readme of Patch 32394134, R12.AD.C.Delta.13.

The Release 12.2 database architecture has been modernized by adoption of the Oracle E-Business Suite System Schema, EBS_SYSTEM. Prior to the introduction of the EBS_SYSTEM schema, Oracle E-Business Suite installed application objects in the Oracle Database SYS and SYSTEM schemas. Migration to the EBS SYSTEM Schema obviates the need for any EBS-owned objects to reside in the SYS or SYSTEM schemas.

Key characteristics of the EBS_SYSTEM Schema include:

  • Creation of the EBS_SYSTEM schema and associated grant management is performed as follows:
  • Creation of the EBS_SYSTEM schema and is performed by SYS running the adgrants.sql script (supplying the APPS account as the parameter) before applying the AD-TXK Delta 13 RUPs.
  • Grants required by the APPS account are given by the apps_adgrants.sql script being run automatically by the AD-TXK Delta 13 RUP installation process. This script does not need to be run manually as part of normal patching operations.
  • All EBS database objects that currently reside in the SYS or SYSTEM schemas are migrated to appropriate Oracle E-Business Suite schemas. Depending upon the EBS object type and function, the object is migrated to EBS_SYSTEM, APPS, or APPS_NE.
  • All Oracle E-Business Suite administration actions (such as running adop, adadmin and other utilities) are now performed by EBS_SYSTEM.
  • Access to the Oracle database SYS and SYSTEM and the Oracle database server operating system is no longer required for Oracle E-Business Suite system administrative functions.

Requirements for Using the EBS System Schema

Oracle E-Business Suite is focused on revoking unnecessary privileges from the core EBS accounts as part of the implementation of the Defense in Depth and Least Privileges Model. This may impact custom code that runs in the EBS schemas and relies on these privileges. In these cases, you should consider separating the custom code into a separate schema, or, if that is not possible, adding the minimal required privileges back to the necessary account. For more information on interacting with EBS objects and code from a separate schema, refer to MOS Doc. ID: 2327836.1, Guidance for Providing Access to the Oracle E-Business Suite Database for Extensions and Third-Party Products.

Prerequisites

To use the EBS System Schema, you need to be on Oracle E-Business Suite Release 12.2.3 or later.

Mandatory Patches and Steps

You must have available the following release update packs (RUPs) and other patches, ready to apply below in Section 3, in the order shown here.

  1. AD Delta 13 (or later) and TXK Delta 13 (or later) — Support for EBS System Schema Migration was introduced in the Oracle Applications DBA (AD) and Oracle E-Business Suite Technology Stack (TXK) Delta 13 release update packs. Previous releases of AD and TXK included database objects owned by AD or TXK that resided in the Oracle Database SYS or SYSTEM schemas, and also included references to private Oracle database SYS or SYSTEM objects.

    With AD Delta 13 and TXK Delta 13, EBS database objects are migrated from SYS and SYSTEM into the EBS_SYSTEMAPPS, or APPS_NE schemas.  All relevant object references are updated to point to the migrated objects in the APPS or APPS_NE schemas.

    AD Delta 13 and TXK Delta 13 also update all code that previously referenced private Oracle Database SYS and SYSTEM objects, to reference Oracle Database approved public objects or public APIs instead.
  2. EBS 12.2.11 RUP, or EBS Release 12.2.3—12.2.10 and EBS System Schema Migration Consolidated Patch — Oracle E-Business Suite Releases 12.2.3—12.2.10 include EBS-owned database objects that reside in the database SYS or SYSTEM schemas, or reference database SYS or SYSTEM objects. The EBS System Schema Migration Consolidated Patch (also referred to as the Consolidated Patch) migrates these objects to the appropriate EBS schemas. The EBS 12.2.11 RUP includes the Consolidated Patch.

Note: Oracle E-Business Suite Release 12.2.11 and later do not install EBS objects in the SYS or SYSTEM schemas, and so do not require the EBS System Schema Migration Consolidated Patch.

  • Before proceeding with application of the final patch in Step 4, you must update any customizations that have been identified with mandatory compliance requirements. For guidance, refer to MOS Doc. ID: 1577661.1, Developing and Deploying Customizations in Oracle E-Business Suite Release 12.2.
    • EBS System Schema Migration Completion Patch — Although it is possible to apply AD-TXK Delta 13 and the EBS System Schema Migration Consolidated Patch without applying the EBS System Schema Migration Completion Patch immediately afterwards, the migration is not finished until the Completion Patch has been applied. This patch drops AD, TXK, and EBS product code in the database SYS or SYSTEM schemas, and removes any final restricted references to database SYS  or SYSTEM objects.

      Prior to applying the Completion Patch, you must apply the following prerequisite patches:AD-TXK Delta 13
    • Either the EBS 12.2.11 RUP or the EBS System Schema Migration Consolidated Patch

The Completion Patch will fail to apply if you do not apply these patches first.

  • You should also download and unzip any applicable patches from Section 4.  Apply Additional Critical Patches of MOS Doc ID: 1617461.1, Applying the Latest AD and TXK Release Update Packs to Oracle E-Business Suite Release 12.2, which introduces R12.AD.C.Delta.12 and R12.TXK.C.Delta.12. The following are the critical patches as of February 6, 2020. Run adgrants.sql, from Patch 32394134, which delivers a newer version of adgrants (adgrants.sql.65). This is the proper version of adgrants.sql. Then, apply this critical AD patch:

Patch 29591102:R12.AD.C

  • From MOS Doc. ID: 1617461.1, Applying the Latest AD and TXK Release Update Packs to Oracle E-Business Suite Release 12.2: On the Run Edition, apply Patch 32394134  (R12.AD.C.Delta.13) and Patch 32392507:R12.AD.C in Hotpatch Mode. Do not merge any other patches in this step.

$ adop phase=apply patches=32394134  merge=yes hotpatch=yes

It is mandatory that you have already installed Oracle E-Business Suite Release 12.2 using the latest startCD (12.2.0.51 – Patch 22066363) along with Patch 32947483 (Rapid Install consolidated one-off bundle on top of startCD51).

Apply AD Critical Patches

$adop phase=apply patches=33862025 merge=yes hotpatch=yes

$ adop phase=apply patches=32392507, 33535778 merge=yes hotpatch=yes

  • Apply Patch 27911576:R12.OWF.C

adop phase=apply patches= 27911576 hotpatch=yes

  • Run admkappsutil.pl on the apps tier and copy the appsutil.zip to the database tier, $ORACLE_HOME directory.

EBS Technology Patch Automation Tool for Application Tier (ETPAT-AT)

The following middle tier tech stacks are part of the middle tier and all patches in the recommendations should be applied to these components of the middle tier:

  • Oracle Forms and Reports 10.1.2.3.0
  • Oracle Fusion Middleware (FMW) – Web Tier 11.1.1.9.0
  • RSF within FMW Web tier 11.1.0.7.0
  • Oracle Fusion Middleware (FMW) – oracle_common 11.1.1.9.0
  • Oracle WebLogic Server (WLS) 10.3.6.0.7

EBS Technology Patch Automation Tool for Application Tier (ETPAT-AT)

The EBS Technology Patch Automation Tool for Application Tier automates patching of technology one-offs for the following components of the Oracle E-Business Suite Release (EBS) Release 12.2.0 application tier.

 – FMW WebTier 11.1.1.9

 – Oracle WebLogic Server 10.3.6 Smart Update Patch

 – Oracle WebLogic Server 10.3.6.0

 – FMW oracle_common 11.1.1.9

 – Forms and Reports 10.1.2.3

ETPAT-AT can be run on an EBS Release 12.2.0 application tier (run file system) for new installations or upgrades. This tool cannot be used on EBS systems that are already at Release 12.2.3 or later.

Run the following command to start ETPAT-AT:

$ perl etpat_at.pl

EBS Technology Patch Automation Tool for Application Tier (ETPAT-AT) (Doc ID 2749774.1)

How to perform Patch Impact Analysis in 12.1 and 12.2

In 11i, R12.0 and R12.1, we can use adpatch apply=no to apply a patch in test mode.

Test Mode

In test mode, AutoPatch does not apply the patch. Instead, it lists each file it would have copied, relinked, executed, or generated and shows exactly what actions it would have performed had it applied the patch. It also runs AutoConfig in test mode to determine any impending changes to the configuration files. This allows you to see the effects of the patch on your production system before you apply it.

To run AutoPatch in test mode, include apply=no on the AutoPatch command line. This runs as if AutoPatch is applying the patch, except it does not.

In R12.2, we can use adop with apply=no, since most of the options and flags that are valid for adpatch are valid for adop.

To run adop in test mode, add the apply=no parameter to the adop command you would use if you were actually going to apply the patch. In test mode, adop will go through the process of applying the patch but will not perform any of the following actions:

  • Copy files from the patch directory to the Oracle E-Business Suite file system
  • Archive object modules into the product libraries
  • Relink executables
  • Generate forms, reports, PL/SQL libraries, or menu files
  • Run SQL or EXEC commands (commands that change the database)
  • Instantiate new configuration files
  • Update the patch information files
  • Update patch information and release version in the database 

    Reference: Oracle E-Business Suite Maintenance Guide

Another way to do Patch Impact analysis is to apply the patch to the patch edition but don’t perform a cutover. Then, use the SQL provided by Oracle in $AD_TOP/sql,

ADZDCMPED.sql

This script is used to display the differences between RUN and PATCH edition

Displays the New/Changed objects

This script should only be run in PATCH edition

This script will compare editions and will report differences in all objects including tables, materialized views, indexes and cross-edition triggers. This can be very useful when trying to identify objects that may take a long time to regenerate during cutover, especially objects that are related to materialized views

++++++++++++++++++++++++++++++++++++++++++++++++++++++

SET FEEDBACK OFF;

SET ECHO OFF;

 

exec ad_zd.set_edition(‘PATCH’);

 

WHENEVER OSERROR EXIT FAILURE ROLLBACK;

WHENEVER SQLERROR EXIT FAILURE ROLLBACK;

 

REM

REM Spool results to adzdcmped.out file.

REM

spool adzdcmped.out

set pages 1000

set lines 200

prompt

prompt Database Information:

prompt =====================

prompt

 

column “Edition Name” format a15

column “Type” format a8

column “Status” format a8

column “Current?” format a8

 

REM Bug 15889193 – JWSMITH, Display same as ADZDSHOWED.sql

prompt =========================================================================

prompt = Editions

prompt =========================================================================

select

aed.edition_name “Edition Name”

, ad_zd.get_edition_type(aed.edition_name) “Type”

, decode(use.privilege, ‘USE’, ‘ACTIVE’, ‘RETIRED’) “Status”

, decode(aed.edition_name, sys_context(‘userenv’, ‘current_edition_name’),

‘CURRENT’, ”) “Current?”

from

all_editions aed

, database_properties prop

, dba_tab_privs use

where prop.property_name = ‘DEFAULT_EDITION’

and use.privilege(+) = ‘USE’

and use.owner(+) = ‘SYS’

and use.grantee(+) = ‘PUBLIC’

and use.table_name(+) = aed.edition_name

order by 1

/

 

variable patch_edition VARCHAR2(30);

variable run_edition VARCHAR2(30);

 

begin

:patch_edition := ad_zd.get_edition(‘PATCH’);

:run_edition := ad_zd.get_edition(‘RUN’);

end;

/

 

column “Owner” format a30

column “Object_Name” format a35

column “Object_Type” format a20

column “Status” format a7

column “InValid?” format a9

prompt ===========================================================================

prompt = Differences between RUN and PATCH edition (Editionable Objects)

prompt ===========================================================================

prompt

 

SELECT

eusr.user_name “Owner”,

dobjs.name “Object_Name”,

decode(dobjs.type#,

4, ‘VIEW’,

5, ‘SYNONYM’,

7, ‘PROCEDURE’,

8, ‘FUNCTION’,

9, ‘PACKAGE’,

11, ‘PACKAGE BODY’,

12, ‘TRIGGER’,

13, ‘TYPE’,

14, ‘TYPE BODY’,

‘ERROR’) “Object_Type”,

‘NEW’ “Status” ,

Decode(dobjs.status,’INVALID’,’INVALID’,NULL) “InValid?”

FROM sys.obj$ dobjs,

(

select

xusr.user#

, xusr.ext_username user_name

, ed.name edition_name

from

(select * from sys.user$ where type# = 2) xusr

, (select * from sys.obj$

where owner# = 0 and type# = 57) ed

where xusr.spare2 = ed.obj#

and ed.name=Sys_Context(‘Userenv’, ‘Current_Edition_Name’)

union all

select

busr.user#

, busr.name user_name

, ed.name edition_name

from

(select * from sys.user$ where type#=1 or user#=1) busr

, (select * from sys.obj$ where owner#=0 and type#=57) ed

where ed.name = ‘ORA$BASE’

and ed.name = Sys_Context(‘Userenv’, ‘Current_Edition_Name’)

) eusr

WHERE dobjs.owner#=eusr.user#

AND dobjs.type# in (4,5,7,8,9,11,12,13,14)

AND eusr.user_name in (select username from dba_users where

editions_enabled=’Y’)

AND dobjs.name NOT IN ( SELECT object_name

FROM dba_objects_ae

WHERE edition_name <> Sys_Context(‘Userenv’,

‘Current_Edition_Name’)

AND owner = eusr.user_name

AND object_type = decode(dobjs.type#,

4, ‘VIEW’,

5, ‘SYNONYM’,

7, ‘PROCEDURE’,

8, ‘FUNCTION’,

9, ‘PACKAGE’,

11, ‘PACKAGE BODY’,

12, ‘TRIGGER’,

13, ‘TYPE’,

14, ‘TYPE BODY’,

‘ERROR’))

UNION ALL

SELECT

eusr.user_name “Owner”,

dobjs.name “Object_Name”,

decode(dobjs.type#,

4, ‘VIEW’,

5, ‘SYNONYM’,

7, ‘PROCEDURE’,

8, ‘FUNCTION’,

9, ‘PACKAGE’,

11, ‘PACKAGE BODY’,

12, ‘TRIGGER’,

13, ‘TYPE’,

14, ‘TYPE BODY’,

‘ERROR’) “Object_Type”,

‘CHANGED’ “Status” ,

Decode(dobjs.status,’INVALID’,’INVALID’,NULL) “InValid?”

FROM sys.obj$ dobjs,

(

select

xusr.user#

, xusr.ext_username user_name

, ed.name edition_name

from

(select * from sys.user$ where type# = 2) xusr

, (select * from sys.obj$

where owner# = 0 and type# = 57) ed

where xusr.spare2 = ed.obj#

and ed.name=Sys_Context(‘Userenv’, ‘Current_Edition_Name’)

union all

select

busr.user#

, busr.name user_name

, ed.name edition_name

from

(select * from sys.user$ where type#=1 or user#=1) busr

, (select * from sys.obj$ where owner#=0 and type#=57) ed

where ed.name = ‘ORA$BASE’

and ed.name = Sys_Context(‘Userenv’, ‘Current_Edition_Name’)

) eusr

WHERE dobjs.owner#=eusr.user#

AND dobjs.type# in (4,5,7,8,9,11,12,13,14)

AND eusr.user_name in (select username from dba_users where

editions_enabled=’Y’)

AND dobjs.name IN ( SELECT object_name

FROM dba_objects_ae

WHERE edition_name <> Sys_Context(‘Userenv’,

‘Current_Edition_Name’)

AND owner = eusr.user_name

AND object_type = decode(dobjs.type#,

4, ‘VIEW’,

5, ‘SYNONYM’,

7, ‘PROCEDURE’,

8, ‘FUNCTION’,

9, ‘PACKAGE’,

11, ‘PACKAGE BODY’,

12, ‘TRIGGER’,

13, ‘TYPE’,

14, ‘TYPE BODY’,

‘ERROR’))

ORDER BY “Owner”, “Status”, “Object_Name”;

 

REM Merged in ADZDSHOWOBJS.sql with slight modifications

column edition_name format A15

 

prompt

prompt

prompt =========================================================================

prompt = Editioned Objects Per Edition

prompt =========================================================================

prompt

ttitle COL 27 “Actualized Referenced” skip 1 –

COL 17 “——————————– ——————————-”

 

select * from

(

select

eusr.edition_name edition_name

, count(decode(obj.type#,88,NULL,decode(obj.status,1,1,NULL))) a_valid

, count(decode(obj.type#,88,NULL,decode(obj.status,1,NULL,1))) a_invalid

, count(decode(obj.type#,88,NULL,1)) a_total

, count(decode(obj.type#,88,decode(obj.status,1,1,NULL),NULL)) s_valid

, count(decode(obj.type#,88,decode(obj.status,1,NULL,1),NULL)) s_invalid

, count(decode(obj.type#,88,1,NULL)) s_total

, count(1) total

from

sys.obj$ obj

, (

select

xusr.user#

, xusr.ext_username user_name

, ed.name edition_name

from

(select * from sys.user$ where type# = 2) xusr

, (select * from sys.obj$ where owner# = 0 and type# = 57) ed

where xusr.spare2 = ed.obj#

union

select

busr.user#

, busr.name user_name

, ed.name edition_name

from

(select * from sys.user$ where type# = 1 or user# = 1) busr

, (select * from sys.obj$ where owner# = 0 and type# = 57) ed

where ed.name = ‘ORA$BASE’

) eusr

where obj.owner# = eusr.user#

and obj.type# in (4,5,7,8,9,11,12,13,14,22,87,88)

and obj.remoteowner is null

and eusr.user_name in

( select username from dba_users where editions_enabled=’Y’ )

group by eusr.edition_name

) x

order by 1, 2;

 

prompt

prompt Note :

prompt (A_) – Actualized objects

prompt (S_) – Stubs

prompt

TTITLE OFF

 

 

column owner format a20

column table_name format a30

column sync format a7

 

prompt

prompt

prompt

prompt =========================================================================

prompt = Seed Data Tables Prepared in the Current Edition

prompt =========================================================================

select

col.owner owner

, col.table_name table_name

, trg.crossedition sync

from

dba_tab_columns col

, dba_objects obj

, dba_source src

, dba_triggers trg

where col.owner in

( select oracle_username

from fnd_oracle_userid

where read_only_flag in (‘A’,’E’) )

and col.table_name not like ‘%#’

and col.column_name = ‘ZD_EDITION_NAME’

and obj.owner = ad_zd.apps_schema

and obj.object_name = ad_zd_seed.eds_function(col.table_name)

and obj.object_type = ‘FUNCTION’

and obj.edition_name = sys_context(‘userenv’, ‘current_edition_name’)

and src.owner = obj.owner

and src.name = obj.object_name

and src.type = obj.object_type

and src.text like ‘%’||sys_context(‘userenv’,

‘current_edition_name’)||’%’

and trg.owner(+) = ad_zd.apps_schema

and trg.trigger_name(+) = ad_zd_seed.eds_fcet(col.table_name)

order by owner, table_name

/

 

prompt

prompt

prompt

prompt =========================================================================

prompt = New Tables

prompt =========================================================================

column Table_Name format a30

 

SELECT

substr(v.view_name,1,Length(v.view_name)-1) Table_Name

FROM dba_views_ae v

WHERE v.editioning_view = ‘Y’

AND v.edition_name = :patch_edition

AND v.view_name NOT IN (SELECT vi.view_name

FROM dba_views_ae vi

WHERE vi.editioning_view = ‘Y’

AND vi.view_name = v.view_name

AND vi.owner = v.owner

AND vi.edition_name = :run_edition)

/

 

prompt

prompt

prompt

prompt =========================================================================

prompt = New/Changed Columns

prompt =========================================================================

 

declare

procedure exec_force(stmt in varchar2) is

no_such_table exception;

pragma exception_init(no_such_table, -942);

begin

execute immediate stmt;

exception

when no_such_table then

null;

end;

begin

exec_force(‘drop table ad_zd_report_table_columns’);

end;

/

 

declare

procedure exec_force(stmt in varchar2) is

begin

execute immediate stmt;

end;

begin

exec_force(‘create ‘ || ‘table ‘ || ‘ad_zd_report_table_columns

(

p_owner varchar2(30) not null,

p_view_name varchar2(30) not null,

p_view_column_name varchar2(30) not null,

p_table_column_name varchar2(30) not null,

p_status varchar2(30) not null

)’);

end;

/

 

DECLARE

CURSOR c_changed_evs IS

SELECT

v.view_name,

v.owner

FROM dba_views_ae v

WHERE v.editioning_view = ‘Y’

AND v.edition_name = :patch_edition

AND v.view_name IN (SELECT vi.view_name

FROM dba_views_ae vi

WHERE vi.editioning_view = ‘Y’

AND vi.view_name = v.view_name

AND vi.owner = v.owner

AND vi.edition_name = :run_edition);

cursor new_columns(x_owner varchar2,x_view_name varchar2) is

select c.view_column_name,

c.table_column_name

from dba_editioning_view_cols_ae c

where c.view_name = x_view_name

and c.owner = x_owner

and c.edition_name = :patch_edition

and c.view_column_name not in (select ci.view_column_name

from dba_editioning_view_cols_ae ci

where ci.view_name = c.view_name

and ci.owner = c.owner

and ci.edition_name = :run_edition);

 

cursor revised_columns(x_owner varchar2,x_view_name varchar2) is

select c.view_column_name,

c.table_column_name

from dba_editioning_view_cols_ae c

where c.view_name = x_view_name

and c.owner = x_owner

and c.edition_name = :patch_edition

and exists (select ci.view_column_name

from dba_editioning_view_cols_ae ci

where ci.view_name = c.view_name

and ci.owner = c.owner

and ci.edition_name = :run_edition

and ci.view_column_name = c.view_column_name

and ci.table_column_name <> c.table_column_name);

 

 

l_view_name varchar2(30);

l_owner varchar2(30);

l_view_col varchar2(30);

l_table_col varchar2(30);

BEGIN

OPEN c_changed_evs;

FETCH c_changed_evs into l_view_name, l_owner;

 

while (c_changed_evs%found) loop

 

open new_columns(l_owner,l_view_name);

fetch new_columns into l_view_col,l_table_col;

while (new_columns%found) loop

insert into ad_zd_report_table_columns (p_owner,p_view_name,p_view_column_name,p_table_column_name,p_status)

values(l_owner, l_view_name, l_view_col, l_table_col,’NEW’);

fetch new_columns into l_view_col,l_table_col;

end loop;

close new_columns;

 

 

open revised_columns(l_owner,l_view_name);

fetch revised_columns into l_view_col,l_table_col;

while (revised_columns%found) loop

insert into ad_zd_report_table_columns (p_owner,p_view_name,p_view_column_name,p_table_column_name,p_status)

values(l_owner, l_view_name, l_view_col, l_table_col,’CHANGED’);

fetch revised_columns into l_view_col,l_table_col;

end loop;

close revised_columns;

 

 

fetch c_changed_evs into l_view_name, l_owner;

end loop;

close c_changed_evs;

commit;

END;

/

 

column TableName format a30

column ColumnName format a30

column status format a10

 

 

select substr(p_view_name,1,length(p_view_name)-1) TableName,

p_view_column_name ColumnName,

p_status STATUS

from ad_zd_report_table_columns

order by TableName,status desc,ColumnName

/

 

 

declare

procedure exec_force(stmt in varchar2) is

no_such_table exception;

pragma exception_init(no_such_table, -942);

begin

execute immediate stmt;

exception

when no_such_table then

null;

end;

begin

exec_force(‘drop table ad_zd_report_table_columns’);

end;

/

 

 

prompt

prompt

prompt

prompt =========================================================================

prompt = New Indexes

prompt =========================================================================

 

column owner format a30

column table_name format a30

column index_name format a30

 

select

idx.owner owner

, idx.table_name

, ad_zd_table.original_index_name(idx.index_name) index_name

from dba_indexes idx

where idx.owner in

( select oracle_username

from fnd_oracle_userid

where read_only_flag in (‘A’, ‘B’, ‘E’,’U’) )

and regexp_like(idx.index_name, ad_zd_table.revised_index_regexp, ‘c’)

and not exists ( SELECT inner.index_name

FROM dba_indexes inner

WHERE inner.index_name = ad_zd_table.original_index_name(idx.index_name)

AND inner.owner = idx.owner)

order by 1, 2, 3

/

 

 

prompt

prompt

prompt

prompt =========================================================================

prompt = Revised Indexes

prompt =========================================================================

 

column owner format a30

column table_name format a30

column index_name format a30

 

select

idx.owner owner

, idx.table_name

, idx.index_name patched_index

, oidx.index_name original_index

from dba_indexes idx, dba_indexes oidx

where idx.owner in

( select oracle_username

from fnd_oracle_userid

where read_only_flag in (‘A’, ‘B’, ‘E’,’U’) )

and regexp_like(idx.index_name, ad_zd_table.revised_index_regexp, ‘c’)

and oidx.owner(+) = idx.owner

and oidx.index_name = ad_zd_table.original_index_name(idx.index_name)

order by 1, 2, 3

/

 

 

prompt

prompt

prompt

prompt =========================================================================

prompt = Cross-edition Triggers

prompt =========================================================================

 

column owner format a30

column trigger_name format a30

column table_owner format a30

column table_name format a30

column crossedition format a10

column status format a10

 

select trg.owner,

trg.trigger_name,

trg.table_owner,

trg.table_name,

crossedition,

status

from dba_triggers trg

where crossedition in (‘FORWARD’, ‘REVERSE’)

order by 1

/

 

 

prompt

prompt

prompt

prompt =========================================================================

prompt = New/Revised Materialized views

prompt =========================================================================

 

column “Owner” format a30

column “MView Name” format a30

column “Status” format a7

 

SELECT mvq.owner “Owner”,

ad_zd_mview.get_mv_name(mvq.view_name) “MView Name”,

‘NEW’ “Status”

FROM dba_views_ae mvq,

fnd_oracle_userid fou

WHERE fou.read_only_flag in (‘A’,’B’, ‘E’, ‘U’)

AND mvq.owner = fou.oracle_username

AND mvq.editioning_view = ‘N’

AND mvq.view_name LIKE ‘%#’

AND mvq.edition_name = :patch_edition

AND NOT EXISTS (SELECT mv.mview_name

FROM dba_mviews mv

WHERE mv.owner = mvq.owner

AND mv.mview_name = ad_zd_mview.get_mv_name(mvq.view_name))

UNION

SELECT mvq.owner “Owner”,

ad_zd_mview.get_mv_name(mvq.view_name) “MView Name”,

‘CHANGED’ “Status”

FROM dba_views_ae mvq,

fnd_oracle_userid fou

WHERE fou.read_only_flag in (‘A’,’B’, ‘E’, ‘U’)

AND mvq.owner = fou.oracle_username

AND mvq.editioning_view = ‘N’

AND mvq.view_name LIKE ‘%#’

AND mvq.edition_name = :patch_edition

AND EXISTS (SELECT mv.mview_name

FROM dba_mviews mv

WHERE mv.owner = mvq.owner

AND mv.mview_name = ad_zd_mview.get_mv_name(mvq.view_name))

ORDER BY “Owner”, “Status”, “MView Name”

/

prompt

spool off;

exit;

/

 

 

Finding the Patches inside a Merged Patch

SELECT applied_patch_id, rapid_installed_flag, patch_name, patch_type, maint_pack_level
FROM   applsys.ad_applied_patches
order by 1 desc;
select * from ad_patch_drivers
where applied_patch_id = 102974;
Notice the ORIG_PATCH_NAME is a surrogate number instead of the old convention of “merged”.
PATCH_DRIVER_ID     APPLIED_PATCH_ID     ORIG_PATCH_NAME

                       99582                            102974                     2123079401

SELECT ab.bug_number, acp.patch_abstract
FROM  ad_comprising_patches acp, ad_bugs ab
WHERE acp.bug_id = ab.bug_id AND acp.patch_driver_id = 99582;

BUG_NUMBER    PATCH_ABSTRACT

 21830810            R12.TXK.C.DELTA.8
 23569114            INVALID APPS DATABASE USER CREDENTIALS – TXKGENADOPWRAPPER_PL – 12.2.4
23705992             TNSNAMES.ORA GENERATED WITH SCAN NAME INSTEAD OF SCAN IPS FOR CUSTOM RACE DB CLONE
18525466             REVERT CHANGES MADE TO VALIDATE MANAGED SERVER PORTS OF ALL NODES

Tips From Our Latest Release 12.2.6 First Pass Upgrades

We’ve just finished two successful Release 12.2.6 First Pass Upgrades in the last six weeks. We always encounter and resolve a few unique issues with each client. Here are two examples.

The first issue occurred while running Patch 10124646 (the 12.2.0 upgrade patch), and the second occurred after running that patch.

1. During the 10124646 patch (the upgrade to 12.2.0), with about 22000 jobs completed and about 10000 jobs remaining, we saw this error:

ATTENTION: All workers either have failed or are waiting:

FAILED: file CustMigrationTool.class on worker 1.
FAILED: file CustMigrationTool.class on worker 2.
FAILED: file CustMigrationTool.class on worker 3.
FAILED: file CustMigrationTool.class on worker 4.
FAILED: file EDRXDOMigration.class on worker 5.
FAILED: file CustMigrationTool.class on worker 6.
FAILED: file CustMigrationTool.class on worker 7.
FAILED: file CustMigrationTool.class on worker 8.
FAILED: file CustMigrationTool.class on worker 9.

According to the ad worker log: adworker001.log
Exception in thread “main” java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-04063: package body “APPS.FND_TRACE” has errors
ORA-06508: PL/SQL: could not find program unit being called: “APPS.FND_TRACE”
ORA-06512: at line 5

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:397)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
at oracle.jdbc.driver.T4C7Ocommoncall.processError(T4C7Ocommoncall.java:100)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF(T4C7Ocommoncall.java:64)
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:583)
at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:5222)
at oracle.apps.edr.util.EDRXDOMigration.main(EDRXDOMigration.java:466)

We found the partial solution in MOS Doc. ID: 1959572.1, CustMigrationTool.class Error Upgrading from EBS R12.1.3 to R12.2 as the Connection Is Not Being Made In the 60 Seconds Defined In sqlnet.ora, which says that the connection couldn’t be made in the 60 seconds timeout value defined in sqlnet.ora, so the value needs to be changed to 120 seconds. To resolve the issue:
1. Change sqlnet.ora, SQLNET.INBOUND_CONNECT_TIMEOUT=120
2. Restart the db server
3. Restart the patch

However, that was not the only solution that was required. It turns out that using Recommended Patch Collections (RPC) creates objects that have a higher version than objects delivered by the 12.2.0 upgrade. This means the 12.2.0 upgrade will not replace objects with a higher version number and the upgrade fails. We had to find the correct versions of the code that worked together and then drop a trigger in order to get the FND_TRACE package body and specification to compile. Very interesting.
_____________________________________________________________

2. When running the “Configure the Instance” step, we couldn’t run AutoConfig on the database tier. This step is from the “Finish the Upgrade” section of the 12.2 upgrade guide on page 3-8.

We found MOS Doc. ID: 2117174.1, 12.2 Adop Cleanup Fails with Error “ETCC not run in the Database Node” After Running ETCC on the Database Node.

This note suggests that either the /etc/host file is not correctly formatted, or the nodes don’t match in the TXK_TCC_RESULTS table or the FND_NODES table. While this note is not a direct “hit”, we did find the domain was appended to the node_name. We updated the node_name in the TXK_TCC_RESULTS table to fix the issue:

update APPLSYS.TXK_TCC_RESULTS set node_name=’data2′ where node_name =’data2.ca.local’;

Email sherri@trutek.com to discuss pricing or schedule a time to have us help you with a First Pass Upgrade. We have completed the First Pass Upgrade in as few as three weeks, but it can take longer if we experience new issues. Please see our webpage for more information about our First Pass Upgrades consulting engagement. We also provide training to the rest of your managers, DBAs and development staff to help them understand the best practices of Online Patching.

Patch Wizard Can Export its Patch Analysis Now!

Check out Patch 9703082, released in November 2015 for both Release 12.1 and 12.2. Oracle has added the ability to export your patch analysis from Patch Wizard. This works well for companies that want to document or research what objects will change if a patch is applied and send it to testers in an email. Until now, you either had to write your own script to pull the data out of the Patch Wizard tables, or point testers to the Patch Wizard screens. But there’s one caveat…

When you click on the Export button, it exports everything – a list of New Files, Changed Files, and Unchanged Files. We haven’t found a use for the Unchanged Files information, and the sheer quantity of records that this category produces can be overwhelming. Imagine if you analyzed RUP4 – your export file would contain thousands of Unchanged Files. Nonetheless, being able to send that export file via email is valuable, so here’s the workaround:

1. Export the file
2. Sort by Impact Type
3. Delete the Unchanged Files
4. Save and send to your tester