150 likes | 354 Views
SQL Server 2000 Backup & Recovery. Palak Patel. Backup Plan. Why backup? How Often will the backup occur? – How the system databases will be backed up? To what medium the backups will be made? Who will be responsible for the backups How will be the backup verified?
E N D
SQL Server 2000Backup & Recovery Palak Patel
Backup Plan • Why backup? • How Often will the backup occur? – How the system databases will be backed up? • To what medium the backups will be made? • Who will be responsible for the backups • How will be the backup verified? • What will be the policy for backing up non-logged operations?
Using Windows and Hardware to Protect SQL Server • Various Security measures in Windows • Windows Capabilities of RAID Configurations • RAID Hardware based configurations • Windows Clustering • Standby Servers • Log Shipping (Only with Enterprise Edition). Use Database maintenance Wizard to Set it up
DBCC, Transaction & Copy Database Wizard • DBCC CHECKDB • DBCC CHECKALLOC • DBCC CHECKCATALOG Understand the Concept of a Database Transaction Copy Database Wizard to Copy the Database
SQL Database Backup Modes • Full Recovery • Bulk-logged Recovery • Simple Recovery
Backup Types • Complete Backup • Transaction Log Backup • Differential Database Backup • File group Backups
Backup Characteristics • While database is being backup, you can do everything but • Creating / Rebuilding Indexes • Creating / Modifying tables • Creating / Modifying columns
Backup Devices • Disk • Tape • Creating Backup Device • Using EM • sp_addumpdevice • Removing Backup Device • Using EM • Sp_dropdevice • Sp_helpdevice
Backing up and Restoring Directly From Files e.g. • BACKUP DATABASE Pubs TO Disk = ‘c:\mssql7\data\pubs.bak’
Backing Up Databases & Log • BACKUP DATABASE • BACKUP LOG (TRUNCATE_ONLY, NO_TRUNCATE, NO_LOG Switches) • Using EM • Performing Parallel Stripped Backups • Performing Differential Backups • Performing File Group Backups • Scheduling Backups
Restoring the Database • RESTORE DATABASE • Options: RESTRICTED_USER, RECOVERY (Default), NO_RECOVERY, REPLACE, STANDBY, RESTART • Using EM • Restoring Full Databases • Restoring File Groups • Restoring Differential Backups • Restore the Log • Restoring to a Certain Time
Restoring Databases - Steps • General Restore Steps • Attempt to Backup Transaction Log • Find and Fix cause of failure • Drop the Affected database • Restore the database • Recover the database • DEMO
Restoring Master Database • If you have backup, • Start SQL Server Using SQLSERVR –m • Restore the master database • If you do not have backup • Use rebuildm.exe • Reattach all the user databases • Recreate setting for SQL Server • Recreate Logins and Users for each database • Recreate msdb, model and distribution databases