backup database oa to disk='d:/oa.bak' select getdate() 2011-06-30 14:46:36.653 create table testbtr(id int,name varchar(10)); select getdate() 2011-06-30 14:47:41.373 declare @i int begin set @i=1 while @i<100 begin insert into testbtr values(@i,'anbob') set @i=@i+1 end end select getdate() 2011-06-30 14:48:01.640 delete from testbtr where id >90 select getdate() 2011-06-30 14:48:18.890 backup log oa to disk='d:/oa.log' select getdate() 2011-06-30 14:48:40.513 RESTORE DATABASE oa from disk='d:/oa.bak' WITH NORECOVERY ------------------ 已处理 1160 页,这些页属于数据库 'oa' 的文件 'oa'(位于文件 1 上)。 已处理 1 页,这些页属于数据库 'oa' 的文件 'oa_log'(位于文件 1 上)。 RESTORE DATABASE 操作成功地处理了 1161 页,花费了 1.772 秒(5.363 MB/秒)。 RESTORE LOG oa FROM disk='d:\oa.log' WITH RECOVERY,STOPAT='2011-06-30 14:48:01' ------------------- 已处理 9 页,这些页属于数据库 'oa' 的文件 'oa_log'(位于文件 1 上)。 RESTORE LOG 操作成功地处理了 9 页,花费了 0.038 秒(1.805 MB/秒)。 select count(*) from oa..testbtr -------------------- 99
1 thought on “sqlserver base time-point recovery”
Comments are closed.
Thanks very much for enabling all of us the fantastic possibility to read your blog page. Your items are usually very helpful and packed with a lot of good fun for me personally. However even my colleagues love to read your blog posts as they are able to understand a good deal from them. Most of us really respect your in-depth knowledge and we genuinely appreciate you sharing them in your posts.