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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Move databases to a different drive

Status
Not open for further replies.

tfstom

Programmer
Sep 28, 2002
190
US
I am looking at moving our databases to a different drive as our C: drive is getting full.

We have added a 200MB drive that we are going to use for Data and want to move our data only to that drive. We want to leave the program files on the C: drive and move the data to our D: drive.

How best would we do this. I know we can't just move the data folder.

Thanks,

Tom.
 
You can detach the dtabases move the files then attach. I prefer to backup then restore (with move) followed by a dalete - it means you aren't stuck if the attach fails and you will have to do a backup (which should be test restored) before the move anyway.

Do a search for moving system databases - it's quite easy now.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
How do you do a test restore?

If you backup your database, and do a test restore which fails - you now have nothing (if it deletes the old databases before the restore).

Tom
 
You can restore to a different name or to a different server.

You should always do this periodically otherwise you don't know if your backups are working or not.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top