You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
A reliable backup strategy and sound administration practices are essential for any SQL Server environment. This lesson covers backup types, restore operations, SQL Server Agent, Dynamic Management Views (DMVs), and routine maintenance.
SQL Server provides several backup types to protect your data:
| Backup Type | What It Captures | Restoration |
|---|---|---|
| Full | Entire database | Standalone restore point |
| Differential | Changes since the last full backup | Requires the last full backup |
| Transaction Log | Log records since the last log backup | Requires full + chain of log backups |
| Copy-Only | Full or log backup that does not affect the backup chain | Standalone (does not break the chain) |
| Filegroup | Specific filegroups only | Partial database restore |
-- Full backup
BACKUP DATABASE BookStore
TO DISK = 'C:\Backups\BookStore_Full.bak'
WITH COMPRESSION, CHECKSUM;
-- Differential backup
BACKUP DATABASE BookStore
TO DISK = 'C:\Backups\BookStore_Diff.bak'
WITH DIFFERENTIAL, COMPRESSION;
-- Transaction log backup
BACKUP LOG BookStore
TO DISK = 'C:\Backups\BookStore_Log.trn'
WITH COMPRESSION;
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.