关闭

还原策略

标签: filediskdatabase脚本go
210人阅读 评论(0) 收藏 举报

1、还原完备 不写入日志

2、还原差备 不写入日志

3、还原日志备份到指定时间点上一个 全不写入日志

4、日志还原到指定时间点。

 

参考脚本如下:

 

 

RESTORE DATABASE [ssssssss] FILE = N'TaoBao' FROM 
DISK = N'F:\DBA\tmptaobao\TaoBao_backup_2012_03_29_033018_4017813.bak'
WITH  FILE = 1,    NOUNLOAD,  STATS = 10
GO
RESTORE DATABASE [ssssssss] FILE = N'TaoBao' FROM
 DISK = N'F:\DBA\tmptaobao\TaoBao_backup_2012_03_29_170002_1443141.bakcy'
  WITH  FILE = 1,  NOUNLOAD,  STATS = 10
GO

RESTORE LOG [ssssssss] FROM 
DISK = N'F:\DBA\tmptaobao\TaoBao_backup_2012_03_29_170502_4604416.trn'
WITH  FILE = 1,  NORECOVERY,  NOUNLOAD,  STATS = 10
GO

RESTORE LOG [ssssssss] FROM 
DISK = N'F:\DBA\tmptaobao\TaoBao_backup_2012_03_29_171502_8118961.trn'
WITH  FILE = 1,  NORECOVERY,  NOUNLOAD,  STATS = 10
GO

RESTORE LOG [ssssssss] FROM 
DISK = N'F:\DBA\tmptaobao\TaoBao_backup_2012_03_29_172502_3833492.trn'
WITH  FILE = 1,  NORECOVERY,  NOUNLOAD,  STATS = 10
GO

RESTORE LOG [ssssssss] FROM 
DISK = N'F:\DBA\tmptaobao\TaoBao_backup_2012_03_29_173502_5008032.trn'
WITH  FILE = 1,  NORECOVERY,  NOUNLOAD,  STATS = 10
GO

RESTORE LOG [ssssssss] FROM 
DISK = N'F:\DBA\tmptaobao\TaoBao_backup_2012_03_29_174501_7446557.trn'
WITH  FILE = 1,  NOUNLOAD,  STATS = 10,  STOPAT = N'2012-03-29T17:41:19'
GO

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:614552次
    • 积分:10201
    • 等级:
    • 排名:第1655名
    • 原创:358篇
    • 转载:514篇
    • 译文:5篇
    • 评论:22条
    最新评论
    TechNet