There are a number of common backup problems that occur within SQL Server. This presentation goes over those problems, how they evidence themselves, and how you go about addressing the issues.
%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