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 Narayanan
25th Feb 2015, Bangalore, India
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
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
R12.2 Architecture
Oracle 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.
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.
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
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
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
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]
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 done
N denotes that the phase has not been completed
X denotes that the phase is not applicable
R denotes that the phase is running (in progress)
F denotes that the phase has failed
P (is applicable only to APPLY phase) denotes at least one patch is
already applied for the session id
C 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 completed
0 denotes that cutover/force_shutdown has started
1 denotes the "force_shutdown" step has successfully executed
3 denotes the "db_cutover" step has successfully executed
4 denotes the "fs_cutover" step has successfully executed
6 denotes the "force_startup" step has successfully executed
Y denotes that the phase is done
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||'#'
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)
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)
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
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: Views Tables, 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
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
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: Views Tables, 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
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
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)
This template can be used as a starter file for presenting training materials in a group setting.
Sections
Right-click on a slide to add sections. Sections can help to organize your slides or facilitate collaboration between multiple authors.
Notes
Use the Notes section for delivery notes or to provide additional details for the audience. View these notes in Presentation View during your presentation.
Keep in mind the font size (important for accessibility, visibility, videotaping, and online production)
Coordinated colors
Pay particular attention to the graphs, charts, and text boxes.
Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale.
Graphics, tables, and graphs
Keep it simple: If possible, use consistent, non-distracting styles and colors.
Label all graphs and tables.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
This is another option for an Overview slides using transitions.