SlideShare a Scribd company logo
1 of 17
Download to read offline
Grant Fritchey | www.ScaryDBA.com
www.ScaryDBA.com
Common Backup
Problems
Grant Fritchey, Red Gate Software
Grant Fritchey | www.ScaryDBA.com
Goals
 Identify common backup issues
 Prevent those issues from occurring
2
Grant Fritchey | www.ScaryDBA.com
Agenda
 SQL Server Backups
 File Backups
 Drive Space
 FullTransaction Log
 Network Backups
 Differential Only
 Broken Backup Chain
 TheWrong Server
 Backup Load
 BackupTesting
3
Grant Fritchey | www.ScaryDBA.com
grant@scarydba.com www.scarydba.com
@gfritchey www.linkedin.com/in/scarydba
Grant Fritchey
Product Evangelist, Red Gate Software
Grant Fritchey | www.ScaryDBA.com
SQL Server Backups
 Complete copy of the database
» Not an export
» Not a script
» Not a file copy
 Principal means of protecting the business data
 Multiple BackupTypes
» Full
» Differential
» File/FileGroup
» Log
» Partial
5
Grant Fritchey | www.ScaryDBA.com
File Backups
 Indications
» File backup only
» Expected restore from .MDF & .LDF files
 Cause
» SQL Server locks the files while they’re in use
 Remedy
» Run a real backup
» Stop the server, copy the files, start the server
(and no, I’m not serious)
 Emergency
» Try using ATTACH, but don’t hold out hope
6
Grant Fritchey | www.ScaryDBA.com
Drive Space
 Indications
» Errors on backup
» Alerts on drive space
» No backups available
 Cause
» Not monitoring drive space
» Database size increased
 Remedy
» Monitor your drive space
» Clean up backups
» Monitor database size
 Emergency
» If the backup failed, no options
7
Grant Fritchey | www.ScaryDBA.com
Full Transaction Log
 Indications
» Log files constantly growing
» Transaction errors caused by full file
 Cause
» Log backups failed
» Log backups never implemented
 Remedy
» Set up scheduled log backups
» If FULL RECOVERY not needed, switch to SIMPLE
 Emergency
» Attach an additional log file
— Not always possible
8
Grant Fritchey | www.ScaryDBA.com
Network Backups
 Indications
» Backups extremely slow
» Timeout on backups
» Resource contention on server
 Cause
» Backing up across network instead of through
dedicated fiber channel
 Remedy
» Backup to “local” drive
» If needed backup locally then copy the file
 Emergency
» Do it anyway
9
Grant Fritchey | www.ScaryDBA.com
Differential Only
 Indications
» Error, no files ready to roll forward
 Cause
» No FULL restore run
» Full restore run, but database recovered
 Remedy
» Run a FULL restore
» UseWITH NORECOVERY on restore
» Make sure you have a FULL backup
 Emergency
» With no full backup, no options
10
Grant Fritchey | www.ScaryDBA.com
Broken Backup Chain
 Indications
» Error: Database has not been restored to the correct
earlier state
 Cause
» Wrong Full backup
» Extra Full backup taken
 Remedy
» Use correct Full backup
» Use SNAPSHOT
» Use COPY_ONLY
 Emergency
» If you have all the log backups, you can use those
instead
11
Grant Fritchey | www.ScaryDBA.com
The Wrong Server
 Indications
» Phone is ringing
 Cause
» Ran a restore on wrong server
» UsedWITH ROLLBACK IMMEDIATE
 Remedy
» Use different security for production
» Color code production servers
» Don’t use ROLLBACK IMMEDIATE
 Emergency
» Yes it is
12
Grant Fritchey | www.ScaryDBA.com
Backup Load
 Indications
» Excessive CPU or I/O contention
» Waits on backups
» Blocking
 Cause
» Excessive load on server makes backups difficult
 Remedy
» Backup from AlwaysOn
 Emergency
» Do what you must
13
Grant Fritchey | www.ScaryDBA.com
Backup Testing
 “You’re only as good as your last restore”
KimberlyTripp (as far as I can determine)
 DBCC
» Against Production
» Against a Backup
 CHECKSUM
» Added overhead
 VERIFYONLY
» Header only without checksum
 RESTORE
» Like nuking from orbit, the only way to be sure
14
Grant Fritchey | www.ScaryDBA.com
Goals
 Identify common backup issues
 Prevent those issues from occurring
15
Grant Fritchey | www.ScaryDBA.com
Resources
 Scarydba.com/backup
 Preventable Backup Errors: http://www.simple-
talk.com/sql/database-administration/7-preventable-
backup-errors/
 Backup and Restore for the Accidental DBA:
http://www.simple-talk.com/sql/database-
administration/sql-server-backup-and-restore-for-the-
accidental-dba/
 SQL Server Backups: http://www.simple-
talk.com/sql/backup-and-recovery/sql-server-2005-
backups/
16
Grant Fritchey | www.ScaryDBA.com
Questions?
17

More Related Content

Viewers also liked

IBM Websphere MQ Basic
IBM Websphere MQ BasicIBM Websphere MQ Basic
IBM Websphere MQ Basic
PRASAD BHATKAR
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
2.6 backup and recovery
2.6 backup and recovery2.6 backup and recovery
2.6 backup and recovery
mrmwood
 

Viewers also liked (16)

Tutorial backup sql server
Tutorial backup sql serverTutorial backup sql server
Tutorial backup sql server
 
How to Restore SQL Server Database
How to Restore SQL Server DatabaseHow to Restore SQL Server Database
How to Restore SQL Server Database
 
SQL Server Backup and Recovery Challenges
SQL Server Backup and Recovery ChallengesSQL Server Backup and Recovery Challenges
SQL Server Backup and Recovery Challenges
 
Sql server backup internals
Sql server backup internalsSql server backup internals
Sql server backup internals
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basics
 
MS SQL Server 2014 - In-Memory OLTP
MS SQL Server 2014 - In-Memory OLTPMS SQL Server 2014 - In-Memory OLTP
MS SQL Server 2014 - In-Memory OLTP
 
websphere MQ training Online
websphere MQ training Onlinewebsphere MQ training Online
websphere MQ training Online
 
SQL Server Backup and Restore
SQL Server Backup and RestoreSQL Server Backup and Restore
SQL Server Backup and Restore
 
MICROSOFT SQL SERVER 2012
MICROSOFT SQL SERVER 2012MICROSOFT SQL SERVER 2012
MICROSOFT SQL SERVER 2012
 
IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online Tutorials
 
IBM Websphere MQ Basic
IBM Websphere MQ BasicIBM Websphere MQ Basic
IBM Websphere MQ Basic
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
Websphere MQ admin guide
Websphere MQ admin guideWebsphere MQ admin guide
Websphere MQ admin guide
 
2.6 backup and recovery
2.6 backup and recovery2.6 backup and recovery
2.6 backup and recovery
 
Always on in SQL Server 2012
Always on in SQL Server 2012Always on in SQL Server 2012
Always on in SQL Server 2012
 
IBM WebSphere MQ Introduction
IBM WebSphere MQ Introduction IBM WebSphere MQ Introduction
IBM WebSphere MQ Introduction
 

Similar to Common SQL Server Backup Problems

Cscu module 05 data backup and disaster recovery
Cscu module 05 data backup and disaster recoveryCscu module 05 data backup and disaster recovery
Cscu module 05 data backup and disaster recovery
Sejahtera Affif
 

Similar to Common SQL Server Backup Problems (20)

Tech comm presentation 2014 01-16
Tech comm presentation 2014 01-16Tech comm presentation 2014 01-16
Tech comm presentation 2014 01-16
 
Kroll Ontrack Recovering Your Virtual Data
Kroll Ontrack Recovering Your Virtual DataKroll Ontrack Recovering Your Virtual Data
Kroll Ontrack Recovering Your Virtual Data
 
Firebird database recovery and protection for enterprises and ISV
Firebird database recovery and protection for enterprises and ISVFirebird database recovery and protection for enterprises and ISV
Firebird database recovery and protection for enterprises and ISV
 
Backing up your data
Backing up your dataBacking up your data
Backing up your data
 
Surveon Powerful Data Backup Solutions
Surveon Powerful Data Backup SolutionsSurveon Powerful Data Backup Solutions
Surveon Powerful Data Backup Solutions
 
Data loss and data recovery
Data loss and data recoveryData loss and data recovery
Data loss and data recovery
 
Nevera Dul Moment
Nevera Dul MomentNevera Dul Moment
Nevera Dul Moment
 
Cscu module 05 data backup and disaster recovery
Cscu module 05 data backup and disaster recoveryCscu module 05 data backup and disaster recovery
Cscu module 05 data backup and disaster recovery
 
Preventive Maintenance
Preventive MaintenancePreventive Maintenance
Preventive Maintenance
 
Technical track-afterimaging Progress Database
Technical track-afterimaging Progress DatabaseTechnical track-afterimaging Progress Database
Technical track-afterimaging Progress Database
 
NCET Tech
NCET Tech NCET Tech
NCET Tech
 
NCET Tech Bite - Cloud Storage and Data Backup - June 2015
NCET Tech Bite - Cloud Storage and Data Backup - June 2015NCET Tech Bite - Cloud Storage and Data Backup - June 2015
NCET Tech Bite - Cloud Storage and Data Backup - June 2015
 
Windows Internal - Ch9 memory management
Windows Internal - Ch9 memory managementWindows Internal - Ch9 memory management
Windows Internal - Ch9 memory management
 
5 Bare Minimum Things A Web Startup CTO Must Worry About
5 Bare Minimum Things A Web Startup CTO Must Worry About5 Bare Minimum Things A Web Startup CTO Must Worry About
5 Bare Minimum Things A Web Startup CTO Must Worry About
 
Php go vrooom!
Php go vrooom!Php go vrooom!
Php go vrooom!
 
Grant Fritchey - Common problems in backup and recovery and how to handle them
Grant Fritchey - Common problems in backup and recovery and how to handle themGrant Fritchey - Common problems in backup and recovery and how to handle them
Grant Fritchey - Common problems in backup and recovery and how to handle them
 
SQL Server Optimization Checklist
SQL Server Optimization ChecklistSQL Server Optimization Checklist
SQL Server Optimization Checklist
 
Backup beyond just a strategy with SQL Server
Backup beyond just a strategy with SQL ServerBackup beyond just a strategy with SQL Server
Backup beyond just a strategy with SQL Server
 
DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14
 
Linux Recovery
Linux RecoveryLinux Recovery
Linux Recovery
 

More from Grant Fritchey

More from Grant Fritchey (20)

Migrating To PostgreSQL
Migrating To PostgreSQLMigrating To PostgreSQL
Migrating To PostgreSQL
 
PostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingPostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and Alerting
 
Automating Database Deployments Using Azure DevOps
Automating Database Deployments Using Azure DevOpsAutomating Database Deployments Using Azure DevOps
Automating Database Deployments Using Azure DevOps
 
Learn To Effectively Use Extended Events_Techorama.pdf
Learn To Effectively Use Extended Events_Techorama.pdfLearn To Effectively Use Extended Events_Techorama.pdf
Learn To Effectively Use Extended Events_Techorama.pdf
 
Using Query Store to Understand and Control Query Performance
Using Query Store to Understand and Control Query PerformanceUsing Query Store to Understand and Control Query Performance
Using Query Store to Understand and Control Query Performance
 
You Should Be Standing Here: Learn How To Present a Session
You Should Be Standing Here: Learn How To Present a SessionYou Should Be Standing Here: Learn How To Present a Session
You Should Be Standing Here: Learn How To Present a Session
 
Redgate Community Circle: Tools For SQL Server Performance Tuning
Redgate Community Circle: Tools For SQL Server Performance TuningRedgate Community Circle: Tools For SQL Server Performance Tuning
Redgate Community Circle: Tools For SQL Server Performance Tuning
 
10 Steps To Global Data Compliance
10 Steps To Global Data Compliance10 Steps To Global Data Compliance
10 Steps To Global Data Compliance
 
Time to Use the Columnstore Index
Time to Use the Columnstore IndexTime to Use the Columnstore Index
Time to Use the Columnstore Index
 
Introduction to SQL Server in Containers
Introduction to SQL Server in ContainersIntroduction to SQL Server in Containers
Introduction to SQL Server in Containers
 
DevOps for the DBA
DevOps for the DBADevOps for the DBA
DevOps for the DBA
 
SQL Injection: How It Works, How to Stop It
SQL Injection: How It Works, How to Stop ItSQL Injection: How It Works, How to Stop It
SQL Injection: How It Works, How to Stop It
 
Privacy and Protection in the World of Database DevOps
Privacy and Protection in the World of Database DevOpsPrivacy and Protection in the World of Database DevOps
Privacy and Protection in the World of Database DevOps
 
SQL Server Tools for Query Tuning
SQL Server Tools for Query TuningSQL Server Tools for Query Tuning
SQL Server Tools for Query Tuning
 
Extending DevOps to SQL Server
Extending DevOps to SQL ServerExtending DevOps to SQL Server
Extending DevOps to SQL Server
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Introducing Azure Databases
Introducing Azure DatabasesIntroducing Azure Databases
Introducing Azure Databases
 
Statistis, Row Counts, Execution Plans and Query Tuning
Statistis, Row Counts, Execution Plans and Query TuningStatistis, Row Counts, Execution Plans and Query Tuning
Statistis, Row Counts, Execution Plans and Query Tuning
 
Understanding Your Servers, All Your Servers
Understanding Your Servers, All Your ServersUnderstanding Your Servers, All Your Servers
Understanding Your Servers, All Your Servers
 
Changing Your Habits: Tips to Tune Your T-SQL
Changing Your Habits: Tips to Tune Your T-SQLChanging Your Habits: Tips to Tune Your T-SQL
Changing Your Habits: Tips to Tune Your T-SQL
 

Recently uploaded

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Common SQL Server Backup Problems

  • 1. Grant Fritchey | www.ScaryDBA.com www.ScaryDBA.com Common Backup Problems Grant Fritchey, Red Gate Software
  • 2. Grant Fritchey | www.ScaryDBA.com Goals  Identify common backup issues  Prevent those issues from occurring 2
  • 3. Grant Fritchey | www.ScaryDBA.com Agenda  SQL Server Backups  File Backups  Drive Space  FullTransaction Log  Network Backups  Differential Only  Broken Backup Chain  TheWrong Server  Backup Load  BackupTesting 3
  • 4. Grant Fritchey | www.ScaryDBA.com grant@scarydba.com www.scarydba.com @gfritchey www.linkedin.com/in/scarydba Grant Fritchey Product Evangelist, Red Gate Software
  • 5. Grant Fritchey | www.ScaryDBA.com SQL Server Backups  Complete copy of the database » Not an export » Not a script » Not a file copy  Principal means of protecting the business data  Multiple BackupTypes » Full » Differential » File/FileGroup » Log » Partial 5
  • 6. Grant Fritchey | www.ScaryDBA.com File Backups  Indications » File backup only » Expected restore from .MDF & .LDF files  Cause » SQL Server locks the files while they’re in use  Remedy » Run a real backup » Stop the server, copy the files, start the server (and no, I’m not serious)  Emergency » Try using ATTACH, but don’t hold out hope 6
  • 7. Grant Fritchey | www.ScaryDBA.com Drive Space  Indications » Errors on backup » Alerts on drive space » No backups available  Cause » Not monitoring drive space » Database size increased  Remedy » Monitor your drive space » Clean up backups » Monitor database size  Emergency » If the backup failed, no options 7
  • 8. Grant Fritchey | www.ScaryDBA.com Full Transaction Log  Indications » Log files constantly growing » Transaction errors caused by full file  Cause » Log backups failed » Log backups never implemented  Remedy » Set up scheduled log backups » If FULL RECOVERY not needed, switch to SIMPLE  Emergency » Attach an additional log file — Not always possible 8
  • 9. Grant Fritchey | www.ScaryDBA.com Network Backups  Indications » Backups extremely slow » Timeout on backups » Resource contention on server  Cause » Backing up across network instead of through dedicated fiber channel  Remedy » Backup to “local” drive » If needed backup locally then copy the file  Emergency » Do it anyway 9
  • 10. Grant Fritchey | www.ScaryDBA.com Differential Only  Indications » Error, no files ready to roll forward  Cause » No FULL restore run » Full restore run, but database recovered  Remedy » Run a FULL restore » UseWITH NORECOVERY on restore » Make sure you have a FULL backup  Emergency » With no full backup, no options 10
  • 11. Grant Fritchey | www.ScaryDBA.com Broken Backup Chain  Indications » Error: Database has not been restored to the correct earlier state  Cause » Wrong Full backup » Extra Full backup taken  Remedy » Use correct Full backup » Use SNAPSHOT » Use COPY_ONLY  Emergency » If you have all the log backups, you can use those instead 11
  • 12. Grant Fritchey | www.ScaryDBA.com The Wrong Server  Indications » Phone is ringing  Cause » Ran a restore on wrong server » UsedWITH ROLLBACK IMMEDIATE  Remedy » Use different security for production » Color code production servers » Don’t use ROLLBACK IMMEDIATE  Emergency » Yes it is 12
  • 13. Grant Fritchey | www.ScaryDBA.com Backup Load  Indications » Excessive CPU or I/O contention » Waits on backups » Blocking  Cause » Excessive load on server makes backups difficult  Remedy » Backup from AlwaysOn  Emergency » Do what you must 13
  • 14. Grant Fritchey | www.ScaryDBA.com Backup Testing  “You’re only as good as your last restore” KimberlyTripp (as far as I can determine)  DBCC » Against Production » Against a Backup  CHECKSUM » Added overhead  VERIFYONLY » Header only without checksum  RESTORE » Like nuking from orbit, the only way to be sure 14
  • 15. Grant Fritchey | www.ScaryDBA.com Goals  Identify common backup issues  Prevent those issues from occurring 15
  • 16. Grant Fritchey | www.ScaryDBA.com Resources  Scarydba.com/backup  Preventable Backup Errors: http://www.simple- talk.com/sql/database-administration/7-preventable- backup-errors/  Backup and Restore for the Accidental DBA: http://www.simple-talk.com/sql/database- administration/sql-server-backup-and-restore-for-the- accidental-dba/  SQL Server Backups: http://www.simple- talk.com/sql/backup-and-recovery/sql-server-2005- backups/ 16
  • 17. Grant Fritchey | www.ScaryDBA.com Questions? 17