Answers
Mar 11, 2009 - 09:32 PM
1. Detach the databases from the server, copy the DatabaseName.mdf and DatabaseName.ldf files to the drive you want to copy to, and finally, attach the database by selecting the files from the new drive.
2. Backup the database and then restore it using 'WITH MOVE' and 'REPLACE' options.
Muschi.
Mar 20, 2009 - 04:24 AM
Jun 24, 2009 - 04:51 AM
you must have sys admin(sa) permissions
you should know the data file and log file locations
If you unaware of location of data and log files, can find it
using sp_helpfile stored procedure.
use
go
sp_helpfile
go
to move database you can use attach/detach stored procedures
first detach database you want to move
use master
go
sp_detach_db 'database_name want to move'
go
next copy data and log files from the current location to new location
then re-attache the db to new location as follow
use master
go
sp_attach_db 'db_name','new location .mdf file','new location of .ldf file'
go
Nov 27, 2009 - 05:16 AM
The Quomon Team
Nov 27, 2009 - 07:44 PM
Add New Comment