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!

Missing a transaction log

Status
Not open for further replies.

jamminjaymeyer

Programmer
May 23, 2001
88
US
Hello,

I get a message:
Server: Msg 823, Level 24, State 3, Line 1
I/O error 2(The system cannot find the file specified.) detected during write at offset 0x0000014b576000 in file 'D:\Program Files\Microsoft SQL Server\MSSQL\data\CRData_Data.MDF'.

Whenever I try to do anything with the transaction log. I have it set on Simple recovery right now and want to switch it to full but I get that error. The log finle is on the server but it is just named "Program Files" no extension or nothing, and it is about 4 gig big. Any ideas how I can truncate this log and get back to full recovery model?
 
I would try to detach the database. Then I would rename the log file to the correct name and move it to the correct location. Then you use sp_attach_db to attach the databse files using the correct paths.

Another option would be to do a full backup, drop the database and then restore using the With Move option so the files were palced in the correct location.

If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top