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!

Moving the location of the log file for a database

Status
Not open for further replies.

GJP55

Technical User
Feb 2, 2003
220
GB

I am trying to move the location of a log file from one drive to another. I can create a new log file location but not delete the existing log file that was created during the setup. Is there anyway to do this.

I have tried detaching and re-attaching the database but when I put the new log file locations in I get an error saying that the ldb physical file name may be incorrect. This pionts to the location of the MDF file even though when entering in the location of the log files I get the green tick box.

Thanks
 
Try shrinking the old logfile using the emptyfile option - you shold then be able to drop it using alter table.

======================================
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.
 
Thanks. I will give it a try.
 
try detaching the database, then move the ldf to the desired location -- attached the database--

during the attach process from EM you need to modify path location to the new location.

 
Thanks for that. Actually found this out a couple of weeks ago but thanks for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top