SlideShare a Scribd company logo
Release 2 Release 3 Base Release Introducing and Demonstrating Oracle Database 11gR2's Killer FeatureEdition- Based Redefinition for Developers and DBAs ODTUG Kaleidoscope 2010 Lucas Jellema  AMIS, The Netherlands
The Book Application - Version 1
Application Version 1 on Database Edition Release 2
Database Upgrade Base release to Release 2 Authors New columns COUNTRY and BIOGRAPHY Books Drop column NUM_OF_PAGES Modified column ISBN (10 to 20 characters) New columns LANGUAGE and PUBLICATION_YEAR
Application Version 2 (on Database Edition Release 2)
Application Version 2 on Base Edition in the Database
Release 2 Base Release ALS Schema
Availability Availability = Performance * (Up or Down) Up = !Down Down = Unplanned Down + Planned Down Planned Down??? System Maintenance Power-supply, Hardware & Network, O/S upgrade Database patching & Upgrade Application Upgrades
Maximum Availability Architecture
Application Upgrade Creation of new objects Changing existing objects (alter and create or replace) Add, Modify or Drop columns or constraints Change packages and stored procedures Recompile Drop redundant objects Convert or migrate data Resume normal operations Application is DOWN
Compare with road maintenance
Restructuring A12 Build new road next to current one (A12-B) Same “functionality” as the old road At the cut-over moment Open new A12-B:  Newly arriving traffic travels on temporary road Close A12 (original) Cars already on old road keep going
11gR2 Editioning is similar Application Upgrade: Prepare new release Construct the release in parallel to the existing Operations in existing application ‘edition’ continue normally From the cut-over point: Have new sessions operate on new release Existing sessions can continue to run on existing release
11gR2 Editions introduces a new dimension in the database Release 3 Release 2 Base Release
Editions introduce or inherit versions of objects Release 2 Release 3 Base Release
Editions are parallel universes Database Objects are identified by Object Type Schema Object Name …. Edition! (release, application version, stripe, parallel universe id) Database Sessions run in the context of a specific edition  Using a specific collection of versions of objects
Database sessions run in a specific edition –one version of each object Release 2 Release 3 Base Release The database as seen by a sessionrunning in the context of Release 3 3 2 3 B 2 2 3 3 2
Release 2 Base Release ALS Schema
Parallel Application Versions Application X VERSION 1 Application X VERSION 2 Release 2 Release 3 Base Release
The end of the big bang After the release of a new edition – there is no reason why you cannot keep the previous one going for some time And multiple previous ones! That means – END OF THE BIG BANG upgrade! Multiple versions of the application can continue running to support various user groups (e.g. SaaS) Without data migration and additional downtime upon later move over of user groups
Demo of Database Editions Existing base application, in base edition Create new edition – release_2 Create and Alter database objects Base application continues running Cut-over point New sessions run in release_2 edition Current sessions continue in base
CONNECT SYS/ORACLE as SYSDBA CREATE EDITION release_2; CREATE EDITION release_3 AS CHILD OF release_2; SELECT * FROM DBA_EDITIONS; CREATE USER SCOTTY identified by tiger; ALTER USER SCOTTY ENABLE EDITIONS FORCE GRANT USE ON EDITION release_2 TO SCOTTY CONNECT SCOTTY/TIGER ALTER SESSION SET EDITION = ORA$BASE CREATE OR REPLACE FUNCTION HELLO_WORLD ALTER SESSION SET EDITION = RELEASE_2 CREATE OR REPLACE FUNCTION HELLO_WORLD ALTER SESSION SET EDITION = RELEASE_3 DROP FUNCTION HELLO_WORLD Release 2 Release 3 Base Release 2 1 X
Some Rules for EBR (Edition Based Redefinition) EBR acts on packages, functions, triggers, procedures, views, types and synonyms EBR does not apply to tables Data is not versioned, cloned, migrated Different incarnations of a table are suggested through editioningviews – there is only one table Applications should never access tables directly!
Editions and Tables Tables cannot be versioned: there is only one definition of a table across all Editions Data is not versioned: a record exists once and only once The solution for managing changes to Tables: Editioning Views and Cross Edition Triggers Editioning Views are defined on base table (no joins) Editioning Views can have DML triggers defined (just like base table) Using an editioning view in a query or DML statement does not impact the performance of the query or DML
Editions and Tables Application A Application B Table EMP SAL MGR JOB ENAME HIREDATE COMM
Editions and Tables Application A Application B Editioning View EMP  Table EMP_BASE SAL MGR JOB ENAME HIREDATE COMM
Oracle guarantees:The Execution Plan for a SQL query that uses an Editioning View is identical to that for the same query based directly on the table
Migrate to Editioning Views Rename Table (for example to <old table name>_BASE) Constraints continue to refer to the table Create the Editioning View with the old table name Using the ‘CREATE OR REPLACE EDITIONING VIEW <view name>’ statement Reroute privileges – grant on view rather than table Recompile the triggers on the table These now become triggers on the Editioning View Recompile all invalid PL/SQL program units and Views They now refer to the Editioning View instead of the table VPD policies are reassigned to the View Regular auditing and FGA is on the table
Demo ALTER TABLE EMP RENAME TO EMP_BASE; CREATE OR REPLACE EDITIONING VIEW EMP AS SELECT ... FROM   EMP_BASE / DROP TRIGGER EMP_BRI / Rem recreate trigger on Editioning View @<EMP_BRI>.trg Rem recompile invalid Views and PL/SQL units
Multiple versions of Editioning View  Application A Application B Edition R2 Edition R1 Editioning View EMP  Editioning View EMP  Table EMP_BASE SAL MGR JOB ENAME HIREDATE COMM
Multiple versions of Editioning View  Application A Application B Edition R2 Edition R1 View EMP (1.1) …* Language  View EMP (1.0) Table EMP_BASE SAL MGR JOB ENAME LANGUAGE HIREDATE COMM Forward CrosseditionTrigger
Demo CREATE EDITION R2 AS CHILD OF R1; ALTER SESSION SET EDITION R2; SHOW EDITION ALTER TABLE EMP_BASE ADD (LANGUAGE VARCHAR2(2) NULL); Rem function for deriving value for language CREATE OR REPLACE FUNCTION  GET_LANGUAGE( p_job in varchar2) return varchar2 is begin   return case p_job when 'MANAGER' then 'fr'                      else 'en' end; end;
Demo Rem Create Forward Crossedition Trigger Rem Applies to DML operations on EMP_BASE from  Rem Earlier Editions CREATE OR REPLACE TRIGGER EMP_1_1_Fwd_Xed BEFORE INSERT OR UPDATE ON EMP_BASE FOR EACH ROW FORWARD CROSSEDITION DISABLE BEGIN    :new.language = get_language(:new.job); END EMP_1_1_Fwd_Xed;  Rem Enable the Forward Crossedition Trigger ALTER TRIGGEREMP_1_1_Fwd_Xed ENABLE;
Demo Rem Use Forward Crossedition trigger to Rem upgrade existing table records according to new table Rem version (for large # records use dbms_parallel_execute) DECLARE    c NUMBER := DBMS_SQL.OPEN_CURSOR();    x NUMBER;  BEGIN    DBMS_SQL.PARSE   ( c => c   , Language_Flag => DBMS_SQL.NATIVE   , Statement => 'UPDATE EMP_BASE               SET EMPNO = EMPNO' , Apply_Crossedition_Trigger => 'EMP_1_1_Fwd_Xed'   );   x := DBMS_SQL.EXECUTE(c);    DBMS_SQL.CLOSE_CURSOR(c);  COMMIT;  END;
Upgrade Table Definition Make desired changes to the table Add columns, modify Columns, … (online redefinition) (Create Edition,) Set target Edition for session Modify the Editioning View in the Edition	 To reflect the table as its latest version should look Perhaps hiding columns you eventually want to drop (optional) Create Forward Crossedition Trigger on base table to have DML on previous Editions made valid (optional) Create Reverse Crossedition Trigger on base table to have DML on current Edition synch back
Cross Edition Triggers If you remove a (mandatory) column from the current Editioning View… a Reverse Crossedition Trigger ensures that new records get some value in that (invisible) column If you add a (mandatory) column to the table (and the current Editioning View)… a Forward Crossedition Trigger ensures that records DMLed through previous Editioning View versions are made valid (optionally) Apply Forward Crossedition Trigger for all existing records (created in old edition of the table) Use DBMS_SQL.parse (with parameter Apply_Crossedition_Trigger set to name of trigger) Use DBMS_PARALLEL_EXECUTE
Multiple versions of Editioning View  Application A Application B Edition R3 View EMP (1.1) … (minus ENAME)* Language o FIRST_NAME * LAST_NAME Edition R1 Edition R2 View EMP (1.1) …* Language  View EMP (1.0) Table EMP_BASE Reverse Crossedition Trigger SAL MGR JOB ENAME LANGUAGE FIRSTNAME LASTNAME HIREDATE COMM Forward CrosseditionTrigger
“Suggested (best) Practices” Every application (release) sets the Edition it requires when it connects to a session At the same time it calls dbms_application_info And sets other Context details Note: you could use multiple database service definitions to access the same database For example: ORCL_BASE, ORCL_R2, ORCL_R3 JEE data sources can be configured for a specific service A logon trigger can read the service name used to connect to the database and set edition accordingly
“Suggested (best) Practices” Applications should never access tables – all access should be through views Only through views can the data structure itself be Editioned Even triggers should be on the EditioningView Except cross edition triggers
Replacement Table Pattern Application A Application B Edition R2 Edition R1 EditioningView APP_DATA EditioningView APP_DATA Table APPLICATION_METADATA APPLICATION_METADATA_R2 ORGID USER VALUE KEY Default ORGID USER VALUE KEY Default
Alternative Approach for Data Versioning Application A Application B Edition R2 Edition R1 View DATA select  *from    EDITIONED_DATAwhere  <current_edition>             betweenas_of_edition anduntil_edition Table EDITIONED_DATA * as_of_edition * until_edition … normal columns
Interesting EBR Tid-Bits Drop Object in an Edition stops the inheritance from previous Edition. Object no longer is carried forward Edition can have only one child – no branches (yet) DBMS_SQL.PARSE can be executed in a specific Edition Use parameter edition to specify other than current edition If no explicit edition is set for a session, the default edition is used ALTER DATABASE DEFAULT EDITION = edition_name;  Hints in queries against Editionable Views are understood in terms of the underlying table Logical EV column references are correctly mapped
Interesting EBR Tid-Bits DB Links & Materialized Views currently not editionable Objects of an editionable type are not editionable when used by a non-editionableobject PL/SQL Function used in Function Based Index or the definition of a Materialized View ADT used as the base type for a column in a table Data Dictionary Views DBA_/ALL_EDITIONS – editions in the database DBA_/ALL_OBJECTS – objects (inherited) in current edition DBA_/ALL_OBJECTS_AE – actual objects across all editions
Summary 11gR2 Editions are parallel, co-existing universes with incarnations of database objects The new release can be constructed, tested and run in a new edition The old edition can be switched off at cut-over  Editions also allow long time co-existence of multiple releases of an application Application Upgrade no longer needs to disrupt the operation through planned downtime By the way: EBR is available in all DB editions
Conclusion See our blog for Oracle Database 11gR2 articles (other topics as well) http://technology.amis.nl/blog This presentation and the demo scripts are on the blog too Contact me: lucas.jellema@amis.nl

More Related Content

What's hot

R12 d49656 gc10-apps dba 10
R12 d49656 gc10-apps dba 10R12 d49656 gc10-apps dba 10
R12 d49656 gc10-apps dba 10
zeesniper
 
R12 d49656 gc10-apps dba 05
R12 d49656 gc10-apps dba 05R12 d49656 gc10-apps dba 05
R12 d49656 gc10-apps dba 05
zeesniper
 
R12 d49656 gc10-apps dba 14
R12 d49656 gc10-apps dba 14R12 d49656 gc10-apps dba 14
R12 d49656 gc10-apps dba 14
zeesniper
 
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
Dataconomy Media
 
R12 d49656 gc10-apps dba 13
R12 d49656 gc10-apps dba 13R12 d49656 gc10-apps dba 13
R12 d49656 gc10-apps dba 13
zeesniper
 
R12 d49656 gc10-apps dba 18
R12 d49656 gc10-apps dba 18R12 d49656 gc10-apps dba 18
R12 d49656 gc10-apps dba 18
zeesniper
 
Fpt connector
Fpt connectorFpt connector
Fpt connector
Thang Loi
 
Batchhow
BatchhowBatchhow
Batchhow
Roy Zimmer
 
R12 d49656 gc10-apps dba 03
R12 d49656 gc10-apps dba 03R12 d49656 gc10-apps dba 03
R12 d49656 gc10-apps dba 03
zeesniper
 
R12 d49656 gc10-apps dba 09
R12 d49656 gc10-apps dba 09R12 d49656 gc10-apps dba 09
R12 d49656 gc10-apps dba 09
zeesniper
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
altistory
 

What's hot (11)

R12 d49656 gc10-apps dba 10
R12 d49656 gc10-apps dba 10R12 d49656 gc10-apps dba 10
R12 d49656 gc10-apps dba 10
 
R12 d49656 gc10-apps dba 05
R12 d49656 gc10-apps dba 05R12 d49656 gc10-apps dba 05
R12 d49656 gc10-apps dba 05
 
R12 d49656 gc10-apps dba 14
R12 d49656 gc10-apps dba 14R12 d49656 gc10-apps dba 14
R12 d49656 gc10-apps dba 14
 
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
 
R12 d49656 gc10-apps dba 13
R12 d49656 gc10-apps dba 13R12 d49656 gc10-apps dba 13
R12 d49656 gc10-apps dba 13
 
R12 d49656 gc10-apps dba 18
R12 d49656 gc10-apps dba 18R12 d49656 gc10-apps dba 18
R12 d49656 gc10-apps dba 18
 
Fpt connector
Fpt connectorFpt connector
Fpt connector
 
Batchhow
BatchhowBatchhow
Batchhow
 
R12 d49656 gc10-apps dba 03
R12 d49656 gc10-apps dba 03R12 d49656 gc10-apps dba 03
R12 d49656 gc10-apps dba 03
 
R12 d49656 gc10-apps dba 09
R12 d49656 gc10-apps dba 09R12 d49656 gc10-apps dba 09
R12 d49656 gc10-apps dba 09
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
 

Similar to Introducing and Demonstrating Oracle Database 11gR2's Killer Feature – Edition- Based Redefinition for Developers and DBAs (ODTUG Kaleidoscope 2010)

EDITION & TARGET EDITION & Edition-Based Redefinition (EBR) in Oracle
EDITION & TARGET EDITION & Edition-Based Redefinition (EBR) in OracleEDITION & TARGET EDITION & Edition-Based Redefinition (EBR) in Oracle
EDITION & TARGET EDITION & Edition-Based Redefinition (EBR) in Oracle
Alireza Kamrani
 
Db2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallsDb2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallssam2sung2
 
Oracle applications r12.2, ebr, online patching means lot of work for devel...
Oracle applications r12.2, ebr, online patching   means lot of work for devel...Oracle applications r12.2, ebr, online patching   means lot of work for devel...
Oracle applications r12.2, ebr, online patching means lot of work for devel...
Ajith Narayanan
 
Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11
Abhishek Verma
 
How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...
Oren Nakdimon
 
My sql with querys
My sql with querysMy sql with querys
My sql with querysNIRMAL FELIX
 
What's new in Scala 2.13?
What's new in Scala 2.13?What's new in Scala 2.13?
What's new in Scala 2.13?
Hermann Hueck
 
AWS RDS Migration Tool
AWS RDS Migration Tool AWS RDS Migration Tool
Cursors, triggers, procedures
Cursors, triggers, proceduresCursors, triggers, procedures
Cursors, triggers, procedures
Vaibhav Kathuria
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
Dr. C.V. Suresh Babu
 
DB2 9 for z/OS - Business Value
DB2 9 for z/OS  - Business  ValueDB2 9 for z/OS  - Business  Value
DB2 9 for z/OS - Business Value
Surekha Parekh
 
Adbms
AdbmsAdbms
Adbms
jass12345
 
Editioning use in ebs
Editioning use in  ebsEditioning use in  ebs
Editioning use in ebs
aioughydchapter
 
Editioning use in ebs
Editioning use in  ebsEditioning use in  ebs
Editioning use in ebs
pasalapudi123
 
Creating a database
Creating a databaseCreating a database
Creating a databaseRahul Gupta
 
Oracle11g R2 - Edition Based Redefinition for On Line Application Upgrade
Oracle11g R2 - Edition Based Redefinition for On Line Application UpgradeOracle11g R2 - Edition Based Redefinition for On Line Application Upgrade
Oracle11g R2 - Edition Based Redefinition for On Line Application Upgrade
Lucas Jellema
 
The road to Ember 2.0
The road to Ember 2.0The road to Ember 2.0
The road to Ember 2.0
Filippo Zanella
 
7 free Visual Studio extensions
7 free Visual Studio extensions 7 free Visual Studio extensions
7 free Visual Studio extensions
Vlad Mysla
 

Similar to Introducing and Demonstrating Oracle Database 11gR2's Killer Feature – Edition- Based Redefinition for Developers and DBAs (ODTUG Kaleidoscope 2010) (20)

EDITION & TARGET EDITION & Edition-Based Redefinition (EBR) in Oracle
EDITION & TARGET EDITION & Edition-Based Redefinition (EBR) in OracleEDITION & TARGET EDITION & Edition-Based Redefinition (EBR) in Oracle
EDITION & TARGET EDITION & Edition-Based Redefinition (EBR) in Oracle
 
Db2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallsDb2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfalls
 
Oracle applications r12.2, ebr, online patching means lot of work for devel...
Oracle applications r12.2, ebr, online patching   means lot of work for devel...Oracle applications r12.2, ebr, online patching   means lot of work for devel...
Oracle applications r12.2, ebr, online patching means lot of work for devel...
 
Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11
 
How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
What's new in Scala 2.13?
What's new in Scala 2.13?What's new in Scala 2.13?
What's new in Scala 2.13?
 
AWS RDS Migration Tool
AWS RDS Migration Tool AWS RDS Migration Tool
AWS RDS Migration Tool
 
Cursors, triggers, procedures
Cursors, triggers, proceduresCursors, triggers, procedures
Cursors, triggers, procedures
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
DB2 9 for z/OS - Business Value
DB2 9 for z/OS  - Business  ValueDB2 9 for z/OS  - Business  Value
DB2 9 for z/OS - Business Value
 
Adbms
AdbmsAdbms
Adbms
 
Editioning use in ebs
Editioning use in  ebsEditioning use in  ebs
Editioning use in ebs
 
Editioning use in ebs
Editioning use in  ebsEditioning use in  ebs
Editioning use in ebs
 
Creating a database
Creating a databaseCreating a database
Creating a database
 
Oracle11g R2 - Edition Based Redefinition for On Line Application Upgrade
Oracle11g R2 - Edition Based Redefinition for On Line Application UpgradeOracle11g R2 - Edition Based Redefinition for On Line Application Upgrade
Oracle11g R2 - Edition Based Redefinition for On Line Application Upgrade
 
The road to Ember 2.0
The road to Ember 2.0The road to Ember 2.0
The road to Ember 2.0
 
7 free Visual Studio extensions
7 free Visual Studio extensions 7 free Visual Studio extensions
7 free Visual Studio extensions
 

More from Lucas Jellema

Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...
Lucas Jellema
 
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
Lucas Jellema
 
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
Lucas Jellema
 
Apache Superset - open source data exploration and visualization (Conclusion ...
Apache Superset - open source data exploration and visualization (Conclusion ...Apache Superset - open source data exploration and visualization (Conclusion ...
Apache Superset - open source data exploration and visualization (Conclusion ...
Lucas Jellema
 
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
Lucas Jellema
 
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
Help me move away from Oracle - or not?!  (Oracle Community Tour EMEA - LVOUG...Help me move away from Oracle - or not?!  (Oracle Community Tour EMEA - LVOUG...
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
Lucas Jellema
 
Op je vingers tellen... tot 1000!
Op je vingers tellen... tot 1000!Op je vingers tellen... tot 1000!
Op je vingers tellen... tot 1000!
Lucas Jellema
 
IoT - from prototype to enterprise platform (DigitalXchange 2022)
IoT - from prototype to enterprise platform (DigitalXchange 2022)IoT - from prototype to enterprise platform (DigitalXchange 2022)
IoT - from prototype to enterprise platform (DigitalXchange 2022)
Lucas Jellema
 
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Lucas Jellema
 
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Lucas Jellema
 
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Lucas Jellema
 
Introducing Dapr.io - the open source personal assistant to microservices and...
Introducing Dapr.io - the open source personal assistant to microservices and...Introducing Dapr.io - the open source personal assistant to microservices and...
Introducing Dapr.io - the open source personal assistant to microservices and...
Lucas Jellema
 
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
Lucas Jellema
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Lucas Jellema
 
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Lucas Jellema
 
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
Lucas Jellema
 
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Lucas Jellema
 
Tech Talks 101 - DevOps (jan 2022)
Tech Talks 101 - DevOps (jan 2022)Tech Talks 101 - DevOps (jan 2022)
Tech Talks 101 - DevOps (jan 2022)
Lucas Jellema
 
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Lucas Jellema
 
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Lucas Jellema
 

More from Lucas Jellema (20)

Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...
 
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
 
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
 
Apache Superset - open source data exploration and visualization (Conclusion ...
Apache Superset - open source data exploration and visualization (Conclusion ...Apache Superset - open source data exploration and visualization (Conclusion ...
Apache Superset - open source data exploration and visualization (Conclusion ...
 
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
 
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
Help me move away from Oracle - or not?!  (Oracle Community Tour EMEA - LVOUG...Help me move away from Oracle - or not?!  (Oracle Community Tour EMEA - LVOUG...
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
 
Op je vingers tellen... tot 1000!
Op je vingers tellen... tot 1000!Op je vingers tellen... tot 1000!
Op je vingers tellen... tot 1000!
 
IoT - from prototype to enterprise platform (DigitalXchange 2022)
IoT - from prototype to enterprise platform (DigitalXchange 2022)IoT - from prototype to enterprise platform (DigitalXchange 2022)
IoT - from prototype to enterprise platform (DigitalXchange 2022)
 
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
 
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
 
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
 
Introducing Dapr.io - the open source personal assistant to microservices and...
Introducing Dapr.io - the open source personal assistant to microservices and...Introducing Dapr.io - the open source personal assistant to microservices and...
Introducing Dapr.io - the open source personal assistant to microservices and...
 
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
 
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
 
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
 
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
 
Tech Talks 101 - DevOps (jan 2022)
Tech Talks 101 - DevOps (jan 2022)Tech Talks 101 - DevOps (jan 2022)
Tech Talks 101 - DevOps (jan 2022)
 
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
 
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
 

Recently uploaded

Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 

Recently uploaded (20)

Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 

Introducing and Demonstrating Oracle Database 11gR2's Killer Feature – Edition- Based Redefinition for Developers and DBAs (ODTUG Kaleidoscope 2010)

  • 1. Release 2 Release 3 Base Release Introducing and Demonstrating Oracle Database 11gR2's Killer FeatureEdition- Based Redefinition for Developers and DBAs ODTUG Kaleidoscope 2010 Lucas Jellema AMIS, The Netherlands
  • 2. The Book Application - Version 1
  • 3. Application Version 1 on Database Edition Release 2
  • 4. Database Upgrade Base release to Release 2 Authors New columns COUNTRY and BIOGRAPHY Books Drop column NUM_OF_PAGES Modified column ISBN (10 to 20 characters) New columns LANGUAGE and PUBLICATION_YEAR
  • 5. Application Version 2 (on Database Edition Release 2)
  • 6. Application Version 2 on Base Edition in the Database
  • 7. Release 2 Base Release ALS Schema
  • 8. Availability Availability = Performance * (Up or Down) Up = !Down Down = Unplanned Down + Planned Down Planned Down??? System Maintenance Power-supply, Hardware & Network, O/S upgrade Database patching & Upgrade Application Upgrades
  • 10. Application Upgrade Creation of new objects Changing existing objects (alter and create or replace) Add, Modify or Drop columns or constraints Change packages and stored procedures Recompile Drop redundant objects Convert or migrate data Resume normal operations Application is DOWN
  • 11. Compare with road maintenance
  • 12. Restructuring A12 Build new road next to current one (A12-B) Same “functionality” as the old road At the cut-over moment Open new A12-B: Newly arriving traffic travels on temporary road Close A12 (original) Cars already on old road keep going
  • 13. 11gR2 Editioning is similar Application Upgrade: Prepare new release Construct the release in parallel to the existing Operations in existing application ‘edition’ continue normally From the cut-over point: Have new sessions operate on new release Existing sessions can continue to run on existing release
  • 14. 11gR2 Editions introduces a new dimension in the database Release 3 Release 2 Base Release
  • 15. Editions introduce or inherit versions of objects Release 2 Release 3 Base Release
  • 16. Editions are parallel universes Database Objects are identified by Object Type Schema Object Name …. Edition! (release, application version, stripe, parallel universe id) Database Sessions run in the context of a specific edition Using a specific collection of versions of objects
  • 17. Database sessions run in a specific edition –one version of each object Release 2 Release 3 Base Release The database as seen by a sessionrunning in the context of Release 3 3 2 3 B 2 2 3 3 2
  • 18. Release 2 Base Release ALS Schema
  • 19. Parallel Application Versions Application X VERSION 1 Application X VERSION 2 Release 2 Release 3 Base Release
  • 20. The end of the big bang After the release of a new edition – there is no reason why you cannot keep the previous one going for some time And multiple previous ones! That means – END OF THE BIG BANG upgrade! Multiple versions of the application can continue running to support various user groups (e.g. SaaS) Without data migration and additional downtime upon later move over of user groups
  • 21. Demo of Database Editions Existing base application, in base edition Create new edition – release_2 Create and Alter database objects Base application continues running Cut-over point New sessions run in release_2 edition Current sessions continue in base
  • 22. CONNECT SYS/ORACLE as SYSDBA CREATE EDITION release_2; CREATE EDITION release_3 AS CHILD OF release_2; SELECT * FROM DBA_EDITIONS; CREATE USER SCOTTY identified by tiger; ALTER USER SCOTTY ENABLE EDITIONS FORCE GRANT USE ON EDITION release_2 TO SCOTTY CONNECT SCOTTY/TIGER ALTER SESSION SET EDITION = ORA$BASE CREATE OR REPLACE FUNCTION HELLO_WORLD ALTER SESSION SET EDITION = RELEASE_2 CREATE OR REPLACE FUNCTION HELLO_WORLD ALTER SESSION SET EDITION = RELEASE_3 DROP FUNCTION HELLO_WORLD Release 2 Release 3 Base Release 2 1 X
  • 23. Some Rules for EBR (Edition Based Redefinition) EBR acts on packages, functions, triggers, procedures, views, types and synonyms EBR does not apply to tables Data is not versioned, cloned, migrated Different incarnations of a table are suggested through editioningviews – there is only one table Applications should never access tables directly!
  • 24. Editions and Tables Tables cannot be versioned: there is only one definition of a table across all Editions Data is not versioned: a record exists once and only once The solution for managing changes to Tables: Editioning Views and Cross Edition Triggers Editioning Views are defined on base table (no joins) Editioning Views can have DML triggers defined (just like base table) Using an editioning view in a query or DML statement does not impact the performance of the query or DML
  • 25. Editions and Tables Application A Application B Table EMP SAL MGR JOB ENAME HIREDATE COMM
  • 26. Editions and Tables Application A Application B Editioning View EMP Table EMP_BASE SAL MGR JOB ENAME HIREDATE COMM
  • 27. Oracle guarantees:The Execution Plan for a SQL query that uses an Editioning View is identical to that for the same query based directly on the table
  • 28. Migrate to Editioning Views Rename Table (for example to <old table name>_BASE) Constraints continue to refer to the table Create the Editioning View with the old table name Using the ‘CREATE OR REPLACE EDITIONING VIEW <view name>’ statement Reroute privileges – grant on view rather than table Recompile the triggers on the table These now become triggers on the Editioning View Recompile all invalid PL/SQL program units and Views They now refer to the Editioning View instead of the table VPD policies are reassigned to the View Regular auditing and FGA is on the table
  • 29. Demo ALTER TABLE EMP RENAME TO EMP_BASE; CREATE OR REPLACE EDITIONING VIEW EMP AS SELECT ... FROM EMP_BASE / DROP TRIGGER EMP_BRI / Rem recreate trigger on Editioning View @<EMP_BRI>.trg Rem recompile invalid Views and PL/SQL units
  • 30. Multiple versions of Editioning View Application A Application B Edition R2 Edition R1 Editioning View EMP Editioning View EMP Table EMP_BASE SAL MGR JOB ENAME HIREDATE COMM
  • 31. Multiple versions of Editioning View Application A Application B Edition R2 Edition R1 View EMP (1.1) …* Language View EMP (1.0) Table EMP_BASE SAL MGR JOB ENAME LANGUAGE HIREDATE COMM Forward CrosseditionTrigger
  • 32. Demo CREATE EDITION R2 AS CHILD OF R1; ALTER SESSION SET EDITION R2; SHOW EDITION ALTER TABLE EMP_BASE ADD (LANGUAGE VARCHAR2(2) NULL); Rem function for deriving value for language CREATE OR REPLACE FUNCTION GET_LANGUAGE( p_job in varchar2) return varchar2 is begin return case p_job when 'MANAGER' then 'fr' else 'en' end; end;
  • 33. Demo Rem Create Forward Crossedition Trigger Rem Applies to DML operations on EMP_BASE from Rem Earlier Editions CREATE OR REPLACE TRIGGER EMP_1_1_Fwd_Xed BEFORE INSERT OR UPDATE ON EMP_BASE FOR EACH ROW FORWARD CROSSEDITION DISABLE BEGIN :new.language = get_language(:new.job); END EMP_1_1_Fwd_Xed; Rem Enable the Forward Crossedition Trigger ALTER TRIGGEREMP_1_1_Fwd_Xed ENABLE;
  • 34. Demo Rem Use Forward Crossedition trigger to Rem upgrade existing table records according to new table Rem version (for large # records use dbms_parallel_execute) DECLARE c NUMBER := DBMS_SQL.OPEN_CURSOR(); x NUMBER; BEGIN DBMS_SQL.PARSE ( c => c , Language_Flag => DBMS_SQL.NATIVE , Statement => 'UPDATE EMP_BASE SET EMPNO = EMPNO' , Apply_Crossedition_Trigger => 'EMP_1_1_Fwd_Xed' ); x := DBMS_SQL.EXECUTE(c); DBMS_SQL.CLOSE_CURSOR(c); COMMIT; END;
  • 35. Upgrade Table Definition Make desired changes to the table Add columns, modify Columns, … (online redefinition) (Create Edition,) Set target Edition for session Modify the Editioning View in the Edition To reflect the table as its latest version should look Perhaps hiding columns you eventually want to drop (optional) Create Forward Crossedition Trigger on base table to have DML on previous Editions made valid (optional) Create Reverse Crossedition Trigger on base table to have DML on current Edition synch back
  • 36. Cross Edition Triggers If you remove a (mandatory) column from the current Editioning View… a Reverse Crossedition Trigger ensures that new records get some value in that (invisible) column If you add a (mandatory) column to the table (and the current Editioning View)… a Forward Crossedition Trigger ensures that records DMLed through previous Editioning View versions are made valid (optionally) Apply Forward Crossedition Trigger for all existing records (created in old edition of the table) Use DBMS_SQL.parse (with parameter Apply_Crossedition_Trigger set to name of trigger) Use DBMS_PARALLEL_EXECUTE
  • 37. Multiple versions of Editioning View Application A Application B Edition R3 View EMP (1.1) … (minus ENAME)* Language o FIRST_NAME * LAST_NAME Edition R1 Edition R2 View EMP (1.1) …* Language View EMP (1.0) Table EMP_BASE Reverse Crossedition Trigger SAL MGR JOB ENAME LANGUAGE FIRSTNAME LASTNAME HIREDATE COMM Forward CrosseditionTrigger
  • 38. “Suggested (best) Practices” Every application (release) sets the Edition it requires when it connects to a session At the same time it calls dbms_application_info And sets other Context details Note: you could use multiple database service definitions to access the same database For example: ORCL_BASE, ORCL_R2, ORCL_R3 JEE data sources can be configured for a specific service A logon trigger can read the service name used to connect to the database and set edition accordingly
  • 39. “Suggested (best) Practices” Applications should never access tables – all access should be through views Only through views can the data structure itself be Editioned Even triggers should be on the EditioningView Except cross edition triggers
  • 40. Replacement Table Pattern Application A Application B Edition R2 Edition R1 EditioningView APP_DATA EditioningView APP_DATA Table APPLICATION_METADATA APPLICATION_METADATA_R2 ORGID USER VALUE KEY Default ORGID USER VALUE KEY Default
  • 41. Alternative Approach for Data Versioning Application A Application B Edition R2 Edition R1 View DATA select *from EDITIONED_DATAwhere <current_edition> betweenas_of_edition anduntil_edition Table EDITIONED_DATA * as_of_edition * until_edition … normal columns
  • 42. Interesting EBR Tid-Bits Drop Object in an Edition stops the inheritance from previous Edition. Object no longer is carried forward Edition can have only one child – no branches (yet) DBMS_SQL.PARSE can be executed in a specific Edition Use parameter edition to specify other than current edition If no explicit edition is set for a session, the default edition is used ALTER DATABASE DEFAULT EDITION = edition_name; Hints in queries against Editionable Views are understood in terms of the underlying table Logical EV column references are correctly mapped
  • 43. Interesting EBR Tid-Bits DB Links & Materialized Views currently not editionable Objects of an editionable type are not editionable when used by a non-editionableobject PL/SQL Function used in Function Based Index or the definition of a Materialized View ADT used as the base type for a column in a table Data Dictionary Views DBA_/ALL_EDITIONS – editions in the database DBA_/ALL_OBJECTS – objects (inherited) in current edition DBA_/ALL_OBJECTS_AE – actual objects across all editions
  • 44. Summary 11gR2 Editions are parallel, co-existing universes with incarnations of database objects The new release can be constructed, tested and run in a new edition The old edition can be switched off at cut-over Editions also allow long time co-existence of multiple releases of an application Application Upgrade no longer needs to disrupt the operation through planned downtime By the way: EBR is available in all DB editions
  • 45. Conclusion See our blog for Oracle Database 11gR2 articles (other topics as well) http://technology.amis.nl/blog This presentation and the demo scripts are on the blog too Contact me: lucas.jellema@amis.nl

Editor's Notes

  1. Introducing and Demonstrating Oracle Database 11gR2&apos;s Killer Feature – Edition- Based Redefinition for Developers and DBAs
  2. SELECT sys_context(&apos;USERENV&apos;, &apos;SERVICE_NAME&apos;) FROM dual/orcl
  3. Synonyms are editionableADT are not – though ADTs not used in (Editionable) Table may beAfter a drop you can recreate an object –the ancestry is based on name alone so the end result is the same as the starting pointEditions really is an extension of the Name Resolution mechanismIn addition to name and schema, the edition is taken into accountSQL Execution plans are the same for queries against the table and against the Editioning ViewWhen View 1 depends on View 2 – which version of View 2 is the one picked for view 1?The selection is made like this: whichever version of View 2 that is actual in the Edition where View 1 is createdFixed in 11g – DDL in parallel with running transactions against the same objects (?)Also/part of that: fine grained dependency trackingTools for comparing Editions?List of actual in Edition 2 and Edition 1Compare object levelDIYVPD and FGA work fine with Editionable Views