none
How to Open Or read SQL Server log file .ldf

    Question

  •  

    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


    Wednesday, March 26, 2008 10:45 AM

Answers

All replies

  • 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.

     

     

    Wednesday, March 26, 2008 1:11 PM
    Moderator
  • 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



    Wednesday, March 26, 2008 1:42 PM
    Moderator
  • 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 unusual formats.
    I hope a lot of good wishes for you.
    Ali From Iran...
    Saturday, July 25, 2009 8:56 AM
  • 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).

    Thursday, October 31, 2013 9:49 AM
  • Hi Ashok

    Glad that you asked, for SQL Server transaction log file open and read you take the help of specific log analyzer tool, such tool is developed to open, view and read the all the activities in SQL Server database and they easily assist you view the SQL log file & also export the log file data. One such tool that you can use is, http://www.sqlloganalyzer.repair-sql.net/

    Hopefully you will be able to view and export your SQL log file with it.

    Regards

    dimeshwilliam


    Friday, January 31, 2014 4:19 PM