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

253 views Asked by At

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

3

There are 3 answers

2
cusimar9 On BEST ANSWER

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.

2
Peter Schofield On

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.

0
AudioBubble On

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.