30
ORACLE APPLICATIONS R12.2, EBR, ONLINE PATCHING - MEANS LOT OF WORK FOR DEVELOPERS Ajith Narayanan 25 th Feb 2015, Bangalore, India

Oracle applications r12.2, ebr, online patching means lot of work for developers

Embed Size (px)

Citation preview

Page 1: Oracle applications r12.2, ebr, online patching   means lot of work for developers

ORACLE APPLICATIONS R12.2, EBR, ONLINE PATCHING - MEANS LOT OF WORK FOR DEVELOPERS

Ajith Narayanan25th Feb 2015, Bangalore, India

Page 2: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Who Am I?Ajith Narayanan• Oracle ACE Associate • 11 years of Oracle [APPS] DBA experience.• Blogger :-

http://oracledbascriptsfromajith.blogspot.com• Speaker:- Conferences Of AIOUG, DOAG, NZOUG,

UKOUG, OTNYathra , OTN APAC Tour etc.• Website Chair (2010 -2013) :- ORACLERACSIG (

http://www.oracleracsig.org)• Member:- OAUG & AIOUG, ORACLERACSIG• AIOUG Real Application Clusters SIG Leader

Page 3: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Agenda• Introduction to R12.2 Architecture• Online Patching Concepts

Edition Based Redefinition (EBR) Rules for EBR

• Development Standards What is the extra work for a developer?

• Development Steps Examples

•Questions

Page 4: Oracle applications r12.2, ebr, online patching   means lot of work for developers

INTRODUCTION TO R12.2

ARCHITECTURE

Company Logo

Page 5: Oracle applications r12.2, ebr, online patching   means lot of work for developers

R12.2 Architecture

Page 6: Oracle applications r12.2, ebr, online patching   means lot of work for developers

R12.2 ArchitectureOracle E-Business Suite Release 12.2 uses two application tier ORACLE_HOMEs.

• An OracleAS 10.1.2 ORACLE_HOME that was used in previous 12.x releases.

• An Oracle Fusion Middleware (FMW) ORACLE_HOME that supports Oracle WebLogic Server (WLS) and supersedes the Java (OracleAS 10.1.3) ORACLE_HOME that was used in previous releases.

• The use of these two ORACLE_HOMEs enables Oracle E-Business Suite to take advantage of the latest Oracle technologies.

Page 7: Oracle applications r12.2, ebr, online patching   means lot of work for developers

R12.2 Architecture

• The Oracle E-Business Suite modules (packaged in the file formsapp.ear) are deployed out of the OracleAS 10.1.2 ORACLE_HOME, and the frmweb executable is also invoked out of this ORACLE_HOME.

• All major services are started out of the Fusion Middleware ORACLE_HOME.

Page 8: Oracle applications r12.2, ebr, online patching   means lot of work for developers

R12.2 Architecture

Page 9: Oracle applications r12.2, ebr, online patching   means lot of work for developers

ONLINE PATCHING CONCEPTS

Company Logo

Page 10: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Edition Based Redefinition (EBR)• An edition as name suggests is virtual workspace environment where

database objects are redefined and finalized as final version if satisfied.

• Edition-Based Redefinition can enable us to have two objects with the same name but of Different Editions.

• EBR feature started from Oracle 11g R2 onwards, and all database by default has a base edition named “ORA$BASE”.

Objects that are editionable :- FUNCTION LIBRARY PACKAGE and PACKAGE BODY PROCEDURE TRIGGER TYPE and TYPE BODY SYNONYM VIEW

Related MOS ID:- 1489116.1

Page 11: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Edition Based Redefinition (EBR)Database Considerations

• As EBR is enabled per database user, the potentially editionable objects in a particular schema are all either editioned or not (internal database users such as SYS, SYSTEM, and PUBLIC cannot be editioned).

• As not all database objects are editioned, and because the definition of one object may depend on another object, for editioning to be enabled successfully there must be no dependencies of non-editioned objects on editioned objects.

• Potential violations here fall into the following categories:

PUBLIC synonyms to editioned objects Tables and queues that depend on editioned user defined types (UDTs) Materialized views that depend on editioned objects Custom and third-party schemas that depend on editioned objects Non-APPS synonyms on Oracle E-Business Suite tables

Related MOS ID:- 1489116.1

Page 12: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Rules for EBR• A non-editioned object cannot depend on an editioned object.• A public synonym cannot refer to an editioned object. (why APPS-owned

synonyms take precedence)

• A function-based index cannot depend on an editioned function.• A materialized view cannot depend on an editioned view. (why a lot of

MV’s are invalidated in 12.2)• A table cannot have a column of a user-defined data type whose owner

is editions enabled (APPS is, APPS_NE isn’t.)• A noneditioned subprogram cannot have a static reference to a

subprogram whose owner is editions-enabled. (APPS_NE.<package> cannot reference APPS.<function>)

Related MOS ID:- 1489116.1

Page 13: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Logical View

Page 14: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Logical View

Page 15: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Example

Page 16: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Online Patching?• New patching mechanism that allows the application of patches

while the system is up and running, and the users are working as normal

Phases that make up the Online Patching cycle? Prepare a virtual copy (patch edition) of the running application (run edition). Apply patches to the patch edition of the application. Finalize the system in readiness for the cutover phase. Cutover to the patch edition and make it the new run edition. Cleanup obsolete definitions or data to recover space.

When a patch is applied, adop will: Synchronize the contents of the run file system to the patch FS (phase=prepare) Apply patching actions on the patch file system. (phase=apply) During the cutover phase, the adop utility (phase=cutover) : Restarts the application tier services. Swap [Patch FS] -> [Run FS]

Page 17: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Online Patching?SELECT DOP_SESSION_ID,PREPARE_STATUS,APPLY_STATUS,FINALIZE_STATUS,CUTOVER_STATUS,CLEANUP_STATUS,ABORT_STATUS,STATUS,ABANDON_FLAG,NODE_NAME FROM AD_ADOP_SESSIONS ORDER BY ADOP_SESSION_ID;

Note:Y denotes that the phase is doneN denotes that the phase has not been completedX denotes that the phase is not applicableR denotes that the phase is running (in progress)F denotes that the phase has failedP (is applicable only to APPLY phase) denotes at least one patch isalready applied for the session idC denotes that the status of this ADOP session has completed

Note:The following Numerical statuses are only relevant for the cutover phase...These status values are updated when a step has completed, and are as follows:N denotes that the phase has not been completed0 denotes that cutover/force_shutdown has started1 denotes the "force_shutdown" step has successfully executed3 denotes the "db_cutover" step has successfully executed4 denotes the "fs_cutover" step has successfully executed6 denotes the "force_startup" step has successfully executedY denotes that the phase is done

Page 18: Oracle applications r12.2, ebr, online patching   means lot of work for developers

DEVELOPMENT STANDARDS

Company Logo

Page 19: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?• Table Names must be unique at 29 bytes or less

The Editioning Views will have suffix of # added to them automatically

This is done with a substr(table_name,1,29) • Column Names must be 28 bytes or less

A Revised Column Name has the form: <logical_column_name>#<version_tag> Version_tag is a string of the form: [0-9A-Z]

• Forward Cross-Edition Triggers <table_name>_F<change_number>

• Suffix + are the EBR DB Triggers on Seed Data • A Materialized View Definition must be stored in an

ordinary view called MV_NAME||'#'

Page 20: Oracle applications r12.2, ebr, online patching   means lot of work for developers

DEVELOPMENT STEPS

Company Logo

Page 21: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?General Steps 1.Develop customization in the run edition of your non-PROD environment

–Both DB and OS File System –Object specific steps we will talk about below –Recompile invalids (ad_zd.compile)

2.Create the patch (manually create patch actions)

3.Test the patch

• Deploying Customizations in Oracle E-Business Suite Release 12.2 (MOS Doc ID 1577661.1)

Page 22: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?• An Edition Synonym will point to the correct version of the

Table 1. 1.Make your table changes 2. 2.Regenerate the edition view (ad_zd_table.patch) 3. 3.Upgrade table for Edition Storage (ad_zd_seed.upgrade) 4. 4.Create loader LCT for Seed Data 5. 5.Create Forward Crossedition Trigger (FCET)

– This keeps data in sync with the new data representation • 6.Create Reverse Crossedition Trigger (RCET)

– This keeps data in sync with the old data representation • 7.Extract updated table defintion (xdfgen.pl) • 8.Extract Seed Data (FNDLOAD) • 9.Recompile invalids (ad_zd.compile)

Page 23: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?• Seed Data tables must include a new column

ZD_EDITION_NAME • This is used to present a consistent view of the data based

on the Edition. 1.Create initial table definition Table must go in APPS_TS_SEED tablespace

2.Upgrade table to support Editioned Storage (ad_zd_seed.upgrade) This adds the column ZD_EDITION_NAME

3.Manually insert new Seed Data records into table

4.Create a Loader Control File for Seed Data FNDLOAD *.LCT file

5.Extract Seed Data FNDLOAD apps/<apps_pwd> 0 Y DOWNLOAD my_table.LCT my_table.ldt my_table

Page 24: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?• Not using an APPS.<editioned object synonym>

– Views: disappearing/appearing columns, indexes, even data– PL/SQL: dropped/altered/changed API’s, usage, references– Triggers: disappearing/appearing constraints, functional changes– Types: disappearing/appearing columns, indexes, even data– Synonyms: pointers change: ViewsTables, all the above• Invalid Objects Appear After Patching• Functional Code Behavior Changes After Patching• If another Developer is using an Edition:• The DEFAULT_EDITION can change without warning

Page 25: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?

Always Be Aware of other Patching or Development activity going on in the instance.

• Stage Filesystem-based Code in both RUN_BASE and PATCH_BASE• Scheduling of Data Changes is Critical (changes can vanish)• Announce to all other Users if Creating/Cutting-Over a New Edition• Flag all Base-Object Customizations for Detection during PPA

Page 26: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?• Not using an APPS.<editioned object synonym>

– Views: disappearing/appearing columns, indexes, even data– PL/SQL: dropped/altered/changed API’s, usage, references– Triggers: disappearing/appearing constraints, functional changes– Types: disappearing/appearing columns, indexes, even data– Synonyms: pointers change: ViewsTables, all the above

• Invalid Objects Appear After Patching• Functional Code Behavior Changes After Patching• If another Developer is using an Edition:The DEFAULT_EDITION can change without warning

Page 27: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?Always Be Aware of other Patching or Development activity going on inthe instance• Stage Filesystem-based Code in both RUN_BASE and PATCH_BASE• Scheduling of Data Changes is Critical (changes can vanish)• Announce to all other Users if Creating/Cutting-Over a New Edition• Flag all Base-Object Customizations for Detection during PPA

Page 28: Oracle applications r12.2, ebr, online patching   means lot of work for developers

What is the extra work for a developer?

Page 29: Oracle applications r12.2, ebr, online patching   means lot of work for developers

ReferencesDeploying Customizations in Oracle E-Business Suite Release 12.2 (Doc ID 1577661.1)

Master Note: Overview of Oracle Edition-Based Redefinition (EBR)(Doc ID 1489116.1)

Oracle E-Business Suite Release 12.2: Online Patching FAQ(Doc ID 1583902.1)

Oracle Application Framework Release Notes for Release 12.2.3(Doc ID 1593782.1)Where to Deploy Custom Java [default: $JAVA_TOP/*] (Doc ID 1609939.1)

Oracle E-Business Suite Release 12.2 Information Center(Doc ID 1583153.1)

Page 30: Oracle applications r12.2, ebr, online patching   means lot of work for developers

Q&AE-mail:- [email protected]