How to Open Or read SQL Server log file .ldf

Hi all,

How to Open Or read SQL Server log file .ldf

When ever we create database from sql server, it's create two file. (1) .mdf (2) .ldf.
I want to see what's available inside the .ldf file.

Thanks,

Ashok


March 26th, 2008 1:45pm

The .ldf is the log file for a database. There are no native tools in sql server to read the log file, although there are some third party vendors that have software that can read log files. You need to be VERY careful when doing anything with the log file as if it becomes corrupt you can possibly render your database corrupt also or destroy any possibility of have a viable log file to restore your database.

Free Windows Admin Tool Kit Click here and download it now
March 26th, 2008 4:11pm

I am not too sure but may be the below two undocumented commands might yield the desired result.
  1. DBCC Log
  2. Fn_dblog function
Refer these links for more info,
http://www.mssqlcity.com/Articles/Undoc/SQL2000UndocDBCC.htm
http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2004/11/27/37.aspx
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1173464,00.html

Some 3rd party tools like Log Explorer can do the job for you.

http://www.lumigent.com/products/le_sql.html


- Deepak



March 26th, 2008 4:42pm

Hi all;
If you want view your files, you can download a sofware named xnview (search it, for example by google) and open *.ldf &another unusualformats.
I hope a lot of good wishes for you.
Ali From Iran...
Free Windows Admin Tool Kit Click here and download it now
July 25th, 2009 11:56am

Late answer, but I hope it'll be helpful for other users who read this thread:

In order to view the LDF file contents in a human readable format, you can use 3rd party log readers for now. My recommendations are: ApexSQL Log (I personally used it and it worked for me) or Quest (which I heard of but never used before).

October 31st, 2013 5:54am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics