Transaction log file

  • How can I view the transaction log file.

    I've tried DBCC log (audits) and I keep getting an error. I need to view the file and look for changes that occured in the database i.e Old Value, New Value

    Is there a way to view this log

     

    -WM

  • SQL Server does not provide a tool to view the contents of the transaction log (that I am aware of).  There are third party tools that will do this for you. 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • There is an undocumented DBCC command but I do not think you will not find the output very usefull.

    DBCC log ( {dbid|dbname}, [, type={-1|0|1|2|3|4}] )

    PARAMETERS:

    Dbid or dbname - Enter either the dbid or the name of the database.

    type - is the type of output with a default type = 0

    0 - minimum information (operation, context, transaction id)

    1 - more information (plus flags, tags, row length, description)

    2 - very detailed information (plus object name, index name, page id, slot id)

    3 - full information about each operation

    4 - full information about each operation plus hexadecimal dump

    of the current transaction log's row.

    -1 - full information about each operation plus hexadecimal dump of the current transaction log's row, plus Checkpoint Begin, DB Version, Max XDESID

    Example:

    INSERT INTO [northwind].[dbo].[Categories]

    ( [CategoryName], [Description])

    VALUES( 'cfederl', 'Carl C. Federl' )

    DBCC log ( northwind , type= 3 )

    SQL = Scarcely Qualifies as a Language

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply