A transaction log file (also database log or binary log) is a history of actions executed by a database management system to guarantee ACID properties over crashes or hardware failures. Physically, a log is a file of updates done to the database, stored in stable storage. (from wikipedia)
Questions tagged [ldf]
48 questions
1
vote
2 answers
SQL Server transaction log ldf file
How can I delete the data in the log file (.ldf)? I've already tried a backup, compact, but stellarinfo software retrieves deleted records.

user8750909
- 11
- 2
1
vote
7 answers
Cannot delete SQLServer2005 data or log files
I was trying to restore a backup but I kept getting OS error 32 - cannot delete because in use.
Couldn't figure out what was locking the data and log files - so I rebooted the machine, stopped the service but still no luck.
Then I deleted the DB but…

JohnIdol
- 48,899
- 61
- 158
- 242
1
vote
1 answer
ldf in simple mode grew
The next .ldf grew to 50GB, and is eating all the disk… (it is in SIMPLE recovery model)
I wanted to be able to roughly answer these questions:
-what’s inside the .ldf? (can I say it is just temp tables?!)
-which command or user caused this 50GB to…

Chicago1988
- 970
- 3
- 14
- 35
1
vote
1 answer
SQL Server: Why isn't the log file up-to-date with the database file on full recovery mode?
Using SQL Server 2012 on full recovery and looking at the directory:
C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\
I see .mdf and .ldf files.
For a particular database, the modified times are very different? Why is this? I…

Zach Smith
- 8,458
- 13
- 59
- 133
1
vote
4 answers
SQL Server Log File Is Huge
Currently my db logs for my production SQL Server 2008 R2 server is growing out of control:
DATA file: D:\Data...\MyDB.mdf = 278859 MB on disk
LOG file: L:\Logs...\MyDB_1.ldf = 394542 MB on disk
The server mentioned above has daily backups…

cachedrive
- 53
- 1
- 6
1
vote
1 answer
moving sql server 2012 mdf &ldf but my hdd full
currently my server c drive almost all full only left 20Gb ,and i have a big database table with 11 millions records of binary images .
now i need to move my mdf and ldf files to another hard drive to empty the c drive and keep the performance of…

adam
- 11
- 2
1
vote
1 answer
Explanation for the fn_dblog() function's output on SQL Server 2008 R2
I have a query to get me some basic information regarding the transaction log (.ldf) file. Here it is:
WITH CTE AS
(
SELECT
AllocUnitName,
Operation,
Context,
[Lock Information],
SUM(CONVERT(BIGINT, [Log…

Dan Rayson
- 1,315
- 1
- 14
- 37
0
votes
0 answers
How to open an MDF file using python?
In my code I have:
import mdfreader
mdf = mdfreader.Mdf('SERVER.mdf')
And upon running the code, I receive an exception:
Exception: file SERVER.mdf is not an MDF file!
The MDF file is in the same folder as my Python program.
If it cannot be…

Shoes
- 1
0
votes
0 answers
MDF File Size Not Growing
I am having an issue with the MDF and IDF file sizes. I can see the physical file size paths are fine. It is set to auto-growth by 64 MB. The table sizes are changed frequently whereas MDF and LDF files sizes are still the same.
I am curious if it…

Fahad Altaf
- 1
- 1
0
votes
1 answer
Is there some documents for mdf, ndf, ldf file format?
Is there some documents for mdf, ndf, ldf file format?
Here the three different file types are belonged to SQL server.
I search the document on internet for a long time, but the result is disappointed. Hope someone can help me!

snakecon
- 23
- 3
0
votes
1 answer
Backup Log database SQL Server
I have a database on SQL Server Express used for 3 Asp.net applications.
The Recovery Model is Full.
Every day I execute a backup with this code
BACKUP DATABASE @databaseName TO DISK = @file WITH INIT, SKIP, NOREWIND, NOUNLOAD, STATS = 10
BACKUP…

S.A.
- 21
- 6
0
votes
0 answers
How can I keep ldf and mdf in two different drive?
I have a database on SQL Server and I want to keep it's mdf and ldf files in two different path. For doing this, I detacheh my database and copied the ldf file in the other drive, and then I attached the mdf file again. and then I use this…

Afsan Rezaei
- 21
- 7
0
votes
2 answers
I have a problem with my database log file size
I have a database where the MDF size is 10GB and the LDF size is 47GB.
I changed recovery model to simple and full but it didn't change.
I have a job for full backup (once per day) and log backup (every 15 mins).
How do I decrease the size of the…
0
votes
1 answer
Does SQL Server create a log entry when an exception occurs in a Trigger?
My understanding is that when a Trigger fails then the entire transaction rolls back. Assuming this is correct does SQL server log these failures anywhere?
Would they be logged in the .ldf file? or are only successful transactions logged there?

Cool Breeze
- 1,289
- 11
- 34
0
votes
0 answers
Attachment failed when attaching mdf and ldf files to email (MSSQL 2017)
I need to attach my database mdf and ldf files to an email. In MSSQL, I went to properties--->files and found the path, pulled up the files and tried to attach them. However, the files don't upload and I get a message saying "attachment failed." …

FreddieMercury
- 191
- 1
- 13