SQL Server transaction log ldf file

938 views Asked by At

How can I delete the data in the log file (.ldf)? I've already tried a backup, compact, but stellarinfo software retrieves deleted records.

2

There are 2 answers

0
Jason Clark On

Except MDF file SQL Server also maintain the records in .ldf file which keeps the data in a form of transaction log. which a database user cannot view or edit directly. each time you Insert, Update, delete records in SQL Server, these transactions maintained in .ldf file on the basis of LSNs for future use.
However, you can use fn_dblog() function to read SQL Server transaction log or use a third party tool better understand the .ldf file and read SQL Server transaction logs.

0
gbn On

You said

software retrieves deleted records

If you can query "deleted" records, it means they were not deleted. The data is still there

The transation log does not store any data, it basically stored a record of what happened so it can be replayed or rolled back. You can't "delete data" from the transation log (ldf) file.

It is that simple