数据库备份还原到指定时间
---是完整备份.
此时应该先备份一下事务日志文件.
BACKUP LOG dbname TO DISK = 'c:\dbname.bak' WITH NO_TRUNCATE;
--然后还原昨天晚上9点多的数据库备份
RESTORE DATABASE dbname FROM DISK = '备份的文件' WITH NORECOVERY,REPLACE;
--还原刚刚备份的事务日志,并在10点钟停止
RESTORE LOG dbname FROM DISK = 'c:\dbname.bak' WITH STOPAT = '2009-06-20 10:00:00',RECOVERY;
此时应该先备份一下事务日志文件.
BACKUP LOG dbname TO DISK = 'c:\dbname.bak' WITH NO_TRUNCATE;
--然后还原昨天晚上9点多的数据库备份
RESTORE DATABASE dbname FROM DISK = '备份的文件' WITH NORECOVERY,REPLACE;
--还原刚刚备份的事务日志,并在10点钟停止
RESTORE LOG dbname FROM DISK = 'c:\dbname.bak' WITH STOPAT = '2009-06-20 10:00:00',RECOVERY;