HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

Restoring SQL Server database backup file for read-only access - is it possible to skip the ldf file creation?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
filethereadsqlskiprestoringdatabasepossibleldffor

Problem

I need to read some data from a database given by its backup file. So, I issue the RESTORE DATABASE command, which creates two files - the database MDF file and the log LDF file.

Is it possible to restore the database without creating the LDF file?

Solution

In brief: NO.

The transaction log file (the .ldf file) is a vital and absolutely necessary part of any SQL Server database. You cannot skip this, you cannot opt to not have it - just doesn't work. SQL Server must have a transaction log stored in a file - no way around that.

Context

StackExchange Database Administrators Q#11292, answer score: 4

Revisions (0)

No revisions yet.