2013-03-14 21 views
1

我有一个SQL Server 2008数据库有文件流。SQL Server 2012恢复不包括文件流

我需要备份这个数据库不包括FILESTREAM和恢复SQL Server上的数据库2012

我研究这一点,并发现:

http://social.msdn.microsoft.com/Forums/en-US/sqldisasterrecovery/thread/bcd5dddf-5a66-42a9-acf4-a63136f3658a

这工作时,我在备份数据库没有文件流,并按照URL的说明恢复到SQL Server 2008。

然而,当我运行脚本恢复到2012年,我得到了以下错误:

Msg 3634, Level 16, State 1, Line 3 
The operating system returned the error '3(The system cannot find the path specified.)' while attempting 'FindFirstFile' on X 

Msg 5520, Level 16, State 1, Line 3 
Upgrade of FILESTREAM container ID 65537 in the database ID 10 failed because of container size recalculation error. Examine the previous errorlog entries for errors, and take the appropriate corrective actions. 

Msg 5056, Level 16, State 6, Line 3 
Cannot add, remove, or modify a file in filegroup 'FileStreamFileGroup' because the filegroup is not online. 
Msg 3013, Level 16, State 1, Line 3 
RESTORE DATABASE is terminating abnormally. 

我认为这是与SQL升级从2008年数据库2012年

有任何想法吗?任何帮助将非常感激。

回答

1

我有同样的问题,我通过使用Smo库重写备份和恢复方法已解决。

例子:
Backup Example
Restore Example

顺便说我做了以下的情况下,部分备份或还原。

if (partial) 
    { 
    sqlRestore.Partial = true; 
    sqlRestore.ContinueAfterError = true; 
    } 

我希望这会帮助你。

〜Bassam