Edition based redefinition in Oracle 11gR2 allows applications to be upgraded without downtime by:
1) Constructing a new release of the application in a parallel edition while the existing application continues running.
2) Switching new sessions to run on the new edition while allowing existing sessions to continue on the prior edition.
3) Supporting multiple parallel versions that can all continue running to support different user groups without additional data migration or downtime.
2. 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
3. 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
ApplicationisDOWN
5. 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
6. Edition Based Redefinition 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
9. 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
10. Database sessions run in a specific
edition –one version of each object
The database as seen by a session
running in the context of Release 3
11. Demo of Application Upgrade
• Existing base application, in base edition
• Create new editon – 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
12. Some Rules for EBR
(Edition Based Redefinition)
• Editioning acts on packages, functions, triggers,
procedures, views, types and synonyms
• Editioning does not apply to tables
– Data is not versionend, cloned, migrated
– Different incarnations of a table are suggested
through editionable views – there is only one table
• Applications should never access tables directly!
• Cross Edition Triggers on the table synchronize DML from
different editions with the current state of the table
• CET are temporary objects – not part of the application
13. But wait, there is more
• 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 suport various user groups (e.g. SaaS)
• Without data migration and additional downtime upon
later move over of user groups
17. Upgrade Base 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
20. Summary
Edition Based Redefiniton
• 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
21. Conclusion
• See http://www.amis.nl
– To do an 11gR2 PoC together with us
– To learn about 11gR2 training (DBA & Developer)
– For more on database migration services
• Free Event: 29th September – technical details
on 11gR2 including hands-on session
• See Blog for 11gR2 articles
– http://technology.amis.nl/blog
• Contact me: lucas.jellema@amis.nl