November 28, 2013 at 2:40 am
Hi
Would anyone happen to know how I would run a full DBCC CHECKDB against the database that is acting as a Mirror?
Would I need to suspend Mirroring, take the database out of restoring mode, run the check, put the db back in restoring mode and then restart the mirroring session? Would this work?
I need to run urgently as we had issues with Mirrroing last night where it became suspended, the logs suggest a DBCC checkdb be run ASAP.
Thanks.
November 28, 2013 at 3:20 am
wak_no1 (11/28/2013)
Would I need to suspend Mirroring, take the database out of restoring mode, run the check, put the db back in restoring mode and then restart the mirroring session? Would this work?
That would not work. Once you recover the database you cannot put it back in the restoring state and restart mirroring.
Only way you can do this without breaking and having to re-init the mirroring is by failing the mirroring over, so what was the mirror is not the principal, run checkDB on the new principal and once complete fail the mirroring back.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 28, 2013 at 7:03 am
Dammit, this was what I didn't want. Oh well.
thanks for advice.
January 21, 2015 at 8:21 am
Just create a database snapshot of the mirrored database and run checkdb on the snapshot.
January 22, 2015 at 5:38 am
January 22, 2015 at 5:57 am
Is running DBCC CheckDB is safe on 'Snapshot' of mirrored database on Mirror server? I think running 'Checkdb' would need lots of TEMPDB resources. What should be safe side running on the 'snapshot' and what need to watch for?
January 22, 2015 at 9:11 am
Tac11 (1/22/2015)
Is running DBCC CheckDB is safe on 'Snapshot' of mirrored database on Mirror server? I think running 'Checkdb' would need lots of TEMPDB resources. What should be safe side running on the 'snapshot' and what need to watch for?
This excellent article should give you all the info to make CHECKDB run faster.
qh
January 22, 2015 at 9:30 am
What's safe? CHECKDB does use resources, and if that's an issue for your mirror server, you might see performance issues. However this won't cause issues with the ability of SQL Server to write to the mirror or snapshot
January 23, 2015 at 9:52 am
The question was , how to run DBCC CHECKDB on a mirrored database and this is the best possible answer I feel(other than a failover). DBCC CHECKDB itself is resource intensive and that is the reason SQL server also uses multiple underlying snapshots to run CHECKDB on a database untill TABLOCK is specified. And snapshots do add a overhead in terms of copying the first time changed pages from the orginal database to the snapshot, and if it is done for a mirrored database, it may affect the DML response on primary database in a synchronous setup. even Microsoft advices not to create multiple snapshots of a database.
Running checkdb on a snapshot may have certain restriction too.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply