avoid corruption nightmares within your virtual database

18
Avoid Corruption Nightmares with IDERA’s Virtual Database and CheckDB February 10 th , 2016 John Morehouse Database Architect Farm Credit Mid-America, Louisville, Kentucky

Upload: idera-software

Post on 12-Apr-2017

314 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Avoid Corruption Nightmares within your Virtual Database

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

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 3: Avoid Corruption Nightmares within your Virtual Database

Contact Me 2

@SqlRUs

http://linkedin.com/in/sqlrus

http://www.sqlrus.com

[email protected]

Page 4: Avoid Corruption Nightmares within your Virtual Database

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

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

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

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

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

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

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

A Solution 12

• SQL Instance• SQL Virtual Database• SQL Agent Job• PowerShell Script

Page 12: Avoid Corruption Nightmares within your Virtual Database

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

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

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

Q&A 16

Page 17: Avoid Corruption Nightmares within your Virtual Database

THANK YOU!!

@SqlRUs

http://linkedin.com/in/sqlrus

http://www.sqlrus.com

[email protected]

Page 18: Avoid Corruption Nightmares within your Virtual Database

Free Trial Offers 19

Download any of product free for 14-days.

www.IDERA.com