Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 mdf file

Author  Topic 

rajeshkrishna
Starting Member

2 Posts

Posted - 2009-05-30 : 13:17:07
hi

i have recieved a database in my system in the name of music. i have seen that a .mdf file is available in the data folder. the problem is that i want to move my entire database to a new system in the state that it is now.can i do it by just attaching the .mdf file in the new system. i mean to ask that does the .mdf file carry the state of the database at all time??? if no then please give me a solution . i use SQL server management studio xpress.

rajesh

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-05-30 : 13:19:47
Yes it does.
And for completeness, please make a backup first just in case.
Then detach database from old system, copy the database files to new server and attach them there.
If something goes wrong, you can always

1. Attach file at old system
2. Restore backup at new system



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

rajeshkrishna
Starting Member

2 Posts

Posted - 2009-05-30 : 13:28:51
@ peso

hi

can u specify what do you mean by database files .because i plan to update this database in my system before moving it to other.will all the changes be shown there also..as this is my main concern and i dont want to do the job of updation all over again

rajesh
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-05-31 : 04:58:08
You should copy and attach the log file as well (.ldf).

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -