20 个解决方案
#1
除了数据外,还有数据库的视图、存储过程也都不见啦....郁闷啊!
#2
SQL还原
======================================================================
1、验证备份
------------------------------------------------------------
restore headeronly from bak3
restore filelistonly from bak3 with file=1
restore labelonly from bak3
restore verifyonly from bak3
----------------------------------------------------------------------
2、从备份中还原
-------------------------------------------------------------------------
restore headeronly from bak1
restore database d1 from bak1 with file=2 --从完全备份中恢复
----------------------------------------------------------------------
restore headeronly from bak2 --从差异备份中恢复
restore database d2 from bak2 with file=1,norecovery
restore database d2 from bak2 with file=5,recovery
----------------------------------------------------------------------
restore headeronly from bak3 --从日志备份中恢复
restore database d3 from bak3 with file=1,norecovery
restore log d3 from bak3 with file=2,norecovery
restore log d3 from bak3 with file=3,norecovery
restore log d3 from bak3 with file=4,norecovery
restore log d3 from bak3 with file=5,recovery
----------------------------------------------------------------------
restore database d3 from bak3 with file=1,norecovery --恢复到指定时间
restore log d3 from bak3 with file=2,norecovery
restore log d3 from bak3 with file=3,norecovery
restore log d3 from bak3 with file=4,recovery,stopat='2003-08-15 11:29:00.000'
----------------------------------------------------------------------
restore database d5 filegroup='FG2' from bak5 with file=4,norecovery --还原文件组备份
restore log d5 from bak5 with file=5,norecovery
restore log d5 from bak5 with file=7,recovery
----------------------------------------------------------------------
restore headeronly from bak6 --还原文件备份
restore database d5 file='d5_data3' from bak6 with file=6,norecovery
restore log d5 from bak6 with file=7,norecovery
restore log d5 from bak6 with file=9,recovery
----------------------------------------------------------------------
restore database d5 from bak6 with replace --删除现有数据库,从备份中重建数据库
----------------------------------------------------------------------
create database d6 --move to将数据库文件移动到新位置
on primary
(name=d6_data,
filename='E:\Program Files\Microsoft SQL Server\MSSQL\data\d6_Data.MDF',
size=2MB)
log on
(name=d6_log,
filename='E:\Program Files\Microsoft SQL Server\MSSQL\data\d6_log.ldf',
size=2MB)
go
backupdatabase d6 to bak6 with init
drop database d6
restore database d6 from bak6
with move 'd6_data' to 'e:\data\d6\d6_data.mdf',
move 'd6_log'to 'e:\data\d6\d6_log.ldf'
sp_helpdb d6
----------------------------------------------------------------------
3、分离与重连接数据库
--------------------------------------
sp_detach_db 'd6'
sp_attach_db 'd6','e:\data\d6\d6_data.mdf','e:\data\d6\d6_log.ldf'
--------------------------------------
sp_detach_db d6
go
create database d6
on primary
(filename='e:\data\d6\d6_data.mdf')
for attach
go
----------------------------------------------------------------------
4、恢复损坏的系统数据库
----------------------------------------------------------------------
1)先备份MASTER、MSDB
2)停止SQL服务,将MASTER数据库文件删除或者重命名。这样,SQL服务将不能启动。
3)系统数据库的还原
-----------------------------------------------
(1)如果SQL服务还能启动,则从备份中恢复系统数据库。
(2)如果SQL服务不能启动,则需要重建系统数据库。
使用SQL文件夹TOOLS\BINN目录下的Rebuildm.exe重建master数据库。
(3)创建备份设备,指向以前的备份设备。
(4)以单用户模式启动SQL
cd programe files\microsoft sql server\mssql\binn
sqlservr.exe -c -m
(5)进查询分析器,从备份中恢复master数据库。
restore database master from masterbak
restore database msdb from disk='e:\bak\msdb.bak'
MASTER还原后,SQL中用户数据库的信息也会恢复。
(6)如果MASTER没有备份,则需要用sp_attach_db命令将用户数据库附加到新的MASTER数据库中。
--不确定可以恢复,参考资料,希望可以帮助到楼主
#4
谢谢,但我现在只有差异备份的文件,是在硬盘损坏之前拷贝出来的,但由于粗心没有拷贝完全备份,用sql还原工具无法还原差异备份文件。怎么办?
#5
没有完全备份,只有差异备份无法恢复
等高手
#6
啊!越来越郁闷啦....高手您在哪里啊?我的电话15604153689.
#7
如果你只有差异备份文件,是不能恢复的了
#8
我的差异备份文件还有日志:但我不理解为什么会很大,每天没有这么大的文件,日志有错误提示:请帮助分析,我怀疑这个差异备份中有很多数据,每个文件5-6G
Microsoft(R) 服务器维护实用工具(Unicode)版本 9.0.1399
报告是在“sjg889”上生成的。
维护计划: 每周四备份数据到G盘
持续时间: 00:03:48
状态: 成功。
详细信息:
备份数据库(完整) (sjg889)
在 目标服务器连接 上备份数据库
数据库: 822案件,GSM,gsmdata,sjg889,sjg8899,sjg88991
类型: 差异
追加现有
任务开始: 2012-5-10 2:00。
任务结束: 2012-5-10 2:04。
成功
命令:BACKUP DATABASE [822案件] TO DISK = N''G:\sql2005数据库备份\822案件_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''822案件_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''822案件'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''822案件'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“822案件”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\822案件_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [GSM] TO DISK = N''G:\sql2005数据库备份\GSM_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''GSM_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''GSM'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''GSM'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“GSM”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\GSM_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [gsmdata] TO DISK = N''G:\sql2005数据库备份\gsmdata_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''gsmdata_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''gsmdata'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''gsmdata'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“gsmdata”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\gsmdata_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg889] TO DISK = N''G:\sql2005数据库备份\sjg889_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg889_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg889'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg889'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg889”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg889_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg8899] TO DISK = N''G:\sql2005数据库备份\sjg8899_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg8899_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg8899'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg8899'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg8899”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg8899_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg88991] TO DISK = N''G:\sql2005数据库备份\sjg88991_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg88991_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg88991'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg88991'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg88991”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg88991_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
Microsoft(R) 服务器维护实用工具(Unicode)版本 9.0.1399
报告是在“sjg889”上生成的。
维护计划: 每周四备份数据到G盘
持续时间: 00:03:48
状态: 成功。
详细信息:
备份数据库(完整) (sjg889)
在 目标服务器连接 上备份数据库
数据库: 822案件,GSM,gsmdata,sjg889,sjg8899,sjg88991
类型: 差异
追加现有
任务开始: 2012-5-10 2:00。
任务结束: 2012-5-10 2:04。
成功
命令:BACKUP DATABASE [822案件] TO DISK = N''G:\sql2005数据库备份\822案件_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''822案件_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''822案件'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''822案件'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“822案件”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\822案件_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [GSM] TO DISK = N''G:\sql2005数据库备份\GSM_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''GSM_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''GSM'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''GSM'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“GSM”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\GSM_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [gsmdata] TO DISK = N''G:\sql2005数据库备份\gsmdata_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''gsmdata_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''gsmdata'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''gsmdata'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“gsmdata”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\gsmdata_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg889] TO DISK = N''G:\sql2005数据库备份\sjg889_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg889_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg889'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg889'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg889”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg889_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg8899] TO DISK = N''G:\sql2005数据库备份\sjg8899_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg8899_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg8899'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg8899'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg8899”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg8899_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg88991] TO DISK = N''G:\sql2005数据库备份\sjg88991_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg88991_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg88991'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg88991'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg88991”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg88991_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
#9
有高手能通过上面的日志,看看我的差异备份文件是否能还原出来数据?
#10
只有差异备份是不能还原的。。
必须有差异备份之前的那个完全备份。
必须有差异备份之前的那个完全备份。
#11
问题是我的差异备份好像就是完全备份,请看日志,我每天的数据只有5万条左右,但每天的差异备份都有5-6G,我怀疑没有备份明白。请高手看备份日志。
#12
找专门硬盘数据恢复的公司去了。
#13
如果你确定在差异备份之前没有做过完全备份的话。那只能找专门的硬盘数据公司去做了。
#14
那么,现在的问题变成:没有做过完全备份,只有差异备份,数据公司能还原数据库吗?
#15
只有差异备份,没有完全备份,还原不了...
#16
以后要记住,备份出来的文件要复制一份到其它机器, 如果条件允许,定期刻录备份,并要不定期做还原测试。
硬件方面,如资金许可,可以做双机热备。。。出现这种问题的概率就很低了。。。
硬件方面,如资金许可,可以做双机热备。。。出现这种问题的概率就很低了。。。
#17
你的所有备份都只保留在一个硬盘上么?其他地方没有了?
#18
还原不了了,楼主节哀
#19
等待高手中。。。。
#20
接贴吧,在高手也不行了。。。。。。
#21
#1
除了数据外,还有数据库的视图、存储过程也都不见啦....郁闷啊!
#2
SQL还原
======================================================================
1、验证备份
------------------------------------------------------------
restore headeronly from bak3
restore filelistonly from bak3 with file=1
restore labelonly from bak3
restore verifyonly from bak3
----------------------------------------------------------------------
2、从备份中还原
-------------------------------------------------------------------------
restore headeronly from bak1
restore database d1 from bak1 with file=2 --从完全备份中恢复
----------------------------------------------------------------------
restore headeronly from bak2 --从差异备份中恢复
restore database d2 from bak2 with file=1,norecovery
restore database d2 from bak2 with file=5,recovery
----------------------------------------------------------------------
restore headeronly from bak3 --从日志备份中恢复
restore database d3 from bak3 with file=1,norecovery
restore log d3 from bak3 with file=2,norecovery
restore log d3 from bak3 with file=3,norecovery
restore log d3 from bak3 with file=4,norecovery
restore log d3 from bak3 with file=5,recovery
----------------------------------------------------------------------
restore database d3 from bak3 with file=1,norecovery --恢复到指定时间
restore log d3 from bak3 with file=2,norecovery
restore log d3 from bak3 with file=3,norecovery
restore log d3 from bak3 with file=4,recovery,stopat='2003-08-15 11:29:00.000'
----------------------------------------------------------------------
restore database d5 filegroup='FG2' from bak5 with file=4,norecovery --还原文件组备份
restore log d5 from bak5 with file=5,norecovery
restore log d5 from bak5 with file=7,recovery
----------------------------------------------------------------------
restore headeronly from bak6 --还原文件备份
restore database d5 file='d5_data3' from bak6 with file=6,norecovery
restore log d5 from bak6 with file=7,norecovery
restore log d5 from bak6 with file=9,recovery
----------------------------------------------------------------------
restore database d5 from bak6 with replace --删除现有数据库,从备份中重建数据库
----------------------------------------------------------------------
create database d6 --move to将数据库文件移动到新位置
on primary
(name=d6_data,
filename='E:\Program Files\Microsoft SQL Server\MSSQL\data\d6_Data.MDF',
size=2MB)
log on
(name=d6_log,
filename='E:\Program Files\Microsoft SQL Server\MSSQL\data\d6_log.ldf',
size=2MB)
go
backupdatabase d6 to bak6 with init
drop database d6
restore database d6 from bak6
with move 'd6_data' to 'e:\data\d6\d6_data.mdf',
move 'd6_log'to 'e:\data\d6\d6_log.ldf'
sp_helpdb d6
----------------------------------------------------------------------
3、分离与重连接数据库
--------------------------------------
sp_detach_db 'd6'
sp_attach_db 'd6','e:\data\d6\d6_data.mdf','e:\data\d6\d6_log.ldf'
--------------------------------------
sp_detach_db d6
go
create database d6
on primary
(filename='e:\data\d6\d6_data.mdf')
for attach
go
----------------------------------------------------------------------
4、恢复损坏的系统数据库
----------------------------------------------------------------------
1)先备份MASTER、MSDB
2)停止SQL服务,将MASTER数据库文件删除或者重命名。这样,SQL服务将不能启动。
3)系统数据库的还原
-----------------------------------------------
(1)如果SQL服务还能启动,则从备份中恢复系统数据库。
(2)如果SQL服务不能启动,则需要重建系统数据库。
使用SQL文件夹TOOLS\BINN目录下的Rebuildm.exe重建master数据库。
(3)创建备份设备,指向以前的备份设备。
(4)以单用户模式启动SQL
cd programe files\microsoft sql server\mssql\binn
sqlservr.exe -c -m
(5)进查询分析器,从备份中恢复master数据库。
restore database master from masterbak
restore database msdb from disk='e:\bak\msdb.bak'
MASTER还原后,SQL中用户数据库的信息也会恢复。
(6)如果MASTER没有备份,则需要用sp_attach_db命令将用户数据库附加到新的MASTER数据库中。
--不确定可以恢复,参考资料,希望可以帮助到楼主
#3
#4
谢谢,但我现在只有差异备份的文件,是在硬盘损坏之前拷贝出来的,但由于粗心没有拷贝完全备份,用sql还原工具无法还原差异备份文件。怎么办?
#5
没有完全备份,只有差异备份无法恢复
等高手
#6
啊!越来越郁闷啦....高手您在哪里啊?我的电话15604153689.
#7
如果你只有差异备份文件,是不能恢复的了
#8
我的差异备份文件还有日志:但我不理解为什么会很大,每天没有这么大的文件,日志有错误提示:请帮助分析,我怀疑这个差异备份中有很多数据,每个文件5-6G
Microsoft(R) 服务器维护实用工具(Unicode)版本 9.0.1399
报告是在“sjg889”上生成的。
维护计划: 每周四备份数据到G盘
持续时间: 00:03:48
状态: 成功。
详细信息:
备份数据库(完整) (sjg889)
在 目标服务器连接 上备份数据库
数据库: 822案件,GSM,gsmdata,sjg889,sjg8899,sjg88991
类型: 差异
追加现有
任务开始: 2012-5-10 2:00。
任务结束: 2012-5-10 2:04。
成功
命令:BACKUP DATABASE [822案件] TO DISK = N''G:\sql2005数据库备份\822案件_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''822案件_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''822案件'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''822案件'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“822案件”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\822案件_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [GSM] TO DISK = N''G:\sql2005数据库备份\GSM_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''GSM_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''GSM'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''GSM'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“GSM”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\GSM_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [gsmdata] TO DISK = N''G:\sql2005数据库备份\gsmdata_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''gsmdata_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''gsmdata'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''gsmdata'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“gsmdata”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\gsmdata_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg889] TO DISK = N''G:\sql2005数据库备份\sjg889_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg889_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg889'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg889'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg889”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg889_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg8899] TO DISK = N''G:\sql2005数据库备份\sjg8899_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg8899_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg8899'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg8899'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg8899”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg8899_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg88991] TO DISK = N''G:\sql2005数据库备份\sjg88991_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg88991_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg88991'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg88991'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg88991”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg88991_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
Microsoft(R) 服务器维护实用工具(Unicode)版本 9.0.1399
报告是在“sjg889”上生成的。
维护计划: 每周四备份数据到G盘
持续时间: 00:03:48
状态: 成功。
详细信息:
备份数据库(完整) (sjg889)
在 目标服务器连接 上备份数据库
数据库: 822案件,GSM,gsmdata,sjg889,sjg8899,sjg88991
类型: 差异
追加现有
任务开始: 2012-5-10 2:00。
任务结束: 2012-5-10 2:04。
成功
命令:BACKUP DATABASE [822案件] TO DISK = N''G:\sql2005数据库备份\822案件_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''822案件_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''822案件'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''822案件'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“822案件”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\822案件_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [GSM] TO DISK = N''G:\sql2005数据库备份\GSM_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''GSM_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''GSM'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''GSM'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“GSM”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\GSM_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [gsmdata] TO DISK = N''G:\sql2005数据库备份\gsmdata_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''gsmdata_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''gsmdata'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''gsmdata'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“gsmdata”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\gsmdata_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg889] TO DISK = N''G:\sql2005数据库备份\sjg889_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg889_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg889'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg889'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg889”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg889_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg8899] TO DISK = N''G:\sql2005数据库备份\sjg8899_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg8899_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg8899'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg8899'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg8899”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg8899_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
BACKUP DATABASE [sjg88991] TO DISK = N''G:\sql2005数据库备份\sjg88991_backup_201205100200.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''sjg88991_backup_20120510020034'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''sjg88991'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''sjg88991'' )
if @backupSetId is null begin raiserror(N''验证失败。找不到数据库“sjg88991”的备份信息。'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''G:\sql2005数据库备份\sjg88991_backup_201205100200.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
#9
有高手能通过上面的日志,看看我的差异备份文件是否能还原出来数据?
#10
只有差异备份是不能还原的。。
必须有差异备份之前的那个完全备份。
必须有差异备份之前的那个完全备份。
#11
问题是我的差异备份好像就是完全备份,请看日志,我每天的数据只有5万条左右,但每天的差异备份都有5-6G,我怀疑没有备份明白。请高手看备份日志。
#12
找专门硬盘数据恢复的公司去了。
#13
如果你确定在差异备份之前没有做过完全备份的话。那只能找专门的硬盘数据公司去做了。
#14
那么,现在的问题变成:没有做过完全备份,只有差异备份,数据公司能还原数据库吗?
#15
只有差异备份,没有完全备份,还原不了...
#16
以后要记住,备份出来的文件要复制一份到其它机器, 如果条件允许,定期刻录备份,并要不定期做还原测试。
硬件方面,如资金许可,可以做双机热备。。。出现这种问题的概率就很低了。。。
硬件方面,如资金许可,可以做双机热备。。。出现这种问题的概率就很低了。。。
#17
你的所有备份都只保留在一个硬盘上么?其他地方没有了?
#18
还原不了了,楼主节哀
#19
等待高手中。。。。
#20
接贴吧,在高手也不行了。。。。。。