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.
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.
Rename the corrupted LDF file and then use sp_attach_single_file_db to attach the mdf file. If you want to get the best answer for your question read faq183-874 and thread183-468158. Terry L. Broadbent - DBA
SQL Server Page:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.