Monday, March 26, 2012

Mirror database is not accessible when Mirroring is stopped.

Hi,

I've a very basic doubt about database mirroring. I did setup a database mirroring session with the help of SQL Server Management Studio between the server A (db1) and B(db1). When is stop database mirroring by using the command button "Stop Mirroring" available in the mirroring page of SQL Server Management Studio , the mirror database{ B(db1) } goes to state "Restoring...". After stopping the mirroring i'm not able to access the mirror database.

Can you please tell me how to bring mirror database B(db1) to operation mode so that we can start working with that database?

Regards,

Gopi

Hi Gopi. Hitting the 'Stop Mirroring' Button will in effect remove the database mirroring session for that particular database, not cause a failover...not sure if that's what you are trying to do, or if you really do mean to stop mirroring alltogether.

To simply bring the mirror copy into an operational state at the point you are at now, simply run something like the following on the mirror instance:

restore database <mirror database name> with recovery

This is very similar to as if you were restoring t-log backups to a particular database and wanted to recover it after applying the last one.

However, bear in mind that following the procedure you followed above is not what you'd want to do if you are in fact trying to 'failover' to the mirror copy of the database. For information on what you'd want to do there, click the 'Help' button from the mirroring dialog you were on above and see the topic titled 'Failover'.

HTH,

No comments:

Post a Comment