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

Moving a database

Status
Not open for further replies.

SilviaS

Technical User
Sep 18, 2001
259
GB
Ok everyone look at this,
at present windows NT4.0 server running sql7.0
When installed originally it was set up on the C:.
I have another partition D: and therefore need to move the database to D:.
I also have iis running. Which way should we do this.
If i reinstall sql 7.0 to the d: partition can i just move the databases over?
Let us know.
cheers
 
Yes, you can move it... sort of.

It has been a couple of years since I've had to do this, so please do not take it as gospel. Microsoft.com will have an updated detailed procedure for this.

But basically:
1) You will need to back up the database(s).
2) Do your uninstalls/reinstalls of SQL server.
3) Create new database(s) in the new system.
4) RESTORE, but you will need to check a check box that will allow you to restore it from "another source/location" or the like...

Sorry for the fuzzy, but that is all I recall off the top of my head. (really, microsoft.com will have the exact detailed procedure)
 
You really dont need to jump through that many hoops for it all. You can just detach the user databases, and move them to their new location. Ive never tried detaching the msdb, but you can just backup and restore that one.

uninstall then reinstall sqlserver in the new location, restore msdb and reattach user databases. backing up and restoring does work, but attach/detach is usually faster, especialy if you have large databases.

make sure that on the msdb you get them to the same patch level before you restore it. It will have problems if you do not.

For more info on syntax look up sp_detach_db and sp_attach_db in bol
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top