locked
SQL log file RRS feed

  • Question

  •  

    Guys I have a question. With mirroring enalbed on a database, would you have any idea how long backwards in the transaction log file I can go?

    I have a program that reads the sql log file. Thing is I need to be able to go at least 2-3 days back in the log and find queries. Question is: does anyone know what's the max age of a qeury there? Will the log file contain 1 week old queries on a usual basis??

     

    I am trying to catch an error I get in my database when some items are deteled but we can not duplicate in QA. So either I leave profiler running for 2 days or use this thing with the logs.

     

    thanks

    Friday, November 2, 2007 5:09 PM

All replies

  • With full recovery model (after you have done the first database backup) and bulk logged recovery model you will be able to read any DML activity - but not queries until you dump the log.

    With full-recovery model if you have not done the first backup the log will be reused as the VLFs contain only inactive transactions.

    Log retention has nothing to do with what Profiler sees.

    So your answer is foreverSmile
    Monday, November 5, 2007 2:12 PM