Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2005
    Posts
    92

    Unanswered: Accessing the transaction log

    Dear All,

    Can someone let me know how I can have a look at the transaction log in SQL server. I'd like to find out what INSERT, UPDATE, DELETE commands have been executed on a table today, yesterday etc.

    Can I see this easily?

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Mar 2004
    Posts
    99
    use DBCC LOG (dbname) it is undocumented and output is not easily readable but it might work for you

  4. #4
    Join Date
    Mar 2005
    Posts
    92
    Quote Originally Posted by Thrasymachus
    Thanks for this, I have installed it, however the trial version doesn't let me look at my own DBs. Any idea how much it costs, as there is no priceing on their website (I'm yet to contact them)

  5. #5
    Join Date
    Mar 2005
    Posts
    92
    Quote Originally Posted by jpotucek
    use DBCC LOG (dbname) it is undocumented and output is not easily readable but it might work for you
    Thanks for this, I bever actually used SQL server from the command line, I used ORACLE but ages ago, can you refresh my memory on how to get to the command line so I can type in the command you gave me, thanks a lot

  6. #6
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by gorgenyi
    Thanks for this, I bever actually used SQL server from the command line, I used ORACLE but ages ago, can you refresh my memory on how to get to the command line so I can type in the command you gave me, thanks a lot
    use the query analyzer to execute this.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  7. #7
    Join Date
    Mar 2005
    Posts
    92
    Quote Originally Posted by Thrasymachus
    use the query analyzer to execute this.
    Thanks, tried with all the options 1/2/3/4, can't really make much sense of it.

    What I was looking for is when an insert / update / delete happened and what the data the cell contained before.

    Or does this not exist in a transaction log?

  8. #8
    Join Date
    Mar 2005
    Posts
    92
    Quote Originally Posted by Thrasymachus
    use the query analyzer to execute this.
    Ok, it does make sense, now that I tried create and update commands and run the transaction log command. I guess it's as far as this will take me. Might have have another look at that Lumi.. software, it's just that the trial version doesn't seem to give me much options to see transactions on tables I created in my db previously.

    Anyway, thanks for advice and if someone else knows a good free kit, I'd love to hear about it, thanks again!

  9. #9
    Join Date
    Dec 2002
    Posts
    1,245
    you can also try

    select * from ::fn_dblog(null, null)


    There's a bit of info on this function at:
    http://www.novicksoftware.com/UDFofW...7-fn_dblog.htm

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •