您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

差异备份的恢复问题_MySQL

2025/12/28 6:26:38发布16次查看
a : 情况是这样的 
create  database  test 
create  table  t(a  int) 
insert  into  test..t  select  1 
然后进行一次完整备份 
backup  database  test  to  disk='c: est.bak' 
insert  into  test..t  select  2 
再进行一次完整备份 
backup  database  test  to  disk='c: est.bak' 
insert  into  test..t  select  3 
此时用  restore  database  test  from  disk='c: est.bak'  with  file=1 
结果为  1,  此为正确 
用  restore  database  test  from  disk='c: est.bak'  with  file=2 
结果为  1, 
2  此也为正确 
当表t中为1,2,3的时候,在插入一条纪录结果为1,2,3,4然后进行一次差异备份 
backup  database  test  to  disk='c: est.bak'  with  differential 
然后往执行delete  from  t  删除所有纪录 
我现在想恢复最后的那次差异备份(结果为1,2,3,4),用语句改如何实现呢? 
---------------------------------------------------------------   
下面的是详细的过程,在我的电脑上测试成功:   
--清除环境,防止现有的数据影响测试结果 
exec  master..xp_cmdshell  'del  c: ext.bak' 
if  exists(select  *  from  master..sysdatabases  where  name='test') 
drop  database  test 
go
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product