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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Alter Physical Location of a database

Author  Topic 

Rita Bhatnagar
Posting Yak Master

172 Posts

Posted - 2002-03-01 : 14:54:41
I have a database. I want to move data file and log file to different
folder on the same server.
How can i do it. I tried to do it manually but it gives me sharing violence error.
What should i do?
Any help is appreciated.
Thanks.
Rita

izaltsman
A custom title

1139 Posts

Posted - 2002-03-01 : 15:39:17
quote:

How can i do it. I tried to do it manually but it gives me sharing violence error.



Well, violence should definitely be avoided when working with SQL Server...

First you'll have to detach the database (see sp_detach_db in BOL). Once your database is detached, SQL Server will release the files and you will be able to move them to the new location in a non-violent fashion... After that, you can attach the database back (sp_attach_db).



Edited by - izaltsman on 03/01/2002 15:40:13
Go to Top of Page
   

- Advertisement -