AndorLakatos Posted February 16, 2016 Report Share Posted February 16, 2016 Hello Experts,My online database server got crashed. Fortunatly we recovered the *.mdf and *.ldf files from the crashed hard dick. Now I want to restore the database from *.mdf and *.ldf files on new sql server. I did below procedure to attache the database from *.mdf and *.ldf files.I copied the *.mdf and *.ldf files into current sql server data folder and ran the below script. =============use masterexec sp_attach_db 'DB_NAME', 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\DB_NAME.mdf','C:\Program Files\Microsoft SQL Server\MSSQL\Data\DB_NAME.ldf'=============But i got below error message...=======================Server: Msg 9004, Level 21, State 1, Line 1An error occurred while processing the log for database 'DB_NAME'.Connection Broken=======================Could you please help me with this problem?Regards! Quote Link to comment Share on other sites More sharing options...
RuneLassen Posted February 24, 2016 Report Share Posted February 24, 2016 Try exec sp_Attach_Single_File_DB to attach the MDF file, it will create a new Ldf file. Also have a look in books online for...sp_add_log_file_recover_suspect_db Also have a look this Recommended actions http://www.karaszi.com/sqlserver/info_corrupt_suspect_db.asp https://community.office365.com/en-us/f/172/t/266070 1 Quote Link to comment Share on other sites More sharing options...
RuneLassen Posted February 24, 2016 Report Share Posted February 24, 2016 If these options don't help then you could save a utility called SQL Server Recovery Toolbox. It is a powerful tool which I've heard a lot of good reviews. I hope it will help you. http://www.oemailrecovery.com/sql_recovery.html 1 Quote Link to comment Share on other sites More sharing options...
AndorLakatos Posted February 26, 2016 Author Report Share Posted February 26, 2016 You've been very kind in your efforts to help. Thanks for that. Solved! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.