Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I was told to move the DB folder to the D:drive

Status
Not open for further replies.

gman10

Technical User
Jul 20, 2001
451
US
Hey all-

What "general" DB folder can I move from one drive to the other ie - from C: to D:, this is a fresh installation for SQL Server Standard Edition (2K).. Is it the MSDBDATA folder?? Not sure here.. any help would be very much appreciated.. This is a Compaq ML530 server and will also need to make the D: set with 64k allocation unit but first things first..

thx again!
gman
 
If your asking how to move the data files for an SQL database, it's a fairly simple process.

First, open Enterprise Manager and navigate to the database you need to relocate. Then right-click the database and select properties. When the properties box appears, select the 'Data Files' and take note of the location(s). Once you have this information, do the following:

1. Right-click the database in Enterprise Manager, and select "Detach Database..." from the All Tasks submenu. The dialog will show you if any users are connected and indicate whether the database is ready to be detached or not.
2. Once detached, move the folder(s) that contain the data files you noted from the database properties to their new location.
3. After the files are living confortably in their new location, right-click the 'Databases' folder in Enterprise Manager and select 'Attach Datase...' from the All Tasks submenu. Use this dialog to point to the .mdf file of the database and specify the db owner.

That's about it.

Hope this helps.

- Glen

Know thy data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top