SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
Edition Based Redefinition
                           The key to online application upgrade




Spreker(s)   :   Jos van den Oord
Datum        :   14 februari 2013
E-mail       :   Jos.van.den.oord@transfer-solutions.com                Cafe
                                           WWW.TRANSFER-SOLUTIONS.COM
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
SQLDeveloper support




© COPYRIGHT TRANSFER SOLUTIONS B.V.   22
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
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
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
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
Questions
                                        Answers


                             CONSULTING | MANAGED SERVICES | EDUCATION


                           WWW.TRANSFER-SOLUTIONS.COM

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                      27

Contenu connexe

Tendances

Lync Server 2010: High Availability [I3004]
Lync Server 2010: High Availability [I3004] Lync Server 2010: High Availability [I3004]
Lync Server 2010: High Availability [I3004] Fabrizio Volpe
 
CloudBees PaaS Presentation at Oakland JUG
CloudBees PaaS Presentation at Oakland JUGCloudBees PaaS Presentation at Oakland JUG
CloudBees PaaS Presentation at Oakland JUGCloudBees
 
SQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciSQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciMark Ginnebaugh
 
The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012Lucas Jellema
 
Stairway to heaven webinar
Stairway to heaven webinarStairway to heaven webinar
Stairway to heaven webinarCloudBees
 
Spring, Java Web Apps to the cloud
Spring, Java Web Apps to the cloudSpring, Java Web Apps to the cloud
Spring, Java Web Apps to the cloudCloudBees
 
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012ITCamp
 
Patterns of Data Distribution
Patterns of Data DistributionPatterns of Data Distribution
Patterns of Data DistributionRick Warren
 
Effective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database MirroringEffective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database Mirroringwebhostingguy
 
Architecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud ExpoArchitecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud Exposmw355
 
SDEC2011 Going by TACC
SDEC2011 Going by TACCSDEC2011 Going by TACC
SDEC2011 Going by TACCKorea Sdec
 
Virtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireVirtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireCarter Shanklin
 
The Art & Sience of Optimization
The Art & Sience of OptimizationThe Art & Sience of Optimization
The Art & Sience of OptimizationHertzel Karbasi
 
Data Science Day New York: The Platform for Big Data
Data Science Day New York: The Platform for Big DataData Science Day New York: The Platform for Big Data
Data Science Day New York: The Platform for Big DataCloudera, Inc.
 
Orders of-magnitude-scale-out-your-sql-server-data-slideshare
Orders of-magnitude-scale-out-your-sql-server-data-slideshareOrders of-magnitude-scale-out-your-sql-server-data-slideshare
Orders of-magnitude-scale-out-your-sql-server-data-slideshareMark Broadbent
 
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013Michael Noel
 

Tendances (20)

Lync Server 2010: High Availability [I3004]
Lync Server 2010: High Availability [I3004] Lync Server 2010: High Availability [I3004]
Lync Server 2010: High Availability [I3004]
 
CloudBees PaaS Presentation at Oakland JUG
CloudBees PaaS Presentation at Oakland JUGCloudBees PaaS Presentation at Oakland JUG
CloudBees PaaS Presentation at Oakland JUG
 
SQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciSQL Server Workshop Paul Bertucci
SQL Server Workshop Paul Bertucci
 
The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012
 
Stairway to heaven webinar
Stairway to heaven webinarStairway to heaven webinar
Stairway to heaven webinar
 
Spring, Java Web Apps to the cloud
Spring, Java Web Apps to the cloudSpring, Java Web Apps to the cloud
Spring, Java Web Apps to the cloud
 
SQL Server User Group 02/2009
SQL Server User Group 02/2009SQL Server User Group 02/2009
SQL Server User Group 02/2009
 
SQL Server High Availability
SQL Server High AvailabilitySQL Server High Availability
SQL Server High Availability
 
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
 
Patterns of Data Distribution
Patterns of Data DistributionPatterns of Data Distribution
Patterns of Data Distribution
 
Effective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database MirroringEffective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database Mirroring
 
Architecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud ExpoArchitecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud Expo
 
SDEC2011 Going by TACC
SDEC2011 Going by TACCSDEC2011 Going by TACC
SDEC2011 Going by TACC
 
Virtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireVirtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFire
 
The Art & Sience of Optimization
The Art & Sience of OptimizationThe Art & Sience of Optimization
The Art & Sience of Optimization
 
Data Science Day New York: The Platform for Big Data
Data Science Day New York: The Platform for Big DataData Science Day New York: The Platform for Big Data
Data Science Day New York: The Platform for Big Data
 
Oracle goldengate ogg
Oracle goldengate oggOracle goldengate ogg
Oracle goldengate ogg
 
Orders of-magnitude-scale-out-your-sql-server-data-slideshare
Orders of-magnitude-scale-out-your-sql-server-data-slideshareOrders of-magnitude-scale-out-your-sql-server-data-slideshare
Orders of-magnitude-scale-out-your-sql-server-data-slideshare
 
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
 
User Group Bi
User Group BiUser Group Bi
User Group Bi
 

Similaire à Edition based redefinition joords

Lap Around Sql Azure
Lap Around Sql AzureLap Around Sql Azure
Lap Around Sql AzureAnko Duizer
 
DB Luminous... Know Your Data
DB Luminous... Know Your DataDB Luminous... Know Your Data
DB Luminous... Know Your DataRuss Pierce
 
Cloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleCloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleBob Rhubart
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT SimpleBob Rhubart
 
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Anton Arhipov
 
Best practices for effective doors implementation-Ashwini Patil
Best practices for effective doors implementation-Ashwini PatilBest practices for effective doors implementation-Ashwini Patil
Best practices for effective doors implementation-Ashwini PatilRoopa Nadkarni
 
Microsoft SQL Server 2012
Microsoft SQL Server 2012 Microsoft SQL Server 2012
Microsoft SQL Server 2012 Dhiren Gala
 
Continuous DB migration based on carbon5 framework
Continuous DB migration based on carbon5 frameworkContinuous DB migration based on carbon5 framework
Continuous DB migration based on carbon5 frameworkb0ris_1
 
Борис Трофимов. Continuous Database migration-это просто!
Борис Трофимов. Continuous Database migration-это просто!Борис Трофимов. Continuous Database migration-это просто!
Борис Трофимов. Continuous Database migration-это просто!Volha Banadyseva
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always ondilip nayak
 
Malone r12 upgrade-versus-reimplementation
Malone r12 upgrade-versus-reimplementationMalone r12 upgrade-versus-reimplementation
Malone r12 upgrade-versus-reimplementationThanapan Ittisakulchai
 
Industrial and Academic Experiences with a User Interaction Modeling Language...
Industrial and Academic Experiences with a User Interaction Modeling Language...Industrial and Academic Experiences with a User Interaction Modeling Language...
Industrial and Academic Experiences with a User Interaction Modeling Language...Marco Brambilla
 
M3 Modernization Case Study
M3 Modernization Case StudyM3 Modernization Case Study
M3 Modernization Case StudyADC Austin Tech
 
Showbox 2 2012
Showbox 2 2012Showbox 2 2012
Showbox 2 2012jboo2
 
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?DATAVERSITY
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part isqlserver.co.il
 

Similaire à Edition based redefinition joords (20)

Edition based redefinition joords
Edition based redefinition joordsEdition based redefinition joords
Edition based redefinition joords
 
Lap Around Sql Azure
Lap Around Sql AzureLap Around Sql Azure
Lap Around Sql Azure
 
DB Luminous... Know Your Data
DB Luminous... Know Your DataDB Luminous... Know Your Data
DB Luminous... Know Your Data
 
Cloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleCloud Computing: Making IT Simple
Cloud Computing: Making IT Simple
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT Simple
 
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
 
Best practices for effective doors implementation-Ashwini Patil
Best practices for effective doors implementation-Ashwini PatilBest practices for effective doors implementation-Ashwini Patil
Best practices for effective doors implementation-Ashwini Patil
 
Microsoft SQL Server 2012
Microsoft SQL Server 2012 Microsoft SQL Server 2012
Microsoft SQL Server 2012
 
Sybase To Oracle Migration for DBAs
Sybase To Oracle Migration for DBAsSybase To Oracle Migration for DBAs
Sybase To Oracle Migration for DBAs
 
Continuous DB migration based on carbon5 framework
Continuous DB migration based on carbon5 frameworkContinuous DB migration based on carbon5 framework
Continuous DB migration based on carbon5 framework
 
Борис Трофимов. Continuous Database migration-это просто!
Борис Трофимов. Continuous Database migration-это просто!Борис Трофимов. Continuous Database migration-это просто!
Борис Трофимов. Continuous Database migration-это просто!
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
Malone r12 upgrade-versus-reimplementation
Malone r12 upgrade-versus-reimplementationMalone r12 upgrade-versus-reimplementation
Malone r12 upgrade-versus-reimplementation
 
Industrial and Academic Experiences with a User Interaction Modeling Language...
Industrial and Academic Experiences with a User Interaction Modeling Language...Industrial and Academic Experiences with a User Interaction Modeling Language...
Industrial and Academic Experiences with a User Interaction Modeling Language...
 
Subversion and bug tracking
Subversion and bug trackingSubversion and bug tracking
Subversion and bug tracking
 
M3 Modernization Case Study
M3 Modernization Case StudyM3 Modernization Case Study
M3 Modernization Case Study
 
Showbox 2 2012
Showbox 2 2012Showbox 2 2012
Showbox 2 2012
 
Why you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloudWhy you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloud
 
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part i
 

Edition based redefinition joords

  • 1. Edition Based Redefinition The key to online application upgrade Spreker(s) : Jos van den Oord Datum : 14 februari 2013 E-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