[不指定 2007/07/23 16:46 | by 孤城浪子 ]
| |

1、备分日志:现在时间是2006-11-18 09:47

语句如下:

BACKUP LOG test TO DISK='d:\database\0611180947.logs' WITH INIT

提示:

已处理 4 页,这些页属于数据库 'test' 的文件 'test_log'(位于文件 1 上)。

BACKUP LOG 操作成功地处理了 4 页,花费了 0.104 秒(0.275 MB/秒)。

2、恢复之前数据库备份文件test.bak,使用WITH NORECOVERY参数:

RESTORE DATABASE test from disk='d:\database\test.bak' WITH NORECOVERY

提示:

已处理 216 页,这些页属于数据库 'test' 的文件 'test'(位于文件 1 上)。

已处理 1 页,这些页属于数据库 'test' 的文件 'test_log'(位于文件 1 上)。

RESTORE DATABASE 操作成功地处理了 217 页,花费了 0.352 秒(5.029 MB/秒)。

3、使用日志恢复数据库到时间为2006-11-18 09:43,即恢复09:44分的删除和新增操作

RESTORE LOG test FROM disk='d:\database\0611180947.logs' WITH RECOVERY,STOPAT='11/18/2006 09:43'

提示:

已处理 4 页,这些页属于数据库 'test' 的文件 'test_log'(位于文件 1 上)。

RESTORE LOG 操作成功地处理了 4 页,花费了 0.016 秒(1.792 MB/秒)。

至此,再进入到软件中,可以看到,数据已经还原到原来的状态了

Tags:
系统经验 | 评论(0) | 引用(0) | 阅读(3682)
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]