avoid corruption nightmares within your virtual database
TRANSCRIPT
![Page 1: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/1.jpg)
Avoid Corruption Nightmares with IDERA’s Virtual Database and CheckDB
February 10th, 2016
John MorehouseDatabase ArchitectFarm Credit Mid-America, Louisville, Kentucky
![Page 2: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/2.jpg)
Who Am I 1
• Work and live in Louisville, Kentucky• Co-founder of the Omaha SQL/BI User Group • Frequent Speaker of SQL Saturday’s & other conferences• Heavily involved with SQL PASS• PASS Outstanding Volunteer• Friend of Red Gate• Idera ACE 2016
![Page 4: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/4.jpg)
Agenda
Virtual Database
Common CheckDB Problems
Common CheckDB Solutions
Process
3
12
4
4
5 Demo
![Page 5: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/5.jpg)
The Problem..
• You have a lot of databases• You have a couple 1TB+ databases• Your server is highly volatile• You know need to run DBCC CheckDB• You know that running CheckDB takes up
critical resources
5
![Page 6: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/6.jpg)
The Problems..
• You have a lot of databases• You have a couple 1TB+ databases• Your server is highly volatile• You know need to run DBCC CheckDB• You know that running CheckDB takes up
critical resources
6
What do you do?
![Page 7: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/7.jpg)
Solutions…
• You could run CHECKDB at night• You could run CHECKDB on the weekends• You could run CHECKDB during maintenance windows• You could run CHECKDB on secondary AG group• You could performance tune CHECKDB with Trace Flags• You could performance tune TempDB• You could run CHECKDB on restored backup copy on
secondary server• You could run portions of CHECKDB• You could run CHECKDB on secondary log shipped
database• And so on….
7
![Page 8: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/8.jpg)
Solutions…
• You could run CheckDB at night• You could run CheckDB on the weekends• You could run CheckDB on secondary AG group• You could performance tune CheckDB with Trace Flags• You could performance tune TempDB• You could run CheckDB on restored backup copy on
secondary server• You could run CheckDB on secondary log shipped
database• And so on….
9
There might be another solution..
![Page 9: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/9.jpg)
SQL Virtual Database 10
• Allows you to virtual restore databases• Run queries• Change data• Utilizes sparse file technology
– Works with limited disk space• Memory is your friend
– Cost effective
![Page 10: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/10.jpg)
Virtual Database 11
• The other solution– CheckDB on a virtual restore– Use PowerShell– Use a virtual machine
• BONUS– Validate database backups
![Page 11: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/11.jpg)
A Solution 12
• SQL Instance• SQL Virtual Database• SQL Agent Job• PowerShell Script
![Page 12: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/12.jpg)
The Process 13
• Find most recent backups– Can include full,
differential, or transaction log backups
• Restore each one– Using MOVE cmd
• Run CheckDB• Track the progress
![Page 13: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/13.jpg)
DEMO 14
What you’ll see..
• See how sparse file technology helps
• Finding the latest Full/Diff backup• Generating the MOVE command• Calling Virtual Database to restore• Running CheckDB• Tracking the status of things
![Page 14: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/14.jpg)
Some Notes.. 15
• SQL Agent Service Account needs access to backup location
• Virtual DB service account needs the ability to restore on the destination instance
• Cannot restore large number of database at once• You could use the backup location as the source instead
of MSDB– potentially messier script
• Assume backup strategy is set in place– Adjustments can break this process
• Folder permission issues with Virtual Database
![Page 15: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/15.jpg)
Q&A 16
![Page 16: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/16.jpg)
Resources 17
• CheckDB Trace Flags: https://support.microsoft.com/en-us/kb/2634571
• Sparse File Technology: http://blogs.msdn.com/b/jorgepc/archive/2010/11/25/what-are-sparse-files-and-why-should-i-care-as-sql-server-dba.aspx
• Idera Virtual Database: https://www.idera.com/productssolutions/sqlserver/sqlvirtualdatabase
![Page 18: Avoid Corruption Nightmares within your Virtual Database](https://reader035.vdocument.in/reader035/viewer/2022062523/58ed1ebf1a28abed198b469b/html5/thumbnails/18.jpg)
Free Trial Offers 19
Download any of product free for 14-days.
www.IDERA.com