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
 Moving .MDF files

Author  Topic 

al73
Starting Member

7 Posts

Posted - 2008-03-04 : 14:14:09
Hi,
I'm using SQL 2005 express edition and my database files are in the MSSQL.1\MSSQL\Data folder. When I'm trying to copy them I get "Files already in Use" error. How do I stop the server from running (services or command line). Or is there a better why to export
them to a diffrent location.

Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-03-04 : 14:20:29
detach the database from sql server.
copy the file.
attach the file.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

al73
Starting Member

7 Posts

Posted - 2008-03-04 : 14:29:52
How do I detach?
Go to Top of Page

al73
Starting Member

7 Posts

Posted - 2008-03-04 : 14:36:08
Nevermind, got it.
Thank you very much.
Go to Top of Page
   

- Advertisement -