当使用restore .bak文件的时候.显示如信息:Use WITH MOVE to identify a valid location for the file
2011-06-03 17:17
716 查看
1.首先使用restore Filelistonly 显示bak 文件中包含的数据库和日志文件列表
LogicalName PhysialName
SystemCatelogFile
SystemCatelogFile_1
SystemCatelogFile2
SystemLogFile
2.使用MOVE TO
1)首先删除掉你刚才创建的DB,用来还原.bak
2) 使用如下语句(MOVE 后面的文件对应上面的LogicalName)
RESTORE FILELISTONLY FROM DISK = 'D:\FMSDB\AuthoringTool\FMSGuo.bak'信息如下
LogicalName PhysialName
SystemCatelogFile
SystemCatelogFile_1
SystemCatelogFile2
SystemLogFile
2.使用MOVE TO
1)首先删除掉你刚才创建的DB,用来还原.bak
2) 使用如下语句(MOVE 后面的文件对应上面的LogicalName)
RESTORE DATABASE FMSAuthoringDB FROM DISK = 'D:\FMSDB\AuthoringTool\FMSGuo.bak' WITH MOVE 'SystemCatalogFile' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.WS_HGO\MSSQL\DATA/FMSAuthoringDB_data.mdf', MOVE 'SystemLogFile' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.WS_HGO\MSSQL\DATA/FMSAuthoringDB_data.ldf', MOVE 'SystemCatalogFile_1' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.WS_HGO\MSSQL\DATA/FMSAuthoringDB_data_1.ldf' MOVE 'SystemCatalogFile2' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.WS_HGO\MSSQL\DATA/FMSAuthoringDB_data_2.ldf', NOUNLOAD, REPLACE
相关文章推荐
- 解决Genymotion模拟器无法使用问题“the file is currupt”,“uable to boot-please use a kernel appropriate for your c
- 使用cocapods报错 [!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes
- How to create fully custom Role, User, Event, Resource classes for use with the Security and Scheduler modules
- Android解决在清单文件里消除Bar报错:You need to use a 原来Theme.AppCompat theme (or descendant) with this activity.
- 修复VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot – please use a kernel appropriate for your CPU"(安装深度Linux的时候就需要)
- How to use iPhone with File I/O Functions: A Tutorial for Software Developers
- 使用命令行创建Android工程报错:"Target id is not valid. Use 'android.bat list targets' to get the target ids"
- [已解决]Android 5.1 上面进行debug的时候 debug 的界面总是不消失 一直显示 Application is waiting for the debugger to attach
- unable to dequeue a cell with identifier Identify - must register a nib or a class for the identifie
- (NOT CLEAR)Question 21: Which of the following statements provide a valid reason not to use RTTI for distributed (i.e. networked
- 如何在MMIT上使用WMLScript文件(How To Use WMLScript Files With MMIT)
- ofbiz添加物品到购物车失败Could not find a valid price for the product with ID [XX-XXXX], not adding to cart.
- jooq使用自定义策略生成代码(How to use a custom strategy with the jOOQ code-generator and Maven?)
- 使用AlertDialog报错 You need to use a Theme.AppCompat theme (or descendant) with this activity.之解决
- Ubuntu 16.04使用NASM编译时用ld链接程序出现:i386 架构于输入文件 sandbox.o 与 i386:x86-64 输出不兼容(I386 architecture in the input file sandbox.o is not compatible with i386: x86-64 output)
- 126.Identify the two situations in which you use the alert log file in your database to check the de
- How to use iPhone with File I/O Functions: A Tutorial for Software Developers
- 使用ActionBar,调整Theme时遇到You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法
- 当使用phpize的时候出现Can't find PHP headers in /usr/include/php The php-devel package is required for use o
- How to use btt with blktrace to analysis the trace file