oracle applications r12.2, ebr, online patching - means ... · pdf fileoracle e-business suite...

30
ORACLE APPLICATIONS R12.2, EBR, ONLINE P ATCHING -MEANS L OT OF WORK FOR DEVELOPERS Ajith Narayanan 25 th Feb 2015, Bangalore, India

Upload: duongtuong

Post on 02-Feb-2018

238 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

ORACLE APPLICATIONS R12.2, EBR, ONLINE

PATCHING - MEANS LOT OFWORK FORDEVELOPERS

Ajith Narayanan

25th Feb 2015, Bangalore, India

Page 2: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

INTRODUCTION TO R12.2 ARCHITECTURE

Page 5: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

R12.2 Architecture

Page 6: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 previousreleases.

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

Page 7: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

R12.2 Architecture

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

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

Page 8: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

R12.2 Architecture

Page 9: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

ONLINE PATCHINGCONCEPTS

Page 10: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

Edition Based Redefinition (EBR)

Database Considerations

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

• As not all database objects are editioned, and because the definition of one objectmay depend on another object, for editioning to be enabled successfully theremust 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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

Logical View

Page 14: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

Logical View

Page 15: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

Example

Page 16: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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

patches while the system is up and running, and the users areworking 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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

DEVELOPMENT STANDARDS

Page 19: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

DEVELOPMENT STEPS

Page 21: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 thecolumn 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.LCTmy_table.ldt my_table

Page 24: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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: ViewsUTables, 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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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: ViewsUTables, 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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

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 28: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

What is the extra work for a developer?

Page 29: Oracle Applications R12.2, EBR, Online Patching - Means ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

References

Deploying 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 ... · PDF fileOracle E-Business Suite Release 12.2 Information Center ... Microsoft PowerPoint - Oracle Applications R12.2,

Q&AE-mail:- [email protected]