开发者

sql server 2005 (for old systems) and many problems for attach and restore...(changing drive location)

开发者 https://www.devze.com 2023-02-14 15:10 出处:网络
why sql server 2005 s开发者_JAVA技巧o sucks? i should work on an old system that using sql server 2005!

why sql server 2005 s开发者_JAVA技巧o 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


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消