How to do online upgrades for databases?
Posted: (EET/GMT+2)
I recently had a discussion about upgrading large SQL databases that support hundreds of users and cannot (easily) have downtime. For instance, say your application needs a new version, but also an update version of a stored procedure on the database server. If the procedure is constantly in use, how can you solve the issue?
One thing I recently learned is that Oracle 11g Release 2 support a feature called Edition-Based Redefinition (EBR). This feature is precisely developed for this situation in mind: you can simply create a new "edition" of your stored procedure, and existing calls to the procedure will continue to run normally with the old version of the procedure, but new calls will immediately start using the new version. Once all calls have completed to the old procedure, it can simply be deleted.
I haven't yet checked the exact technical details how this works on the SQL level, but presently my understanding is that these Oracle editions are totally transparent to the client application/user. Sounds good to me! Why not see something similar in SQL Server, too?