SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Edition Based Redefinition
                           The key to online application upgrade




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




© COPYRIGHT TRANSFER SOLUTIONS B.V.   22
Demo
                                        Questions
                                        Answers


                             CONSULTING | MANAGED SERVICES | EDUCATION


                           WWW.TRANSFER-SOLUTIONS.COM

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                      23

Weitere ähnliche Inhalte

Was ist angesagt?

What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OSWhat’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OSSurekha Parekh
 
Microsoft SQL Server Distributing Data with R2 Bertucci
Microsoft SQL Server Distributing Data with R2 BertucciMicrosoft SQL Server Distributing Data with R2 Bertucci
Microsoft SQL Server Distributing Data with R2 BertucciMark Ginnebaugh
 
DB2 for i 7.1 - Whats New?
DB2 for i 7.1 - Whats New?DB2 for i 7.1 - Whats New?
DB2 for i 7.1 - Whats New?COMMON Europe
 
Axis2 architecture and implementation
Axis2 architecture and implementationAxis2 architecture and implementation
Axis2 architecture and implementationSreeni I
 
MySQL high availability power and usability
MySQL high availability power and usabilityMySQL high availability power and usability
MySQL high availability power and usabilityGiuseppe Maxia
 
Throughput comparison: Dell PowerEdge R720 drive options
Throughput comparison: Dell PowerEdge R720 drive optionsThroughput comparison: Dell PowerEdge R720 drive options
Throughput comparison: Dell PowerEdge R720 drive optionsPrincipled Technologies
 
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
 
Engineered Systems: Oracle’s Vision for the Future
Engineered Systems: Oracle’s Vision for the FutureEngineered Systems: Oracle’s Vision for the Future
Engineered Systems: Oracle’s Vision for the FutureBob Rhubart
 
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
 
SQLFire at VMworld Europe 2011
SQLFire at VMworld Europe 2011SQLFire at VMworld Europe 2011
SQLFire at VMworld Europe 2011Carter Shanklin
 
Ms Sql Server Black Book
Ms Sql Server Black BookMs Sql Server Black Book
Ms Sql Server Black BookLiquidHub
 
SQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciSQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciMark Ginnebaugh
 

Was ist angesagt? (19)

What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OSWhat’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
 
JDBC
JDBC JDBC
JDBC
 
Microsoft SQL Server Distributing Data with R2 Bertucci
Microsoft SQL Server Distributing Data with R2 BertucciMicrosoft SQL Server Distributing Data with R2 Bertucci
Microsoft SQL Server Distributing Data with R2 Bertucci
 
DB2 for i 7.1 - Whats New?
DB2 for i 7.1 - Whats New?DB2 for i 7.1 - Whats New?
DB2 for i 7.1 - Whats New?
 
Axis2 architecture and implementation
Axis2 architecture and implementationAxis2 architecture and implementation
Axis2 architecture and implementation
 
MySQL high availability power and usability
MySQL high availability power and usabilityMySQL high availability power and usability
MySQL high availability power and usability
 
Throughput comparison: Dell PowerEdge R720 drive options
Throughput comparison: Dell PowerEdge R720 drive optionsThroughput comparison: Dell PowerEdge R720 drive options
Throughput comparison: Dell PowerEdge R720 drive options
 
Exchange 2013 ABC's: Architecture, Best Practices and Client Access
Exchange 2013 ABC's: Architecture, Best Practices and Client AccessExchange 2013 ABC's: Architecture, Best Practices and Client Access
Exchange 2013 ABC's: Architecture, Best Practices and Client Access
 
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
 
SQLFire Webinar
SQLFire WebinarSQLFire Webinar
SQLFire Webinar
 
Engineered Systems: Oracle’s Vision for the Future
Engineered Systems: Oracle’s Vision for the FutureEngineered Systems: Oracle’s Vision for the Future
Engineered Systems: Oracle’s Vision for the Future
 
DB2 9.7 Overview
DB2 9.7 OverviewDB2 9.7 Overview
DB2 9.7 Overview
 
Exchange Server 2013 Architecture Deep Dive, Part 2
Exchange Server 2013 Architecture Deep Dive, Part 2 Exchange Server 2013 Architecture Deep Dive, Part 2
Exchange Server 2013 Architecture Deep Dive, Part 2
 
SQLFire at Strata 2012
SQLFire at Strata 2012SQLFire at Strata 2012
SQLFire at Strata 2012
 
SQL Server User Group 02/2009
SQL Server User Group 02/2009SQL Server User Group 02/2009
SQL Server User Group 02/2009
 
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
 
SQLFire at VMworld Europe 2011
SQLFire at VMworld Europe 2011SQLFire at VMworld Europe 2011
SQLFire at VMworld Europe 2011
 
Ms Sql Server Black Book
Ms Sql Server Black BookMs Sql Server Black Book
Ms Sql Server Black Book
 
SQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciSQL Server Workshop Paul Bertucci
SQL Server Workshop Paul Bertucci
 

Ähnlich wie Edition based redefinition joords

Lap Around Sql Azure
Lap Around Sql AzureLap Around Sql Azure
Lap Around Sql AzureAnko Duizer
 
Patterns & Practices of Microservices
Patterns & Practices of MicroservicesPatterns & Practices of Microservices
Patterns & Practices of MicroservicesWesley Reisz
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerMichael Rys
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database DesignAndrei Solntsev
 
Microsoft SQL Server 2012
Microsoft SQL Server 2012 Microsoft SQL Server 2012
Microsoft SQL Server 2012 Dhiren Gala
 
DB Luminous... Know Your Data
DB Luminous... Know Your DataDB Luminous... Know Your Data
DB Luminous... Know Your DataRuss Pierce
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part isqlserver.co.il
 
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
 
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
 
Enterprise db-change-management&amp;deployment-demo
Enterprise db-change-management&amp;deployment-demoEnterprise db-change-management&amp;deployment-demo
Enterprise db-change-management&amp;deployment-demoPrasad Raghuram Vemuri
 
Why does Microsoft care about NoSQL, SQL and Polyglot Persistence?
Why does Microsoft care about NoSQL, SQL and Polyglot Persistence?Why does Microsoft care about NoSQL, SQL and Polyglot Persistence?
Why does Microsoft care about NoSQL, SQL and Polyglot Persistence?brianlangbecker
 
We need revisions and CRAP everywhere in Drupal core
We need revisions and CRAP everywhere in Drupal coreWe need revisions and CRAP everywhere in Drupal core
We need revisions and CRAP everywhere in Drupal coreDick Olsson
 
Obevo Javasig.pptx
Obevo Javasig.pptxObevo Javasig.pptx
Obevo Javasig.pptxLadduAnanu
 
Presentation online application upgrade of oracle's bug db with edition-ba...
Presentation    online application upgrade of oracle's bug db with edition-ba...Presentation    online application upgrade of oracle's bug db with edition-ba...
Presentation online application upgrade of oracle's bug db with edition-ba...xKinAnx
 
Showbox 2 2012
Showbox 2 2012Showbox 2 2012
Showbox 2 2012jboo2
 

Ähnlich wie Edition based redefinition joords (20)

Edition based redefinition joords
Edition based redefinition joordsEdition based redefinition joords
Edition based redefinition joords
 
Subversion and bug tracking
Subversion and bug trackingSubversion and bug tracking
Subversion and bug tracking
 
Lap Around Sql Azure
Lap Around Sql AzureLap Around Sql Azure
Lap Around Sql Azure
 
Patterns & Practices of Microservices
Patterns & Practices of MicroservicesPatterns & Practices of Microservices
Patterns & Practices of Microservices
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL Server
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
Microsoft SQL Server 2012
Microsoft SQL Server 2012 Microsoft SQL Server 2012
Microsoft SQL Server 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
 
DB Luminous... Know Your Data
DB Luminous... Know Your DataDB Luminous... Know Your Data
DB Luminous... Know Your Data
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part i
 
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-это просто!
 
Sybase To Oracle Migration for DBAs
Sybase To Oracle Migration for DBAsSybase To Oracle Migration for DBAs
Sybase To Oracle Migration for DBAs
 
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?
 
Enterprise db-change-management&amp;deployment-demo
Enterprise db-change-management&amp;deployment-demoEnterprise db-change-management&amp;deployment-demo
Enterprise db-change-management&amp;deployment-demo
 
Why does Microsoft care about NoSQL, SQL and Polyglot Persistence?
Why does Microsoft care about NoSQL, SQL and Polyglot Persistence?Why does Microsoft care about NoSQL, SQL and Polyglot Persistence?
Why does Microsoft care about NoSQL, SQL and Polyglot Persistence?
 
We need revisions and CRAP everywhere in Drupal core
We need revisions and CRAP everywhere in Drupal coreWe need revisions and CRAP everywhere in Drupal core
We need revisions and CRAP everywhere in Drupal core
 
Obevo Javasig.pptx
Obevo Javasig.pptxObevo Javasig.pptx
Obevo Javasig.pptx
 
Presentation online application upgrade of oracle's bug db with edition-ba...
Presentation    online application upgrade of oracle's bug db with edition-ba...Presentation    online application upgrade of oracle's bug db with edition-ba...
Presentation online application upgrade of oracle's bug db with edition-ba...
 
Showbox 2 2012
Showbox 2 2012Showbox 2 2012
Showbox 2 2012
 

Mehr von Jos van den Oord [Oracle DBA,OCM,OCP,RAC,CLOUD] (7)

dbaas-clone
dbaas-clonedbaas-clone
dbaas-clone
 
Ogg oracle goldengate-v3.0
Ogg oracle goldengate-v3.0Ogg oracle goldengate-v3.0
Ogg oracle goldengate-v3.0
 
Blom motoren handleiding mapsource voor Garmin
Blom motoren handleiding mapsource voor GarminBlom motoren handleiding mapsource voor Garmin
Blom motoren handleiding mapsource voor Garmin
 
Oracle goldengate ogg
Oracle goldengate oggOracle goldengate ogg
Oracle goldengate ogg
 
Point of Interest for Oracle GoldenGate
Point of Interest for Oracle GoldenGatePoint of Interest for Oracle GoldenGate
Point of Interest for Oracle GoldenGate
 
Right Availability in RAC environment. Playing with Oracle clusterware infras...
Right Availability in RAC environment. Playing with Oracle clusterware infras...Right Availability in RAC environment. Playing with Oracle clusterware infras...
Right Availability in RAC environment. Playing with Oracle clusterware infras...
 
Twee remedies tegen systeemuitval en datacorruptie
Twee remedies tegen systeemuitval en datacorruptieTwee remedies tegen systeemuitval en datacorruptie
Twee remedies tegen systeemuitval en datacorruptie
 

Edition based redefinition joords

  • 1. Edition Based Redefinition The key to online application upgrade Spreker(s) : Jos van den Oord Datum : 24 oktober 2012 E-mail : Jos.van.den.oord@transfer-solutions.com Academy WWW.TRANSFER-SOLUTIONS.COM
  • 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. 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. 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 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. SQLDeveloper support © COPYRIGHT TRANSFER SOLUTIONS B.V. 22
  • 23. Demo Questions Answers CONSULTING | MANAGED SERVICES | EDUCATION WWW.TRANSFER-SOLUTIONS.COM © COPYRIGHT TRANSFER SOLUTIONS B.V. 23