|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 1:23 PM
Points: 1,905,
Visits: 1,601
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:34 PM
Points: 2,170,
Visits: 3,582
|
|
Thanks for taking your time in writing this useful article. By the by, in which language is the coding done.
Mohammed Moinudheen
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 37,683,
Visits: 29,938
|
|
If you're talking about the SQL Server database engine, Paul's said before on Twitter that it's mostly C++ with some assembler
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Yesterday @ 7:10 AM
Points: 485,
Visits: 1,568
|
|
this is a great article about the perils of using the ALLOW_DATA_LOSS command, but i would be curious to know what Pauls recommendation are for a backup strategy.
when is the best time to run DBCC checks vs when you take a full backup?
and based on the timing of those, how does one ensure not to incur data loss?
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 1:23 PM
Points: 1,905,
Visits: 1,601
|
|
Glad you like the article.
Backup strategy is dictated by what restores you want to be able to do, what the data volume is, what storage space you have, and so on. If you have an RTO of 8 hours with a zer data-loss RPO, you need to be able to restore from your most recent full backup and all the way up to the most recent log backup in 8 hours. Depending on the amount of change in the database, you're likely going to be using differential backups as well. Answering this question is an entire series of articles in itself.
As far as consistency checks are concerned, if you're able to, run them on the production system as often as you can. The quicker you can find that you have corruption, the more likely you'll be able to recover with the minimum downtime and data loss. If you can't run them in production, take your full backup, restore it somewhere, and run consistency checks on it. If its clean, you know the production database was clean at the time the backup was taken. This is another article-sized answer, but I hope that helps.
Thanks
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
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Yesterday @ 7:10 AM
Points: 485,
Visits: 1,568
|
|
thanks Paul,
so i take daily fulls at 2 am. I take logs every 15 minutes. I run DBCC checks daily at 8pm and have processes in place to email me when DBCC CHECKDB encounters errors.....
so if at 8 pm, i receive an error, how does one know what logs i can restore up to? doesn't a corrupted DB backup corrupted?
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 1:23 PM
Points: 1,905,
Visits: 1,601
|
|
You don't know which logs you can restore up to. If you want to guarantee zero data loss you can't rely on just backups - you need to have a redundant copy of the database that is synchronously updating from the production database - either using synchronous database mirroring or some kind of synchronous I/O subsystem replication/mirroring. Defense in depth - just like with security.
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
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Yesterday @ 7:10 AM
Points: 485,
Visits: 1,568
|
|
again, thank for clarifying that Paul...
so unless you have some hardcore redundancy, you most likely will always incur some data loss.... you can mitigate that loss by running DBCC CHECKDB often. i have seen some recommendations on the web that you run it once a week and i was always puzzled by that strategy
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 1:23 PM
Points: 1,905,
Visits: 1,601
|
|
No, you're not guaranteed that you'll have data loss, but it's more likely. As long as you're doing frequent log backups, and you're able to do a tail-of-the-log backup, you should be able to get away without data loss as long as your full and diff backups don't contain corruption. But there's no guarantee.
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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 3:33 PM
Points: 2,703,
Visits: 717
|
|
Excellent article and thanks for answering the questions posted. It took me a couple of years and hard experience to finally upstanding the concepts of backup and restore plus database mirroring after coming from a development background. I still do not comprehend a lot of the disk mirror/replication, have to leave that to the networking/SAN group.
Thanks, Thomas
Thomas LeBlanc, MCITP DBA 2005, 2008 & MCDBA 2000 http://thesmilingdba.blogspot.com/
|
|
|
|