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

HELP! Corrupted TLOG File

Status
Not open for further replies.

CRAMan

Technical User
Dec 11, 2001
33
US
Ok I just started this new job.

I had a databse go down today, I am trying to bring it back up. The log file is corrupted. The MDF Is good. How can I attach the MDF without the LDF file?

 
Check out the Books OnLine (and do a search on this forum) for sp_attach_single_db.

You can execute that stored procedure to load just the .mdf file. Or better yet (and easier) you can use Enterprise Manager. Right-click on the server, select All Tasks, then select Attach Database. Browse to the database file location and select the .mdf file. Make sure that only the .mdf file is checked in the popup window. Then set the database owner, select verify and then OK to attach.

-sQLBill
 
When I try to attach just the MDF it gives me a red X next to the LDF file and looks for it
 
It gives me a device activation error, File not found for the ldf

 
use QUery analyzer and run the sp_attach_single_db in it. Look up the proper parameters and execution for the stored procedure in Books online.
 
I tried the Query analyzer. What happened is the server crashd, the Database wasnt properly detached. This is my firstday ya!


 
Here is my error

Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name 'E:\MSSQL\SalesLogix_Log.LDF' may be incorrect.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'SalesLogix2'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'E:\MSSQL\SalesLogix_Log.LDF' may be incorrect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top