Edition based redefinition joords
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Edition based redefinition joords

on

  • 1,562 views

 

Statistics

Views

Total Views
1,562
Views on SlideShare
448
Embed Views
1,114

Actions

Likes
1
Downloads
7
Comments
0

5 Embeds 1,114

http://joordsblog.vandenoord.eu 1083
http://5532576497841734741_dafcbc5da3e3353f7c86b239e1f2496b4f707c13.blogspot.com 20
http://www.rssletter.com 6
http://feeds.feedburner.com 4
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Edition based redefinition joords Presentation Transcript

  • 1. Edition Based Redefinition The key to online application upgradeSpreker(s) : Jos van den OordDatum : 14 februari 2013E-mail : Jos.van.den.oord@transfer-solutions.com Cafe WWW.TRANSFER-SOLUTIONS.COM
  • 2. Overview Oracle High availability components The traditional application upgrade scenario Edition Based Redefinition Components of Edition Based Redefinition New schema design Overview using Edition Based Redefinition Demos Summary© COPYRIGHT TRANSFER SOLUTIONS B.V. 2
  • 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 – view Not Possible Objects© COPYRIGHT TRANSFER SOLUTIONS B.V. 3
  • 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. What do we want for Application Upgrades Elimination downtime during application roll out System continue without interrupting for users Upgrade system code and immediately operational Easy roll forward and backward scenario for the application© COPYRIGHT TRANSFER SOLUTIONS B.V. 5
  • 6. Edition Based Redefinition (EBR) A single technology that provides high availability during Upgrades No disturbing users No corrupt data 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. Edition Introduced in release 11.2 Set compatibility 11.2 Version control system inside the database New dimensions or worlds for an Application© COPYRIGHT TRANSFER SOLUTIONS B.V. 7
  • 8. Important Oracle RDBMS 11gR2 Changes New Oracle Objects Fine Grained Dependency Tracking Editions – Oracle versioning Solving exclusive lock on table by creating online indexes Cost-Based optimalisations© COPYRIGHT TRANSFER SOLUTIONS B.V. 8
  • 9. Editionable objects Editionable Not Editionable • PL/SQL Objects • Tables • Packages • Materialized Views • Procedures • DB Links • Functions • Public Synonyms • Triggers • Views • Private Synonyms • Types© COPYRIGHT TRANSFER SOLUTIONS B.V. 9
  • 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 • A 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. Edition views - The New Oracle Tables The from list is only a single table The 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 edition view can NEVER be complex© COPYRIGHT TRANSFER SOLUTIONS B.V. 11
  • 12. Cross Edition Trigger 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 Temporary Solution© COPYRIGHT TRANSFER SOLUTIONS B.V. 12
  • 13. EBR - Parallel Universes - Summary 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. 13
  • 14. 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. 14
  • 15. Schema design – EBR Views Triggers Edition Grants, Roles, Privs VPD policies Views Synonyms Source Table Auditing Cross-edition triggers Materialized views AQ interfaces IDX_1 IDX_2 Contraints© COPYRIGHT TRANSFER SOLUTIONS B.V. 15
  • 16. EBR Implementation Application Servers Application Servers Network Network PL/SQL Objects PL/SQL Objects PL/SQL Objects Edition Views Triggers Triggers Tables Tables Triggers Triggers Crossedition Triggers ORA$BASE EBR version 1© COPYRIGHT TRANSFER SOLUTIONS B.V. 16
  • 17. Edition Enabled Data Dictionary Views *_EDITIONS *_EDITION_COMMENTS *_EDITIONING_VIEWS_AE *_EDITIONING_VIEW_COLS_AE AUD$ (obj$edition) FGA_LOG$ (obj$edition) DBA_OBJECTS (edition_name) DBA_USERS (edition enabled) V$SESSION (session_edition_id) *_VIEWS_AE *_SOURCE_AE *_OBJECTS_AE *_ERRORS_AE AE = All Editions© COPYRIGHT TRANSFER SOLUTIONS B.V. 17
  • 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.CREATE_TASK DBMS_PARALLEL_EXECUTE.RESUME_TASK DBMS_PARALLEL_EXECUTE.RUN_TASK DBMS_SQL.PARSE DBMS_UTILITY.WAIT_ON_PENDING_DML DBMS_UTILITY.VALIDATE© COPYRIGHT TRANSFER SOLUTIONS B.V. 18
  • 19. Considerations by activating Editions SCN and commits Switching/activating of editions Inserts/updates/deletes full table Locks Bulk inserts,updates,deletes on table columns Change column size Impact on other objects© COPYRIGHT TRANSFER SOLUTIONS B.V. 19
  • 20. APEX and EBR (1) Wrong Options: Alter session set edition DBMS_SESSION.set edition_deferred Apex 4.0 dads.conf : PlsqlDatabaseEdition apex_util.set_edition() dbms_epg.set_dad_attribute( dad_name => APEX, attr_name =>database-edition, attr_value => HR_RELEASE2);© COPYRIGHT TRANSFER SOLUTIONS B.V. 20
  • 21. APEX and EBR (2) Build on – views on - Edition Views Four (!) -tier architecture Edition your Views or PL/SQL Functions Use Authorization Schemes UI / APEX (Regular) View or PL/SQL Editioning View Table© COPYRIGHT TRANSFER SOLUTIONS B.V. 21
  • 22. SQLDeveloper support© COPYRIGHT TRANSFER SOLUTIONS B.V. 22
  • 23. Demos Play with editions Add column Split column name into first- last name User with grants to objects to editionable objects© COPYRIGHT TRANSFER SOLUTIONS B.V. 23
  • 24. 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. 24
  • 25. Schema design – EBR Views Triggers Edition Grants, Roles, Privs VPD policies Views Synonyms Source Table Auditing Cross-edition triggers Materialized views AQ interfaces IDX_1 IDX_2 Contraints© COPYRIGHT TRANSFER SOLUTIONS B.V. 25
  • 26. EBR exercise/planning Editions Editions views Forward crossedition trigger Reverse crossedition trigger Application Upgrade Change only editioned objects Change the structure of transaction tables Support hot rollover© COPYRIGHT TRANSFER SOLUTIONS B.V. 26
  • 27. Questions Answers CONSULTING | MANAGED SERVICES | EDUCATION WWW.TRANSFER-SOLUTIONS.COM© COPYRIGHT TRANSFER SOLUTIONS B.V. 27