A recommended process for implementing differential database backups is: Create regular database backups.
Create a differential database backup periodically between database backups, such as every four hours or more for highly active systems.
If using Full or Bulk-Logged Recovery, create transaction log backups more frequently than differential database backups, such as every 30 minutes.
The sequence for restoring differential database backups is: Restore the most recent database backup.
Restore the last differential database backup.
Apply all transaction log backups created after the last differential database backup was created if you use Full or Bulk-Logged Recovery.
光说不练之龙飞虎
Create a differential database backup periodically between database backups, such as every four hours or more for highly active systems.
If using Full or Bulk-Logged Recovery, create transaction log backups more frequently than differential database backups, such as every 30 minutes.
The sequence for restoring differential database backups is: Restore the most recent database backup.
Restore the last differential database backup.
Apply all transaction log backups created after the last differential database backup was created if you use Full or Bulk-Logged Recovery.
光说不练之龙飞虎
Important It is not possible to create a differential database backup unless the database has been backed up first.Execute the BACKUP DATABASE statement to create the differential database backup, specifying:
The name of the database to back up.
The backup device where the database backup will be written.
The DIFFERENTIAL clause, to specify that only the parts of the database that have changed after the last database backup was created are backed up.
Optionally, specify:
The INIT clause to overwrite the backup media, and write the backup as the first file on the backup media. If no existing media header exists, one is automatically written.
The SKIP and INIT clauses to overwrite the backup media even if there are either backups on the backup media that have not yet expired, or the media name does not match the name on the backup media.
The FORMAT clause when using media for the first time to completely initialize the backup media and rewrite any existing media header.
The INIT clause is not required if the FORMAT clause is specified.
Important Use extreme caution when using the FORMAT or INIT clauses of the BACKUP statement as this will destroy any backups previously stored on the backup media.
Examples
This example creates a full and a differential database backup for the MyNwind database.-- Create a full database backup first.
BACKUP DATABASE MyNwind
TO MyNwind_1
WITH INIT
GO
-- Time elapses.
-- Create a differential database backup, appending the backup
-- to the backup device containing the database backup.
BACKUP DATABASE MyNwind
TO MyNwind_1
WITH DIFFERENTIAL
GO光说不练之龙飞虎
Execute the RESTORE DATABASE statement to restore the differential database backup, specifying:
The name of the database to which the differential database backup will be applied.
The backup device where the differential database backup will be restored from.
The NORECOVERY clause if you have transaction log backups to apply after the differential database backup is restored, otherwise specify the RECOVERY clause.
Examples
A. Restoring a database and differential database backup
This example restores a database and differential database backup of the MyNwind database.-- Assume the database is lost at this point. Now restore the full
-- database. Specify the original full backup and NORECOVERY.
-- NORECOVERY allows subsequent restore operations to proceed.
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH NORECOVERY
GO
-- Now restore the differential database backup, the second backup on
-- the MyNwind_1 backup device.
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH FILE = 2,
RECOVERY
GOB. Restoring a database, differential database, and transaction log backup
This example restores a database, differential database, and transaction log backup of the MyNwind database.-- Assume the database is lost at this point. Now restore the full
-- database. Specify the original full backup and NORECOVERY.
-- NORECOVERY allows subsequent restore operations to proceed.
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH NORECOVERY
GO
-- Now restore the differential database backup, the second backup on
-- the MyNwind_1 backup device.
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH FILE = 2,
NORECOVERY
GO
-- Now restore each transaction log backup created after
-- the differential database backup.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH NORECOVERY
GO
RESTORE LOG MyNwind
FROM MyNwind_log2
WITH RECOVERY
GO光说不练之龙飞虎
你的意思是在查询分析器里,先作一个备份,再 WITH DIFFERENTIAL一下?
有没有更简单的方法,我记得在企业管理器里面也能实现的啊