One of the real advantages of Oracle Open World is that there are swarms of Oracle employees in attendance who have real intimate knowledge of various pieces of the software and how internally various bits of the Oracle software actually works.
In the exhibition hall there was a huge section with lots of different Oracle stands focusing on various features and on one of the days I dropped by the Active Dataguard booth and had a chat to one of the guys there.
So in terms of how you switch on active dataguard, it’s really not that hard. You just need to have opened your standby read only (which you can do without 11g) and then issue the familiar alter database recover managed standby command – the difference is with 11g you can issue this command to apply the redo while the database open read only and servicing application queries, previously the standby had to be at the mount stage.
So that seems like a small change and in fact such a little change on the surface tends to lead to some lousy presentations as there is very little, at first glance, to say about active dataguard. However underneath the covers a lot of work went on to enable this, it was not just a case of allowing the recover command to be run with the database open.
Database changes that are stored in the redo stream are not ordered and when performing managed recovery those changes are applied to the database out of order and this is done for performance reasons, trying to reorder the changes into the correct sequence would not be performant.
This is no good for queries though, as they need to see a read consistent point of view and with active dataguard this is a constantly moving target. So one of the challenges with active dataguard was to ensure consistent reads were still implemented.
So there is the concept of a published Read SCN which queries are consistent up to and this is behind where the apply process has actually applied redo up to.
Work was also required with dropped packages – you can’t have a package becoming unavailable when the query executing at an earlier read scn actually requires the package. This required changes to the redo stream so that package changes are buffered until the read scn is bumped up.
I also asked a couple of Oracle guys if there was any chance of this being backported to 10g, Larry Carpenter just laughed and said that was one of the first questions he asked. Seems like the changes to the redo stream are so significant that it will never see the light of day in 10g.