locked
How to read log file ? RRS feed

  • Question

  • SELECT[Current LSN],Operation,Context,[Transaction ID],[AllocUnitId],[AllocUnitName],[SPID],[Begin Time],[Transaction Name]FROMfn_dblog

    But getting an error as below :

    Parameters were not supplied for the function 'fn_dblog'.

    Thursday, May 15, 2014 7:13 AM

Answers

  • Hello

    Please add default parameters , as below  :

    SELECT [Current LSN],Operation,Context,[Transaction ID],[AllocUnitId],[AllocUnitName],[SPID],[Begin Time],[Transaction Name] FROM fn_dblog(DEFAULT, DEFAULT)


    Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/

    • Marked as answer by Breanch Thursday, May 15, 2014 7:25 AM
    Thursday, May 15, 2014 7:17 AM

All replies

  • Hello

    Please add default parameters , as below  :

    SELECT [Current LSN],Operation,Context,[Transaction ID],[AllocUnitId],[AllocUnitName],[SPID],[Begin Time],[Transaction Name] FROM fn_dblog(DEFAULT, DEFAULT)


    Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/

    • Marked as answer by Breanch Thursday, May 15, 2014 7:25 AM
    Thursday, May 15, 2014 7:17 AM
  • The fn_dblog() function accepts two parameters:

    • The first is starting log sequence number, or LSN. You can also specify NULL, which means it will return everything from the start of the log.
    • The second is the ending LSN. You can also specify NULL, which means you want to return everything to the end of the log.

    http://www.confio.com/logicalread/sql-server-dbcc-log-command-details-and-example/#.U3Rp9YGSx1Y

    • Proposed as answer by David Gutter Friday, July 24, 2015 8:30 PM
    Thursday, May 15, 2014 7:17 AM
    Answerer
  • it's working thanks
    Thursday, May 15, 2014 7:25 AM