Vous êtes sur la page 1sur 10

Module 3

Backup and Restore BD

MCT. Ing. Zeila Benavidez


Module Overview
• Backup Databases.
• Type Backup Databases.
• Restore Databases
– Restore Options
– Restore State

• Restore Types
Backup and Restore Database
Backup Database
• What is Transaction Recovery Model
• Recovery models are designed to
Log file?
control transaction log maintenance. A
– Keeps track of all database recovery model is a database property
changes that controls how transactions are
logged, whether the transaction log
– Allows for rollback
requires (and allows) backing up, and
– All changes are written in what kinds of restore operations are

the log first available. Three recovery models


exist: simple, full, and bulk-logged
Type of Backup Database
Full Backups:
• A full database backup backs up the whole database.
This includes part of the transaction log so that the full
database can be recovered after a full database backup
is restored.

Differential Backups
• A differential backup is based on the most recent,
previous full data backup. A differential backup captures
only the data that has changed since that full backup.

Transaction Log Backups


• Minimally, you must have created at least one full
backup before you can create any log backups. After
that, the transaction log can be backed up at any time
unless the log is already being backed up. We
recommend that you take log backups frequently.
Restore Database
Restore Options
Overwrite the existing database [WITH REPLACE]
• The restore operation will overwrite the files of any
database that is currently using the database name
that you are specifying in the Restore to field.
Preserve the replication settings [WITH
KEEP_REPLICATION]
• Preserves the replication settings when restoring a
published database to a server other than the server
where the database was created. This option is
relevant only if the database was replicated when the
backup was created.
Restrict access to the restored database [WITH
RESTRICTED_USER]
• Makes the restored database available only to the
members of db_owner, dbcreator, or sysadmin.
Restore States
RESTORE WITH RECOVERY
• Recovers the database after restoring the
final backup.

RESTORE WITH NORECOVERY


• Leaves the database in the restoring state.
This allows you to restore additional backups
in the current recovery path.

RESTORE WITH STANDBY


• Leaves the database in a standby state, in
which the database is available for limited
read-only access.
Restore

• To restore a Simple full database backup.

• To restore a full and differential database


backup.

• Back Up the Transaction Log


Q&A

Vous aimerez peut-être aussi