how to view transaction log file

  • I always run the query using

    begin/commit transaction.

    But if i want to view the details of this transaction then how should i do this.

    Thanks in Advance.

  • Using dbcc loginfo one can view a transaction log ,but seeing the transaction log for a particular transaction i don't think is possible in sql server 2000 .

    Though i am not quite sure about this...

  • Alright! but how does the maintains the log details does it maintain the data in the table or on the physical file.

  • swatichari_itx (3/13/2008)


    I always run the query using

    begin/commit transaction.

    But if i want to view the details of this transaction then how should i do this.

    Thanks in Advance.

    dbcc traceon(3604)

    dbcc log(1,1)

    dbcc traceoff(3604)

    (the fist parameter is the database id)

    PS: it is not the easiest thing to decipher the content of the transaction log. For 2000 you can use Red Gate's Log Rescue (it is a free tool to read 2000 transaction log). Disclaimer: I work for RG, and I wrote the engine of the above tool.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • swatichari_itx (3/14/2008)


    Alright! but how does the maintains the log details does it maintain the data in the table or on the physical file.

    The details are maintained in the log file. If you really want to learn the details I recommend you read about write ahead logging. A good book to start with is "Database Systems: The Complete Book" by Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer D. Widom.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • I will prefer reading the book which is suggested to me before doing any practicals. By the i'll keep patience.

    Thanks

  • Andras Belokosztolszki (3/14/2008)


    swatichari_itx (3/13/2008)


    I always run the query using

    begin/commit transaction.

    But if i want to view the details of this transaction then how should i do this.

    Thanks in Advance.

    dbcc traceon(3604)

    dbcc log(1,1)

    dbcc traceoff(3604)

    (the fist parameter is the database id)

    PS: it is not the easiest thing to decipher the content of the transaction log. For 2000 you can use Red Gate's Log Rescue (it is a free tool to read 2000 transaction log). Disclaimer: I work for RG, and I wrote the engine of the above tool.

    Regards,

    Andras

    I am new to this SQL Server stuff.

    The following link tells little more about traceon

    http://msdn2.microsoft.com/en-us/library/ms187329.aspx

    I wish to know what are the values that can be passed on for traceon. Are they random or there are specific values for each code. Where can i find such codes?

    Also, How do i see the contents of a particular log file?

    Excuse me if my questions sound silly. I am still learning.

    TIA

    Thanks

  • gk (3/18/2008)


    I am new to this SQL Server stuff.

    The following link tells little more about traceon

    http://msdn2.microsoft.com/en-us/library/ms187329.aspx

    I wish to know what are the values that can be passed on for traceon. Are they random or there are specific values for each code. Where can i find such codes?

    Also, How do i see the contents of a particular log file?

    Excuse me if my questions sound silly. I am still learning.

    TIA

    Thanks

    The ones that are documented are on http://msdn2.microsoft.com/en-us/library/ms188396.aspx

    There are some more, but you would need to google for those. These are unsuported, and usually rather specific to a particular problem. You can of course try random numbers (it is a good and fast way to crash SQL Server), but it is better to use only the supported ones, and only if you do need them.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

Viewing 8 posts - 1 through 7 (of 7 total)

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