I just created database from an old bak file and need to recover database to latest version but I don't have recent backups or mdf file but only ldf file. How can I recover DB from from only ldf file?
Asked
Active
Viewed 361 times
0
-
Do you need to recover transactions from the log file? – Jacob H May 16 '17 at 13:41
-
This might help: https://solutioncenter.apexsql.com/recover-sql-server-database-using-only-a-transaction-log-file-ldf-and-old-backup-files/ . Surprised it didn't come up on your google search. – ADyson May 16 '17 at 13:41
-
@ADyson does that work without any other data or file besides the LDF? From what I know of SQL, the logfiles don't really contain any data, but I'd be happy to hear that I'm wrong... – Sander May 18 '17 at 14:45
-
@Sander I haven't tried it. Was really just pointing out that the OP didn't appear to have done a great deal of thinking about the problem before dashing a question off. – ADyson May 18 '17 at 15:47
1 Answers
1
A LDF file is a log of all transactions made on the database. As it doesn't contain any data itself, it's not possible to recover a database with only the log file. You can use a log file for database recovery, but only in combination with the data itself.

Sander
- 390
- 1
- 4
- 13