| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 479 人关注过本帖
标题:定点还原
只看楼主 加入收藏
棉花糖ONE
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:32
帖 子:2987
专家分:0
注 册:2006-7-13
收藏
 问题点数:0 回复次数:0 
定点还原

if object_id('shiyan') is not null
drop table shiyan
go
create table shiyan(id int)
insert into shiyan select 1
union all select 2
union all select 3
select count(*) as c from shiyan
c
-----------
3
backup database data to disk='c:\data.bak' with format --进行完全备份

select * from student

update student set name='cc' where id=1
select getdate() --记录时间标记为1
go
drop table shiyan --删除表
go
select getdate() --记录时间标记为2
select count(*) as c from shiyan --说明表被删除
服务器: 消息 208,级别 16,状态 1,行 1
对象名 'shiyan' 无效。

backup log data to disk='c:\data_log.bak' with format --备份日志

use master
go
restore database data from disk='c:\data.bak' with norecovery --对完全备份进行恢复

restore log data from disk='c:\data_log.bak' with recovery,stopat=' 时间点改成标志1和标志2之间'
--进行时间点恢复

select count(*) as c from shiyan

c
-----------
3

搜索更多相关主题的帖子: insert create database update count database create insert update count 
2007-03-24 15:57
快速回复:定点还原
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.010638 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved