Forum Documentation Showcase Pricing Learn more

Attach SQL Database without Transaction Log File


#1

I want to attach SQL database without Transaction log file. But master database file is not in healthy state.

I have searched this query over this forum but didn’t find solution:
https://forum.bubble.is/

I searched on Google and found these resources:
https://www.cybrary.it/0p3n/3-best-sql-database-repair-tool-database-administrators-dbas/
https://www.stellarinfo.com/sql-recovery.php

Above resources are paid. Please suggest manual method.


#2

Try asking or searching on stackoverflow … for example with the tag “sql-server” or whichever one you are using …

https://stackoverflow.com/search?q=%5Bsql-server%5D+repair


#3

You can also run a TSQL Script on SQL Query to attach your MDF file and recreate your transaction log file.

CREATE DATABASE TestDb ON
(FILENAME = N’C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDb.mdf’)
FOR ATTACH_REBUILD_LOG
GO


#4

I think you can try the given solution, at- https://www.kerneldatarecovery.com/blog/how-to-restore-master-database-in-sql-server/
It will defiantly help you.


#5

Another method to resolve this error is: SQL Log Recovery