Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

The Perils of Running Database Repair Expand / Collapse
Author
Message
Posted Monday, June 25, 2012 8:22 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 22, 2014 10:17 AM
Points: 27, Visits: 467
[b]I still do not comprehend a lot of the disk mirror/replication

Using software like doubletake, you can replicate (copy) disk array at data-block level to another environment and keep them in synch. Only the changed data-blocks will be copied.


Jason
http://dbace.us
Post #1320653
Posted Monday, June 25, 2012 10:12 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, June 16, 2014 1:34 PM
Points: 1,732, Visits: 1,060
...we created a test system that took a known database, corrupted it randomly..


How do you manually corrupt the database?



Post #1320729
Posted Monday, June 25, 2012 10:17 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, August 3, 2014 11:47 AM
Points: 2,038, Visits: 1,664
There are test hooks inside SQL Server that the product group can use.

There are plenty of blog posts out there describing how to do it yourself using a hex editor - Google for me and XVI32 and you'll find one.


Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Post #1320733
Posted Monday, June 25, 2012 10:17 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 5:52 PM
Points: 2,270, Visits: 3,789
...we created a test system that took a known database, corrupted it randomly..


How do you manually corrupt the database?



How to Create a Corrupt SQL Server Database


Mohammed Moinudheen
Post #1320734
Posted Monday, June 25, 2012 10:26 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 25, 2013 4:45 PM
Points: 5, Visits: 46
Thanks Paul. You are extremely gracious with your time on these matters. You helped me a few years ago on a discussion board covering this very topic. We used the REPAIR_ALLOW_DATA_LOSS on a db with more torn pages than an eighth grade math book (ok, not that many). We recovered and restored an old copy of the db as you've suggested here to determine the problem data was outdated. Thanks again.
Post #1320745
Posted Monday, June 25, 2012 10:37 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, August 29, 2014 2:08 PM
Points: 653, Visits: 3,841
Will a job with the following fail if corruption exists? Or will the job succeed?

DBCC CHECKDB(N'master') WITH NO_INFOMSGS

I'm suddenly feeling a bit exposed since I am not sure if I would get notified if corruption exists.
Post #1320754
Posted Monday, June 25, 2012 10:40 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, August 4, 2014 8:10 AM
Points: 1,635, Visits: 1,972
Chrissy321 (6/25/2012)
Will a job with the following fail if corruption exists? Or will the job succeed?

DBCC CHECKDB(N'master') WITH NO_INFOMSGS


The job would fail and report at least some of the errors it encountered. To see all errors you need to use "WITH ALL_ERRORMSGS". That can be combined with NO_INFOMSGS.
Post #1320757
Posted Monday, June 25, 2012 10:40 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, August 3, 2014 11:47 AM
Points: 2,038, Visits: 1,664
The job will fail and @@ERROR will be set to the last severity 16 (or higher) message that is output.

Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Post #1320758
Posted Monday, June 25, 2012 10:43 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, August 3, 2014 11:47 AM
Points: 2,038, Visits: 1,664
Be careful though because SQL Agent will only capture the first X bytes of the output (unless that changed in recent versions). You may want to go the route of using the undocumented WITH TABLERESULTS and storing the output in a table for later perusal. See here for an example.

Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Post #1320762
Posted Monday, June 25, 2012 10:50 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, August 29, 2014 2:08 PM
Points: 653, Visits: 3,841
Thanks Paul I will definitely explore that option. I have a monitoring system for failed jobs so it sounds like I would at least be notied that something is amiss. Seems like a good example of maintenance plans being not quite as robust as built or borrowed maintenance scripting.

Post #1320769
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse