Backup and Restore Flashcards
What are the four different media types for backup and restore procedures?
File (local or remote)
URL
Backup Device
Tape
What is the syntax to restore a database from backup (file)?
USE MASTER RESTORE DATABASE [DATABASENAME] FROM DISK = N'C:\LOCATION' WITH FILE = 1, MOVE N'DATAFILE' TO N'C:\LOCATION', MOVE N'LOGFILE' TO N'C:\LOCATION'
What are the different recovery models available for SQL Servers?
SIMPLE
FULL
BULK LOGGED
What is the SIMPLE Recovery model for SQL?
No details are kept in the transaction log so the log file is small.
What is the FULL Recovery model for SQL?
All transactions are recorded in the log file and they are able to be restored
What is the BULK LOGGED Recovery model for SQL?
All transactions are recorded in the log file and they are able to be restored
What is the syntax for changing the recovery model of a database?
USE MASTER
GO
ALTER DATABASE [DATABASENAME] SET RECOVERY WITH NO_WAIT
GO
Where is the location of the recovery model in the GUI?
DATABASE->Properties->Options->Recovery Model
What are the three different backup types?
FULL
DIFFERENTIAL
TRANSACTION (Simple cannot do transaction backups)
What’s the difference between full and bulk logged recovery models?
With Bulk Logged, you can determine if you want to keep bulk inserted records into the transaction log.
What is a FULL backup?
It backs up everything in the database. Creates a new baseline for differential backups.
What is a DIFFERENTIAL backup?
It backs up everything since the last backup (FULL or DIFFERENTIAL)
What is a TRANSACTION LOG BACKUP?
It backs up every transaction since the last backup, whether it was FULL, DIFFERENTIAL OR TRANSACTION LOG.
How do you restore back to a specific point in time?
Restore in this order:
Full
Differential
All Transaction backups until the time needed
What are the different recovery states that you can put for a database restore?
RECOVERY
NORECOVERY
STANDBY