Edition Based Redefinition                           The key to online application upgradeSpreker(s)   :   Jos van den Oor...
Competency Quiz           Does DBA_OBJECTS show all database objects?           Can you create a before insert table trigg...
High availability                   Resource           Solution           Data Center                Data Guard           ...
Application Upgrade           Creation of new objects           Changing existing objects (alter and create or           r...
What we want for Application Upgrades           Elimination downtime during application role out           System continue...
Edition Based Redefinition (EBR)           A single technology that provides high           availability during Upgrades  ...
EBR - Parallel Universes             A revolutionary new capability                       Code changes are installed in th...
Important Oracle RDBMS Changes           New Oracle Objects           Fine Graines Dependency Tracking           Editions ...
Editionable objects                   Editionable             Not Editionable       • PL/SQL Objects               •   Tab...
The Three New Object Types                                      • Editions are isolated environments.                     ...
Edition           Introduced in release 11.2           Set compatibility 11.2           Version control system inside the ...
Edition views - The New Oracle Tables           The FROM LIST – only a single table           Select list is column named ...
Cross Edition Trigger           Temporary – drop after restructured completed           Propagating changes back and forwa...
EBR exercise/planning                                                                  Impacted                           ...
Schema design – NOT EBR                                           Public synonyms                                         ...
Schema design – EBR                                                Views                                               Tri...
Edition Enabled Data Dictionary Views           *_EDITIONS           *_EDITION_COMMENTS           *_VIEWS_AE           *_S...
Edition Enabled Packages           DBMS_EDITIONS_UTILITIES.SET_EDITIONING_VIEWS_READ_           ONLY           DBMS_SESSIO...
APEX and EBR (1)           None Options:                 Alter session set edition                 DBMS_SESSION.set editio...
APEX and EBR (2)           Build on – views on - Editioning Views           Four (!) -tier architecture           Edition ...
Considerations by activating Editions           SCN and commits                 Switching/activating of editions          ...
SQLDeveloper support© COPYRIGHT TRANSFER SOLUTIONS B.V.   22
Demo                                        Questions                                        Answers                      ...
Upcoming SlideShare
Loading in …5
×

Edition based redefinition joords

1,165 views
1,010 views

Published on

Edition Based Redifinition, The key to onine application upgrade.
When upgrading an application or implementation based on PL/SQL
means in generally compile of the PL / SQL procedures.
During this compilationfase end users can not use the application:
they must wait until the entire change in the application is implemented.
During the implementation can be a bit unpredictable behavior.
In Oracle 11g Release 2, this problem is past: by utilizing Edition it is possible to live new code to implement and compile,
in one stroke current is made

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,165
On SlideShare
0
From Embeds
0
Number of Embeds
541
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Edition based redefinition joords

  1. 1. Edition Based Redefinition The key to online application upgradeSpreker(s) : Jos van den OordDatum : 24 oktober 2012E-mail : Jos.van.den.oord@transfer-solutions.com Academy WWW.TRANSFER-SOLUTIONS.COM
  2. 2. Competency Quiz Does DBA_OBJECTS show all database objects? Can you create a before insert table trigger on a view? Can two different views with the same name exist in a schema? Can you replace a PL/SQL object without down-time while it is in use? Can all views be created with a WHERE clause? Can you set the firing order of table triggers? Do you know how to actualize a stored procedure? What does it mean to grant USE to a schema?© COPYRIGHT TRANSFER SOLUTIONS B.V. 2
  3. 3. High availability Resource Solution Data Center Data Guard Server RAC Storage ASM, RAID, Resumable Transactions Network VLANs, Multiplexing, Bonding Corruption RMAN Software Rolling Patches Tables & Indexes Online Redefinition/Create/Alter/Rebuild/Move Parameters Changing of most Oracle parameters (only 90 of the 350 are not online to change) PL/SQL Objects Not Possible© COPYRIGHT TRANSFER SOLUTIONS B.V. 3
  4. 4. Application Upgrade Creation of new objects Changing existing objects (alter and create or replace) Application Add, Modify or Drop columns or constraints Down Change packages and stored procedures Recompile Drop redundant objects Convert or migrate data Resume normal operations© COPYRIGHT TRANSFER SOLUTIONS B.V. 4
  5. 5. What we want for Application Upgrades Elimination downtime during application role out System continue without interrupting for users Upgrade system code and immediately oprational Easy roll forward and backward senario of the application© COPYRIGHT TRANSFER SOLUTIONS B.V. 5
  6. 6. Edition Based Redefinition (EBR) A single technology that provides high availability during Upgrades No disturbing users No corrupt data upgrades that: Reflects pre-upgrade transactions after upgrade Seamlessly rolls changes forward and backward Is safe Is secure Is fully supported by Oracle Is free (no extra licensing cost) Operational on SE and EE© COPYRIGHT TRANSFER SOLUTIONS B.V. 6
  7. 7. EBR - Parallel Universes A revolutionary new capability Code changes are installed in the privacy of an edition Editionable object types PL/SQL objects of all kinds Synonyms Views Three new object types Edition Editioning View Crossedition Trigger Mandatory for all Oracle databases [new|upgrade] 11gR2 editioning© COPYRIGHT TRANSFER SOLUTIONS B.V. 7
  8. 8. Important Oracle RDBMS Changes New Oracle Objects Fine Graines Dependency Tracking Editions – Oracle versioning Solving exclusive lock on table by creating online indexes Cost-Based optimalisations.© COPYRIGHT TRANSFER SOLUTIONS B.V. 8
  9. 9. Editionable objects Editionable Not Editionable • PL/SQL Objects • Tables • Packages • Materialized Views • Procedures • DB Links • Functions • Public Synonyms • Triggers • Views • Synonyms • Types© COPYRIGHT TRANSFER SOLUTIONS B.V. 9
  10. 10. The Three New Object Types • Editions are isolated environments. • A single schema can have two or more versions Edition of stored PL / SQL objects, types and views. [edition:owner:object => unique] • Oracle New Tables • Shield around the existing table. Edition View • References to the table are replaced by references to the edition view. Crossedition • Propagates data changes made by the parent edition into the child edition’s columns, Trigger or (in hot-rollover) vice-versa© COPYRIGHT TRANSFER SOLUTIONS B.V. 10
  11. 11. Edition Introduced in release 11.2 Set compatibility 11.2 Version control system inside the database New dimension or worlds for an Application© COPYRIGHT TRANSFER SOLUTIONS B.V. 11
  12. 12. Edition views - The New Oracle Tables The FROM LIST – only a single table Select list is column named Logical projection of a table structure Edition view and table in same schema One edition view for a table in given database edition An editioning view can NEVER be more complex than this No aggregation or concatenation, No Joins, No WHERE clause, No GROUP BY clause, No ORDER BY clause© COPYRIGHT TRANSFER SOLUTIONS B.V. 12
  13. 13. Cross Edition Trigger Temporary – drop after restructured completed Propagating changes back and forward between two versions Forward Crossedition Triggers Reverse Crossedition Triggers Crossedition Trigger Interaction with Editions Firing Order Follows and Precedes Clauses Not visible to end-users© COPYRIGHT TRANSFER SOLUTIONS B.V. 13
  14. 14. EBR exercise/planning Impacted Editions Editions views TRIGGERSTRIGERSriggersg Forward crossedition trigers triggers Reverse crossedition Application Upgrade Change only editioned objects Make only additive table changes Change only non-transaction tables Change the structure of transaction tables non-additively Support hot rollover© COPYRIGHT TRANSFER SOLUTIONS B.V. 14
  15. 15. Schema design – NOT EBR Public synonyms Views Grants, Roles, Privs VPD policies Table VPD policies Materialized views Constraints Triggers IDX_1 IDX_2 AQ interfaces© COPYRIGHT TRANSFER SOLUTIONS B.V. 15
  16. 16. Schema design – EBR Views Triggers Edition Grants, Roles, Privs VPD policies Views Synonyms Source Table Auditing Crossedition triggers Materialized views AQ interfaces IDX_1 IDX_2 Contraints© COPYRIGHT TRANSFER SOLUTIONS B.V. 16
  17. 17. Edition Enabled Data Dictionary Views *_EDITIONS *_EDITION_COMMENTS *_VIEWS_AE *_SOURCE_AE *_OBJECTS_AE *_ERRORS_AE *_EDITIONING_VIEWS_AE *_EDITIONING_VIEW_COLS_AE AUD$ (obj$edition) FGA_LOG$ (obj$edition) DBA_OBJETCS (edition_name) DBA_USERS (edition enabled) V$SESSION (session_edition_id) AE = All Editions© COPYRIGHT TRANSFER SOLUTIONS B.V. 17
  18. 18. Edition Enabled Packages DBMS_EDITIONS_UTILITIES.SET_EDITIONING_VIEWS_READ_ ONLY DBMS_SESSION.SET_EDITION_DEFERRED (<EDITION_NAME> ) DBMS_METADATA_UTIL.GET_EDITIONID DBMS_PARALLEL_EXECUTE.RESUME_TASK DBMS_PARALLEL_EXECUTE.RUN_TASK DBMS_SQL.PARSE DBMS_UTILITY.VALIDATE© COPYRIGHT TRANSFER SOLUTIONS B.V. 18
  19. 19. APEX and EBR (1) None Options: Alter session set edition DBMS_SESSION.set edition_deferred Apex 4.0 apex_util.set_edition() dbms_epg.set_dad_attribute(APEX, database- edition, HR_RELEASE2); Syntax error on line 48 of /home/oracle/OraHome_1/Apache/modplsql/conf/dads.conf: Invalid command PlsqlDatabaseEdition, perhaps mis-spelled or defined by a module not included in the server© COPYRIGHT TRANSFER SOLUTIONS B.V. 19
  20. 20. APEX and EBR (2) Build on – views on - Editioning Views Four (!) -tier architecture Edition your Views or PL/SQL Functions Use Authorization Schemes UI / APEX (Regular) View Editioning View Table© COPYRIGHT TRANSFER SOLUTIONS B.V. 20
  21. 21. Considerations by activating Editions SCN and commits Switching/activating of editions Inserts/updates delets full table Locks Bulk inserts/updates,deletes on a table columns Change column size Impacted on other objects© COPYRIGHT TRANSFER SOLUTIONS B.V. 21
  22. 22. SQLDeveloper support© COPYRIGHT TRANSFER SOLUTIONS B.V. 22
  23. 23. Demo Questions Answers CONSULTING | MANAGED SERVICES | EDUCATION WWW.TRANSFER-SOLUTIONS.COM© COPYRIGHT TRANSFER SOLUTIONS B.V. 23

×