This is more of a 'is this posible' type question. We are evaluating DVisit at the moment and so far it is working well (once we got it installed) and I was wondering. One of my DBA tasks that I do periodically is rebuild all the indexes and also use a tool from Quest Software (called Space Manager) to, in effect, 'defrag' the tables to make them contiguous and also to fix any chained rows etc.

To effectively do this I would like to take the database 'offline' which is very difficult in our organisation as we have sites in China, USA/Mexico and Europe which means we have a 24/7 operation.

In the past I have tried to do the work on a Sunday UK time but there are still users on the system working the weekend shift.

As I read the manual, to do this kind of work on the Standby database would mean bringing it up as a Primary database otherwise it is only accessable in a Ready Only mode.

Ideally, I would like to do this work on the Standby database, then switch the logging on again so that any changes made on the Primary database can be applied. Then I would do a graceful switchover, do the same work on what was the Primary database and then switch back. I know that rebuilding the indexes gets transferred but it has issues if a user has the table open at the time I am trying to rebuild them.

I don't think that this is possible with the setup but would like to seek your opinion on the feasibilty of this.

One of the limitations with a physical standby database (and this includes Data Guard and Dbvisit Standby) is that only 1 database can be the primary database at a time. If you bring up both databases as primary databases, then you have lost the link (same DBID) between the 2 and they cannot be kept in sync any more.

So it is not possible to bring up the standby database as a Primary database while your users are continuing to work on the existing Primary database, and then bring the 2 databases back in sync.

You can reverse the roles with Graceful switchover, but it still means that only 1 database can be the primary database, and the other must be the standby database.