June 1, 2008 at 1:03 am
how can i move (file.mdf) or (file.ldf) file to another location????
June 1, 2008 at 1:22 am
is it for a user database or a system database?
if its a user database you can just detach the database, move the files and reattach. System databases are a little more complicated
June 1, 2008 at 1:31 am
yes i mean user data base..
June 1, 2008 at 3:51 am
nbaghm (6/1/2008)
yes i mean user data base..
ok detach/attach is the way to go. right click on database, detach. move the files in windows, right click databases, attach, point to your mdf and ldf and job done.
oh and one more thing, if its a production database i would backup before you detach, just in case 🙂
June 1, 2008 at 3:55 am
thanks a lot i made it...thank u..:D
June 1, 2008 at 4:49 am
or you could have done the following:
1. ALTER DATABASE SET OFFLINE;
2. Move/copy the database file to the new location
3. ALTER DATABASE ');
4. ALTER DATABASE SET ONLINE;
both detach/attach and this method have the same end results
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply