sql server 2005(对于旧系统)以及附加和恢复的许多问题...(更改驱动器位置)
为什么sql server 2005这么糟糕?
我应该在使用 sql server 2005 的旧系统上工作!
我的问题是:
1-当我分离数据库并将该数据库的 mdf / ldf 文件移动到另一个驱动器时,因此我无法
附加这些文件,因为移动!
将 mdf/ldf 文件的位置更改到另一个驱动器的最佳方法是什么?
=================================================== ============================
2-当我备份数据库时,该数据库的 mdf/ldf 位于驱动器 e 上,因此我可以不将该 bak 文件恢复到另一个没有驱动器 e 的系统 / sql server 2005 发生了什么 / 我在 sql server 2008 上测试了这项工作,一切正常 / 我该如何解决这个问题?
我正在使用 Windows 7 Ultimate/SQL Server Management Studio Express 版/
感谢未来的
问候
why sql server 2005 so sucks?
i should work on an old system that using sql server 2005!
my problems are :
1-when i detach a database and move mdf / ldf files of that db to another drive , so i can
not attach these files because of moving!
what is the best way for change the location of mdf/ldf files to another drive?
==============================================================================
2-when i backup a db that mdf/ldf of that db are on drive e , so i can not restore that bak file to another system that has not drive e / what is going on about sql server 2005 / i test this job on sql server 2008 and every thing was ok / how can i solve this issue?
i am using windows 7 ultimate / sql server management studio express edition /
thanks in future advance
best regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
还原数据库备份时,您需要进入还原选项并将 MDF/LDF 文件的路径更新到新计算机上您想要的位置。默认是保持这些路径相同,显然它们可能不存在于新机器上。
When you restore a database backup you need to go into the restore options and update the paths of the MDF/LDF files to wherever you want them on the new machine. The default is to keep these paths the same and obviously they may not exist on the new machine.
当您进行恢复时,您将数据和日志文件指向新驱动器 - 您可能已在 GUI (Management Studio) 或 TSQL 中完成了此操作。当您尝试重新附加时,您需要执行相同的操作 - 只需更改文件位置即可。
When you did the restore, you pointed the data and log files to the new drives - you may have done this in the GUI (Management Studio) or in TSQL. When you try the reattach, you need to do the same thing - just change the file locations.
首先,备份 SQL 数据库,包括日志事务文件。然后右键单击它将其分离。现在您可以更改 MDF 文件的位置,然后进行恢复。它。
Firstly you take the backup of SQL database including Log transaction files also. Then detach it by right clicking on it. Now you can change the location of MDF file and then restore. it.