none
Database Audit feature logs SQL statements partially/trimmed, is this a bug? RRS feed

  • Question

  • Hey everyone!

    The version of SQL Server that I'm using is 2016-SP1-CU3, Enterprise Edition.

    I configured and enabled Database Auditing to log to the Windows App. Event Log and I realised that it logs the SQL statement partially (please see the image below).

    Note: I performed a similar test but this time I logged to a file directly and it results the same. SQL statements looks like trimmed from the beginning of the SQL text.

    I checked the cumulative updates after CU3 to see if there was any fix for this problem or not, but unfortunately I found nothing related.

    Have anyone experienced a problem like this? What do you think the problem could be about?

    Thanks in advance!


    http://ekremonsoy.blogspot.com | http://www.ekremonsoy.com | @EkremOnsoy

    Wednesday, January 10, 2018 2:08 PM

Answers

    • Proposed as answer by Hannah Yu Friday, January 12, 2018 3:04 AM
    • Marked as answer by Ekrem Önsoy Friday, January 12, 2018 6:42 AM
    Thursday, January 11, 2018 12:19 PM
  • Hi Ekrem Önsoy,

     

    From the link provided by Tom, the column sequence_no (which tracks the sequence of records within a single audit record that was too large to fit in the write buffer for audits) explains this. Go to your SQL Server audit records, and you’ll figure it out. :-)

     

    If you have any other questions, please let me know.

     

    Regards,

    Hannah


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Ekrem Önsoy Friday, January 12, 2018 6:42 AM
    Friday, January 12, 2018 3:05 AM

All replies

  • Hi Ekrem Önsoy,

    >> Have anyone experienced a problem like this? What do you think the problem could be about?

    I tested on my machine by creating a database audit which logs to the application log, and found SQL statements trimmed from the beginning of the SQL text like yours. In this case, I suggest you submit feedback at this site where you’ll get more professional support in a more efficient manner.

    If you have any other questions, please let me know.

    Regards,

    Hannah


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, January 11, 2018 8:12 AM
  • Hello Hannah,

    Thanks for your reply. In the past I took advantage of this feature and I do not remember a problem like this, which makes me think that this problem is version spesific. I'll try it other versions whenever I have the chance.

    P.S. I've filed the "idea".


    http://ekremonsoy.blogspot.com | http://www.ekremonsoy.com | @EkremOnsoy

    Thursday, January 11, 2018 11:21 AM
    • Proposed as answer by Hannah Yu Friday, January 12, 2018 3:04 AM
    • Marked as answer by Ekrem Önsoy Friday, January 12, 2018 6:42 AM
    Thursday, January 11, 2018 12:19 PM
  • Hi Ekrem Önsoy,

     

    From the link provided by Tom, the column sequence_no (which tracks the sequence of records within a single audit record that was too large to fit in the write buffer for audits) explains this. Go to your SQL Server audit records, and you’ll figure it out. :-)

     

    If you have any other questions, please let me know.

     

    Regards,

    Hannah


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Ekrem Önsoy Friday, January 12, 2018 6:42 AM
    Friday, January 12, 2018 3:05 AM
  • I searched the documentation before posting here, but appearently I missed this crutial one! Thank you very much for sharing it and solving the mystery!

    http://ekremonsoy.blogspot.com | http://www.ekremonsoy.com | @EkremOnsoy

    Friday, January 12, 2018 6:41 AM
  • Hello Hannah,

    Thank you for your help and assistance!


    http://ekremonsoy.blogspot.com | http://www.ekremonsoy.com | @EkremOnsoy

    Friday, January 12, 2018 6:42 AM