Friday 4 September 2020

How to Apply AD & TXK Code Level Patching

 Document: Applying the Latest AD and TXK Release Update Packs to Oracle E-Business Suite Release 12.2 (Doc ID 1617461.1)

Step - 1 Source Apps Environment and Start Adadmin Server

 $ source /u01/applmgr/upg/fs1/EBSapps/appl/APPSDELL_upgebs.env

 $ sh $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh start

 Step - 2 Copy All AD & TXK Patches in EBS Patch Directory and Unzip

 

$ cd /u01/install/patches/apps/ad_txk_patches

 $ cp * /u01/applmgr/upg/fs_ne/EBSapps/patch/

 $ cd /u01/applmgr/upg/fs_ne/EBSapps/patch/

 $ unzip -o p26834480_R12.AD.C_R12_LINUX.zip

 Step - 3 As per README.txt of 26834480 apply prerequisite

 

$ cd /u01/applmgr/upg/fs_ne/EBSapps/patch/26834480/admin

 $ ls adgrants*

adgrants_nt.sql  adgrants.sql

 $ cp adgrants.sql /u02/oracle/db/tech_st/12.1.0/appsutil/admin/

 $ source /u02/oracle/db/tech_st/12.1.0/DELL_upgebs.env $ cd $ORACLE_HOME/appsutil/admin

 $ ls adgrants.sql

adgrants.sql

$ sqlplus /nolog

SQL> @adgrants.sql APPS

Step - 4 Apply AD Patch 26834480

 $ adop phase=apply patches=26834480 hotpatch=yes

 Enter the APPS password: apps

Enter the SYSTEM password: manager

Enter the WLSADMIN password: Oracle_123

 Step - 5 Apply Others Critical AD Patches with Merge Option

 $ cd /u01/applmgr/upg/fs_ne/EBSapps/patch

 $ unzip -o p28280348_R12.AD.C_R12_GENERIC.zip

 $ unzip -o p30213183_R12.AD.C_R12_GENERIC.zip

 $ unzip -o p30258630_R12.AD.C_R12_GENERIC.zip

 $ unzip -o p30355167_R12.AD.C_R12_GENERIC.zip

 $ adop phase=apply patches=28280348,30213183,30258630,30355167 hotpatch=yes merge=yes

 Enter the APPS password: apps

Enter the SYSTEM password: manager

Enter the WLSADMIN password: Oracle_123

TXK Error & Solution

###################################################################################-------------------------------------------- ERROR --------------------------------------------

###################################################################################sqlplus -s APPS/apps @/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/adsqlwrapper.sql '/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/ADZDWRKR.sql apps manager CUTOVER 0 7 12'

Connected.

PL/SQL procedure successfully completed.

Connected.

Session altered.

PL/SQL procedure successfully completed.

declare

*

ERROR at line 1:

ORA-01031: insufficient privileges

ORA-06512: at "SYS.DBMS_SESSION", line 122

ORA-06512: at "APPS.AD_ZD_CTX", line 7

ORA-06512: at "APPS.AD_ZD_PARALLEL_EXEC", line 538

ORA-01031: insufficient privileges

ORA-06512: at "SYS.DBMS_SESSION", line 122

ORA-06512: at "APPS.AD_ZD_CTX", line 7

ORA-06512: at "APPS.AD_ZD_PARALLEL_EXEC", line 524

ORA-01031: insufficient privileges

ORA-06512: at line 16


###################################################################################------------------------------------------- SOLUTION -------------------------------------------

###################################################################################[oracle@upgebs sql]$ source /u01/applmgr/upg/fs1/EBSapps/appl/APPSDELL_upgebs.env

[oracle@upgebs sql]$ sqlplus apps/apps

SQL> set lines 250 pages 250

SQL> col NAMESPACE format a15

SQL> col SCHEMA format a15

SQL> col PACKAGE format a20

SQL> run

  1* select * from dba_context where namespace='AD_ZD_CTX'

NAMESPACE       SCHEMA          PACKAGE              TYPE

--------------- --------------- -------------------- ----------------------

AD_ZD_CTX       APPLSYS         AD_ZD_CTX            ACCESSED LOCALLY

SQL> create or replace context AD_JAR using AD_JAR;

Context created.

SQL> create or replace context AD_ZD_CTX using AD_ZD_CTX;

Context created.

SQL>  select * from dba_context where namespace='AD_ZD_CTX';

NAMESPACE       SCHEMA          PACKAGE              TYPE

--------------- --------------- -------------------- ----------------------

AD_ZD_CTX       APPS            AD_ZD_CTX            ACCESSED LOCALLY


[oracle@upgebs log]$ sqlplus -s APPS/apps @/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/adsqlwrapper.sql '/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/ADZDWRKR.sql apps manager CUTOVER 0 7 12'


PL/SQL procedure successfully completed.

Connected.

Session altered.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.


Note: Before Apply TXK you will must apply above solution.


Step - 6 Unzip TXK Main Patches & Others Critical Patches

$ unzip -o p28840822_R12.TXK.C_R12_GENERIC.zip

$ unzip -o p29965377_R12.TXK.C_R12_GENERIC.zip

$ unzip -o p29781255_R12.TXK.C_R12_GENERIC.zip

$ unzip -o p28371446_R12.TXK.C_R12_GENERIC.zip

Step - 7 Apply TXK Main & Others Critical Patches with Merge Option

$ adop phase=apply patches=28840822,29965377,29781255,28371446 hotpatch=yes merge=yes

Enter the APPS password: apps

Enter the SYSTEM password: manager

Enter the WLSADMIN password: Oracle_123

Step -8 Source the run edition environment file

$ cd /u01/applmgr/upg/

$ ls

EBSapps.env  fs1  fs2  fs_ne

$ source EBSapps.env run

  E-Business Suite Environment Information

  ----------------------------------------

  RUN File System           : /u01/applmgr/upg/fs1/EBSapps/appl

  PATCH File System         : /u01/applmgr/upg/fs2/EBSapps/appl

  Non-Editioned File System : /u01/applmgr/upg/fs_ne

  DB Host: upgebs.hinopak.com  Service/SID: DELL

 

  Sourcing the RUN File System ...

Step -9 Stop the Oracle Weblogic Server Admin Server on the run file system

$ sh $ADMIN_SCRIPTS_HOME/adadminsrvctl.sh stop

Enter the WebLogic Admin password: Oracle_123

Enter the APPS Schema password: apps

Step -10 Update Database Tier to Latest Code

A-    Source the run edition environment file.

$ cd /u01/applmgr/upg/

$ source EBSapps.env run

B-     Execute the admkappsutil.pl utility to create the appsutil.zip file in $INST_TOP/admin/out. 

$ perl $AD_TOP/bin/admkappsutil.pl

 $ cd $INST_TOP/admin/out

 $ ls appsutil.zip

 appsutil.zip

 $ cp appsutil.zip /u02/oracle/db/tech_st/12.1.0

 C-      Source Database Environment with unzip appsutil.zip and run adautocfg.sh

$ source /u02/oracle/db/tech_st/12.1.0/DELL_upgebs.env

$ cd $ORACLE_HOME

$ unzip -o appsutil.zip

$ sh $ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME>/adautocfg.sh

D-    Source Apps Environment & Run AutoConfig on the run file system

 $ cd /u01/applmgr/upg/

 $ source EBSapps.env run

 $ sh $INST_TOP/admin/scripts/adautocfg.sh

 Enter the APPS user password: apps

 

AD TXK Completed


How to De-Installation of OLAP CATALOG 11.2.0.4.0 with Option Off

======================================

OLAP CATALOG

======================================

SQL > set lines 133 pages 133

SQL > col COMP_NAME format a40

SQL> select comp_name,version,status from dba_registry;

 

COMP_NAME                                VERSION                        STATUS

---------------------------------------- ------------------------------ -----------

Oracle Machine Generated Data            12.1.0.2.0                     VALID

OLAP Catalog                             11.2.0.4.0                     OPTION OFF

Oracle XML Database                      12.1.0.2.0                     VALID

Oracle Text                              12.1.0.2.0                     VALID

Spatial                                  12.1.0.2.0                     VALID

Oracle Multimedia                        12.1.0.2.0                     VALID

Oracle Database Catalog Views            12.1.0.2.0                     VALID

Oracle Database Packages and Types       12.1.0.2.0                     VALID

Oracle Real Application Clusters         12.1.0.2.0                     OPTION OFF

JServer JAVA Virtual Machine             12.1.0.2.0                     VALID

Oracle XDK                               12.1.0.2.0                     VALID

Oracle Database Java Packages            12.1.0.2.0                     VALID

OLAP Analytic Workspace                  12.1.0.2.0                     VALID

Oracle OLAP API                          12.1.0.2.0                     VALID

Oracle Data Mining                       12.1.0.2.0                     VALID

 

15 rows selected.

[oracle@dbsc admin]$ cd

[oracle@dbsc ~]$ cd $ORACLE_HOME/

[oracle@dbsc 12.1.0]$ cd olap/

[oracle@dbsc olap]$ ls

admin  api  mesg

[oracle@dbsc olap]$ cd admin/

[oracle@dbsc admin]$ ls

apsdbmig.sql  apse920.sql   apsu111.sql   awmxsrol.sql  catnothing.sql  dbmsawx.sql   olapidrp.plb  olap.sql      utlolaplog.sql  xoqe102.sql   xoqrelod.sql  xoqu111.sql

apse101.sql   apspatch.sql  apsu112.sql   cataps.sql    catnoxoq.sql    dbmscbu.sql   olapidsm.plb  prvtawx.plb   xoqawmd.sql     xoqe111.sql   xoqroles.sql  xoqu112.sql

apse102.sql   apsrelod.sql  apsu920.sql   catawxml.sql  catxoq.sql      dbmscoad.sql  olapiecm.plb  prvtcbu.plb   xoqdbmig.sql    xoqe112.sql   xoqsys.sql    xoqu920.sql

apse111.sql   apsu101.sql   apsviews.sql  catnoamd.sql  catxoqsys.sql   olapiboo.plb  olapilib.plb  prvtcoad.plb  xoqdrop.sql     xoqe920.sql   xoqu101.sql   xumuts.plb

apse112.sql   apsu102.sql   awmcrxdb.plb  catnoaps.sql  creatind.sql    olapidcm.plb  olapimdm.plb  prvtcoas.plb  xoqe101.sql     xoqpatch.sql  xoqu102.sql

[oracle@dbsc admin]$ ls catno

catnoamd.sql    catnoaps.sql    catnothing.sql  catnoxoq.sql

[oracle@dbsc admin]$ ls catnoamd.sql

catnoamd.sql

[oracle@dbsc admin]$ sqlplus / as sysdba

 

SQL*Plus: Release 12.1.0.2.0 Production on Thu Jan 16 19:46:56 2020

 

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Real Application Testing options

 

SQL> @catnoamd.sql

 

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

Synonym dropped.

 

PL/SQL procedure successfully completed.

 

 

1 row deleted.

 

SQL>

SQL> col COMP_NAME format a40

SQL> set lines 133 pages 133

SQL> select comp_name,version,status from dba_registry;

 

COMP_NAME                                VERSION                        STATUS

---------------------------------------- ------------------------------ -----------

Oracle Machine Generated Data            12.1.0.2.0                     VALID

OLAP Catalog                             11.2.0.4.0                     REMOVED

Oracle XML Database                      12.1.0.2.0                     VALID

Oracle Text                              12.1.0.2.0                     VALID

Spatial                                  12.1.0.2.0                     VALID

Oracle Multimedia                        12.1.0.2.0                     VALID

Oracle Database Catalog Views            12.1.0.2.0                     VALID

Oracle Database Packages and Types       12.1.0.2.0                     VALID

Oracle Real Application Clusters         12.1.0.2.0                     OPTION OFF

JServer JAVA Virtual Machine             12.1.0.2.0                     VALID

Oracle XDK                               12.1.0.2.0                     VALID

Oracle Database Java Packages            12.1.0.2.0                     VALID

OLAP Analytic Workspace                  12.1.0.2.0                     VALID

Oracle OLAP API                          12.1.0.2.0                     VALID

Oracle Data Mining                       12.1.0.2.0                     VALID

15 rows selected.

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Real Application Testing options

[oracle@dbsc admin]$ cd $ORACLE_HOME

[oracle@dbsc 12.1.0]$ cd rdbms/admin/

[oracle@dbsc admin]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Thu Jan 16 19:48:13 2020

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Real Application Testing options

 

SQL> @utlrp.sql

 

TIMESTAMP

--------------------------------------------------------------------------------

COMP_TIMESTAMP UTLRP_BGN  2020-01-16 19:48:20

 

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid

DOC>   objects in the database. Recompilation time is proportional to the

DOC>   number of invalid objects in the database, so this command may take

DOC>   a long time to execute on a database with a large number of invalid

DOC>   objects.

DOC>

DOC>   Use the following queries to track recompilation progress:

DOC>

DOC>   1. Query returning the number of invalid objects remaining. This

DOC>      number should decrease with time.

DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);

DOC>

DOC>   2. Query returning the number of objects compiled so far. This number

DOC>      should increase with time.

DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;

DOC>

DOC>   This script automatically chooses serial or parallel recompilation

DOC>   based on the number of CPUs available (parameter cpu_count) multiplied

DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).

DOC>   On RAC, this number is added across all RAC nodes.

DOC>

DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel

DOC>   recompilation. Jobs are created without instance affinity so that they

DOC>   can migrate across RAC nodes. Use the following queries to verify

DOC>   whether UTL_RECOMP jobs are being created and run correctly:

DOC>

DOC>   1. Query showing jobs created by UTL_RECOMP

DOC>         SELECT job_name FROM dba_scheduler_jobs

DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';

DOC>

DOC>   2. Query showing UTL_RECOMP jobs that are running

DOC>         SELECT job_name FROM dba_scheduler_running_jobs

DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';

DOC>#

 

PL/SQL procedure successfully completed.

 

 

TIMESTAMP

--------------------------------------------------------------------------------

COMP_TIMESTAMP UTLRP_END  2020-01-16 19:49:01

 

DOC> The following query reports the number of objects that have compiled

DOC> with errors.

DOC>

DOC> If the number is higher than expected, please examine the error

DOC> messages reported with each object (using SHOW ERRORS) to see if they

DOC> point to system misconfiguration or resource constraints that must be

DOC> fixed before attempting to recompile these objects.

DOC>#

 

OBJECTS WITH ERRORS

-------------------

                  5

 

DOC> The following query reports the number of errors caught during

DOC> recompilation. If this number is non-zero, please query the error

DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors

DOC> are due to misconfiguration or resource constraints that must be

DOC> fixed before objects can compile successfully.

DOC>#

 

ERRORS DURING RECOMPILATION

---------------------------

                          5

 

Function created.

 

PL/SQL procedure successfully completed.

 

Function dropped.

 

PL/SQL procedure successfully completed.

 

SQL>

 

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Real Application Testing options

[oracle@dbsc admin]$ sqlplus / as sysdba

 

SQL*Plus: Release 12.1.0.2.0 Production on Thu Jan 16 19:47:23 2020

 

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Real Application Testing options

 

SQL> col COMP_NAME format a40

SQL> set lines 133 pages 133

SQL> select comp_name,version,status from dba_registry;

 

COMP_NAME                                VERSION                        STATUS

---------------------------------------- ------------------------------ -----------

Oracle Machine Generated Data   12.1.0.2.0                     VALID

Oracle XML Database                      12.1.0.2.0                     VALID

Oracle Text                                        12.1.0.2.0                     VALID

Spatial                                                12.1.0.2.0                     VALID

Oracle Multimedia                           12.1.0.2.0                     VALID

Oracle Database Catalog Views    12.1.0.2.0                     VALID

Oracle Database Packages and Types       12.1.0.2.0        VALID

Oracle Real Application Clusters   12.1.0.2.0                     OPTION OFF

JServer JAVA Virtual Machine        12.1.0.2.0                     VALID

Oracle XDK                                         12.1.0.2.0                     VALID

Oracle Database Java Packages     12.1.0.2.0                     VALID

OLAP Analytic Workspace              12.1.0.2.0                     VALID

Oracle OLAP API                               12.1.0.2.0                     VALID

Oracle Data Mining                         12.1.0.2.0                     VALID

 

14 rows selected.

 

SQL>


Wednesday 2 September 2020

Oracle E-Business Suite R12 12.2.9 Weblogic Console & EM Is Not Open

 ISSUE

----------------------------------------------------------------------------------------------------------------------------


CAUSE:

-----------------------------------------------------------------------------------------------------------------------------

  <connection-filter-rule>upgebs.oracle.com * * allow</connection-filter-rule>
  <connection-filter-rule>0.0.0.0/0 * * 
deny</connection-filter-rule>

Note: When you apply Critical Patch Update (CPU) released in April 2019 or TXK Delta 11 so your weblogic console and weblogic em getting shutdown on browser automatically for security reason. 

SOLUTION

----------------------------------------------------------------------------------------------------------------------------

Step -1 Source Run File System 

$ cd /u01/applmgr/upg/

$ source EBSapps.env run

  E-Business Suite Environment Information

  ----------------------------------------

  RUN File System                             : /u01/applmgr/upg/fs2/EBSapps/appl

  PATCH File System                         : /u01/applmgr/upg/fs1/EBSapps/appl

  Non-Editioned File System           : /u01/applmgr/upg/fs_ne

  DB Host: upgebs.oracle.com Service/SID: DELL

  Sourcing the RUN File System...

Step -2 Go to config.xml Location & Take Backup First Then Changes

$ cd $FMW_HOME/user_projects/domains/EBS_domain/config/ 

$ ls config.xml

config.xml

$ cp config.xml config.xml_org_28022020

$ vi config.xml

Before:

 <connection-filter-rule>upgebs.oracle.com * * allow</connection-filter-rule>

    <connection-filter-rule>0.0.0.0/0 * * deny</connection-filter-rule> 

After:

<connection-filter-rule>upgebs.oracle.com * * allow</connection-filter-rule>

    <connection-filter-rule>0.0.0.0/0 * * allow </connection-filter-rule>

Save

Note: This changes perform as some on Patch File System.

OR

Only Allow Access to Oracle WebLogic Server Administration Ports from Trusted Hosts

Step -3

Note: When you want to access weblogic console and em so you just add your system hostname or IP in Config.xml like below so you can access weblogic console/em.

$ cd $FMW_HOME/user_projects/domains/EBS_domain/config/

$ ls config.xml

config.xml

$ cp config.xml config.xml_org_28022020

$ vi config.xml

Before:

<connection-filter-rule>upgebs.oracle.com * * allow</connection-filter-rule>

    <connection-filter-rule>0.0.0.0/0 * * deny</connection-filter-rule>

After:

<connection-filter-rule>upgebs.oracle.com * * allow</connection-filter-rule>

<connection-filter-rule>140.1.25.65 * * allow</connection-filter-rule>

    <connection-filter-rule>0.0.0.0/0 * * allow </connection-filter-rule>

Step -4 Re-Bounce Application & Check weblogic console/em URL

$ cd $ADMIN_SCRIPTS_HOME

$ ./adstpall.sh apps/apps

Enter the WebLogic Server password: manager

$ ./adstrtal.sh apps/apps

Enter the WebLogic Server password: manager

Weblogic Console

URL:  http://upgebs.oracle.com:7002/console


 Weblogic Enterprise Manager

 URL: http://upgebs.oracle.com:7002/em


How To Apply Consolidated Upgrade Patch (CUP American Patch) For E-Business Suite 12.2.x

 Note: We will follow this document for CUP Patch and AMERICAN Patch “Oracle E-Business Suite Release Notes, Release 12.2 (Doc ID 1320300.1)”

Section 3: Instructions for Upgrade Customers

3.1 Apply Consolidated Upgrade Patch and Run 12.2.0 Upgrade (required)

 Source Application Environment and unzip CUP Patch with check RUN File Edition

Step-1

$ source /u01/applmgr/upg/fs1/EBSapps/appl/APPSDELL_upgebs.env

$ echo $FILE_EDITION

run

$ cd /u01/install/patches/apps/cup_patches/

$ unzip -o  p28853097_12.2.0_R12_LINUX.zip

Apply CUP Patch

Step-2 

$ cd /u01/install/patches/apps/cup_patches/28853097

$

$ adpatch preinstall=y

Filename [adpatch.log] : 28853097.log

The default directory is [/u01/install/patches/apps/cup_patches/28853097] :

Please enter the name of your AutoPatch driver file : u28853097.drv

AutoPatch is complete.

AutoPatch may have written informational messages to the file

/u01/applmgr/upg/fs1/EBSapps/appl/admin/DELL/log/28853097.lgi

Errors and warnings are listed in the log file

/u01/applmgr/upg/fs1/EBSapps/appl/admin/DELL/log/28853097.log

and in other log files in the same directory.

[oracle@upgebs 28853097]$

During American Patch Errors & Solution (Fixing) 

Note: Before Apply American Patch we will have fixes all issues as per below Errors.

##### ERROR #####

sqlplus -s APPS/***** @/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/adsqlwrapper.sql '/u01/applmgr/upg/fs1/EBSapps/appl/fnd/12.0.0/patch/115/sql/affdlredef.sql &un_apps &pw_apps'

Connected.

PL/SQL procedure successfully completed.

     dbms_redefinition.start_redef_table(l_applsys_schema,'FND_DOCUMENTS_LONG_TEXT','FND_DOCUMENTS_LONG_TEXTINT',col_mapping);

      *

ERROR at line 106:

ORA-06550: line 106, column 7:

PLS-00201: identifier 'DBMS_REDEFINITION' must be declared

ORA-06550: line 106, column 7:

PL/SQL: Statement ignored

ORA-06550: line 109, column 7: 

#### SOLUTION ####

SQL> conn system/manager

Connected.

SQL> grant execute on dbms_redefinition to applsys;

change table FND_DOCUMENTS_LONG_TEXT datatype long - clob

run adgrant.sql applsys and apps

run utlrp.sql via sqlplus sys / as sysdba

##### ERROR #####

(This error was not occurring

Connecting to AP......Unable to connect. 

AutoPatch error: The following ORACLE error: 

ORA-28000: the account is locked   occurred while executing the SQL statement:  CONNECT AP/*****

#### SOLUTION ####

select username,ACCOUNT_STATUS,PROFILE from dba_users where username='APPS';

select resource_name, limit from dba_profiles

where resource_type = 'PASSWORD' and profile = 'DEFAULT';

SQL> conn system/manager

Connected.

SQL> alter user ap account unlock;

User altered.

SQL> conn ap/ap

Connected.

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

[oracle@upgebs admin]$

##### ERROR #####

Uploading from the data file /u01/applmgr/upg/fs1/EBSapps/appl/ast/12.0.0/patch/115/import/US/astprofs.ldt

Altering database NLS_LANGUAGE environment to AMERICAN

Dumping from LCT/LDT files (/u01/applmgr/upg/fs1/EBSapps/appl/fnd/12.0.0/patch/115/import/afscprof.lct(120.14), /u01/applmgr/upg/fs1/EBSapps/appl/ast/12.0.0/patch/115/import/US/astprofs.ldt) to staging tables

Dumping LCT file /u01/applmgr/upg/fs1/EBSapps/appl/fnd/12.0.0/patch/115/import/afscprof.lct(120.14) into FND_SEED_STAGE_CONFIG

Dumping LDT file /u01/applmgr/upg/fs1/EBSapps/appl/ast/12.0.0/patch/115/import/US/astprofs.ldt into FND_SEED_STAGE_ENTITY

Dumped the batch (PROFILE AST_SCRIPTING_SERVER , PROFILE AST_WRAPUP_CALL_STATS_END_DATE ) into FND_SEED_STAGE_ENTITY

Uploading from staging tables

  Error loading seed data for PROFILE:  PROFILE_NAME = AST_WRAPUP_CALL_STATS_START_DATE,  ORA-04091: table APPLSYS.FND_PROFILE_OPTIONS is mutating, trigger/function may not see it

ORA-06512: at "APPS.FND_PROFILE", line 177

ORA-06512: at "APPS.FND_PROFILE", line 1716

ORA-06512: at "APPS.ALR_FND_PROFILE_OPTIONS_IAR", line 1

ORA-04088: error during execution of trigger 'APPS.ALR_FND_PROFILE_OPTIONS_IAR'

ORA-06512: at "APPS.FND_PROFILE_OPTIONS_PKG", line 46

ORA-06512: at "APPS.FND_PROFILE_OPTIONS_PKG", line 1238

ORA-01403: no data found

  Error loading seed data for PROFILE:  PROFILE_NAME = AST_WRAPUP_CALL_STATS_END_DATE,  ORA-04091: table APPLSYS.FND_PROFILE_OPTIONS is mutating, trigger/function may not see it

ORA-06512: at "APPS.FND_PROFILE", line 177

ORA-06512: at "APPS.FND_PROFILE", line 1716

ORA-06512: at "APPS.ALR_FND_PROFILE_OPTIONS_IAR", line 1

ORA-04088: error during execution of trigger 'APPS.ALR_FND_PROFILE_OPTIONS_IAR'

ORA-06512: at "APPS.FND_PROFILE_OPTIONS_PKG", line 46

ORA-06512: at "APPS.FND_PROFILE_OPTIONS_PKG", line 1238

ORA-01403: no data found

Concurrent request completed

Current system time is Mon Feb 10 23:00:44 2020

##### SOLUTION #####

ORA-04091: Table APPLSYS.FND_PROFILE_OPTION_VALUES Is Mutating, Trigger/function May Not See

It Error While Running ADOP Prepare Phase from Clone (Doc ID 2481349.1)

[oracle@upgebs log]$ sqlplus apps/apps

SQL*Plus: Release 10.1.0.5.0 - Production on Tue Feb 11 09:34:12 2020

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> Alter TRIGGER APPS.ALR_FND_PROFILE_OPTIONS_IAR disable;

Trigger altered.

SQL>

========================================================================

ERROR (its would be take lots of time during American patch we have applying another patch p20655260_R12.OWF.C_R12_GENERIC.zip)

=========================================================================

 4  Run       AutoPatch R120 pl  wfdspifx.sql                Restarted

sqlplus -s APPS/APPS @/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/adsqlwrapper.sql '/u01/applmgr/upg/fs1/EBSapps/appl/fnd/12.0.0/patch/115/sql/wfdspifx.sql'

Connected.

PL/SQL procedure successfully completed.

###### SOLUTION ######

E:\upgrade_abc_1213_122x\patches\apps\Pre_patch_owf

p20655260_R12.OWF.C_R12_GENERIC

How To Reduce The Size Of Tables WF_LOCAL_ROLES, WF_LOCAL_USER_ROLES, And WF_USER_ROLE_ASSIGNMENTS ? (Doc ID 1454205.1)

-----------------------------------------------------------------------------------------------------------------------

The size of tables wf_local_roles, wf_local_user_roles, and wf_user_role_assignment can be reduced by purging adhoc roles,

and their assignments for expired roles This can be done through the use of either of the following API's:

wf_purge.directory(<end_date>, <orig_system>)

wf_purge.AdHocDirectory(<end_date>)

The API's will purge all roles that past the end_date and with no outstanding notification, and it also checks

the ORIGINAL_RECIPIENT as well as the RECIPIENT_ROLE just in case a 'Delegate' happened, the original owner will not get purged.

Even though the naming convention implies that wf_purge.directory allows purge of roles from different orig_system,

but the API has a hard-coded condition that the roles to be purged are those with orig_system set to WF_LOCAL_ROLES,

or WF_LOCAL_USERS, and partition_id set to zero, to ensure that only expired adhoc roles are purged. So, either of them can be used.

This limitation is an intended design to ensure historical data exists of previous assignments of non-adhoc roles.

To execute the API, please run the following to purge all roles that were expired till current date:

sqlplus apps/<apps_password>

exec WF_PURGE.directory(sysdate);

commit;

 To identify the records that are valid for purging, please use the following query:

select local.NAME, local.ORIG_SYSTEM, local.ORIG_SYSTEM_ID,

          local.USER_FLAG

    from  WF_LOCAL_ROLES local

    where PARTITION_ID = 0

    and   ORIG_SYSTEM in ('WF_LOCAL_ROLES', 'WF_LOCAL_USERS')

    and    EXPIRATION_DATE <= sysdate

    and not exists

          (select NULL

           from   WF_ROLE_HIERARCHIES

           where  SUPER_NAME = local.NAME

           or     SUB_NAME   = local.NAME)

    and not exists

          (select NULL

           from   WF_USER_ROLE_ASSIGNMENTS

           where  USER_NAME = local.NAME

           and     RELATIONSHIP_ID <> -1)

    and not exists

          (select NULL

             from WF_NOTIFICATIONS wn

            where wn.RECIPIENT_ROLE = local.NAME

               or wn.ORIGINAL_RECIPIENT = local.NAME)

    and not exists

          (select NULL

             from WF_ITEMS wi

            where wi.OWNER_ROLE = local.NAME);

The tables affected by the API are as follows:

WF_LOCAL_USER_ROLES

WF_USER_ROLE_ASSIGNMENTS

WF_LOCAL_ROLES

###### Extra Steps ######

[oracle@upgebs trace]$ cd /u01/applmgr/upg/fs1/EBSapps/appl/fnd/12.0.0/patch/115/sql/

[oracle@upgebs sql]$ ls wfdspifx.sql

wfdspifx.sql

[oracle@upgebs sql]$ mv wfdspifx.sql wfdspifx.sql_org

[oracle@upgebs sql]$ pwd

/u01/applmgr/upg/fs1/EBSapps/appl/fnd/12.0.0/patch/115/sql

File "wfdspifx.sql" copy from

windows directory=E:\upgrade_abc_1213_122x\patches\apps\Pre_patch_owf\p20655260_R12.OWF.C_R12_GENERIC\20655260\fnd\patch\115\sql

to fs1 directory=/u01/applmgr/upg/fs1/EBSapps/appl/fnd/12.0.0/patch/115/sql

[oracle@upgebs sql]$ ls wfdspifx.sql

wfdspifx.sql

[oracle@upgebs sql]$ ls wfdspifx.sql*

wfdspifx.sql  wfdspifx.sql_org

[oracle@upgebs sql]$

###### ERROR ######

sqlplus -s APPS/***** @/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/adsqlwrapper.sql '/u01/applmgr/upg/fs1/EBSapps/appl/xla/12.0.0/patch/115/sql/xlaaxuap.sql &un_ax &batchsize'

Connected.

PL/SQL procedure successfully completed.

                AX_DOCUMENT_STATUSES AD,

                *

ERROR at line 549:

ORA-06550: line 549, column 3:

PL/SQL: ORA-00942: table or view does not exist

ORA-06550: line 268, column 9:

PL/SQL: SQL Statement ignored

###### SOLUTION ######

R12 AP/XLA: xlaaxuap.sql Failed With ORA-00942: Table or View Does Not Exist During Upgrade From R12.1.3 To R12.2 (Doc ID 2166763.1)

SQL> conn apps/apps

Connected.

SQL> set lines 250 pages 250

SQL> col OWNER format a20

SQL> col SUBOBJECT_NAME format a20

SQL> col EDITION_NAME format a20

SQL> col EDITION_NAME format a10

SQL> col OBJECT_NAME format a25

SQL> select * from dba_objects where object_name like 'AX_DOCUMENT_STATUSES%';

OWNER      OBJECT_NAME               SUBOBJECT_NAME        OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE             CREATED   LAST_DDL_ TIMESTAMP           STATUS  T G S  NAMESPACE EDITION_NA SHARING       E O

---------- ------------------------- -------------------- ---------- -------------- ----------------------- --------- --------- ------------------- ------- - - - ---------- ---------- ------------- - -

AX         AX_DOCUMENT_STATUSES_U1                             48915          48915 INDEX                   14-NOV-10 14-NOV-10 2010-11-14:10:27:04 VALID   N N N          4            NONE        N

AX         AX_DOCUMENT_STATUSES                                48914          48914 TABLE                   14-NOV-10 17-MAY-13 2010-11-14:10:27:04 VALID   N N N          1            NONE        N

SQL> create synonym AX_DOCUMENT_STATUSES for ax.AX_DOCUMENT_STATUSES ;

Synonym created.

SQL>

Apply American Patch (Upgrade Path)

Merge American Upgrade Patch

Step-1

$ cd $AU_TOP/patch/115/driver

$ ls

augenmsg.drvx  ausstats.drvx  u10124646.drv  u10201000.drv

$ admrgpch -d . -preinstall -master u10124646.drv

Executing the merge of the patch drivers

 -- Processing file: /u01/applmgr/upg/fs1/EBSapps/appl/admin/DELL/preinstall/u28853097.drv

 -- Done processing file: /u01/applmgr/upg/fs1/EBSapps/appl/admin/DELL/preinstall/u28853097.drv

 -- Processing file: u10124646.drv

 -- Done processing file: u10124646.drv

  2 unified drivers merged.

Patch merge completed successfully

Please check the log file at ./admrgpch.log.

$ ls

admrgpch.log  augenmsg.drvx  ausstats.drvx  u10124646.drv  u10201000.drv  u_merged.drv

                                                    Apply American Upgrade Patch

Step-2 

$ adpatch options=nocopyportion,nogenerateportion

Filename [adpatch.log] : 10201000.log

Enter the password for your 'SYSTEM' ORACLE schema: 

Enter the ORACLE password of Application Object Library [APPS] :

The default directory is [/u01/applmgr/upg/fs1/EBSapps/appl/au/12.0.0/patch/115/driver] :

Please enter the name of your AutoPatch driver file : u_merged.drv

sqlplus -s APPS/***** @/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/adsqlwrapper.sql '/u01/applmgr/upg/fs1/EBSapps/appl/ad/12.0.0/sql/adtpurge.sql 10 1000'

Done purging timing information for prior sessions.

AutoPatch is complete.

AutoPatch may have written informational messages to the file

/u01/applmgr/upg/fs1/EBSapps/appl/admin/DELL/log/adpatch.lgi

Errors and warnings are listed in the log file

/u01/applmgr/upg/fs1/EBSapps/appl/admin/DELL/log/adpatch.log

and in other log files in the same directory.

[oracle@upgebs driver]$

AMERICAN PATCH Completed.

Note: You can apply this document its alternate of CUP Patch

R12.1 and 12.2 Oracle E-Business Suite Preinstall Patches Report (Doc ID 1448102.2)