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

Can I move my data file and log file to a different drive?

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
I have a 30 Gig hard drive that has been partition into C and D drives with C only 2 Gig and the rest go to D. So far most of my SQL Database has been created on C drive (with the data file and log file located in C) and it is running out of room. My question is can I move everything (all database) to D drive?
Note that most of the database use FontPage on the other end. Therefore if I move the DBs to D drive, can the Fontpage still be able to access them?

Thanks for help.
 
If you are using SQL 7 or SQL2K

1. Make sure there are no user processes in the database.
2. sp_detach_db @dbname = 'dbname'
3. Copy the database files to the new location
4. sp_attach_db @dbname = 'dbname', @filename1 = 'path\data_filename' , @filename2 = 'path\log_filename'

Hope this helps.
 

FrontPage connects to SQL Server not the physical location of the files. It wwill work just fine. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top