Data Deletion!!

  • Hi Experts,

    Every midnight 1 row is getting deleted from a particular table. Is there anyway to trace how it happens?

    I have checked whether any job is running at that time or any trigger causing the issue but nothing was there at that time.

    please help.

  • If you're sure of the time, I'd run a server-side trace 5 minutes either side of the time and look in that.

  • Check the option of Extended event.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • free_mascot (3/28/2014)


    Check the option of Extended event.

    Sorry? What?

    Do you mean set up an extended event session to capture sql batches and rpc calls? That's a good idea. I'm not sure what you mean by "option of Extended Event"

    The main reason to use extended events over trace events is that they have a lower impact on the server. The problem with using them in pre-2012 is that there's no GUI for consuming the data forcing you to write queries against the XML output.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Ratheesh.K.Nair (3/28/2014)


    Hi Experts,

    Every midnight 1 row is getting deleted from a particular table. Is there anyway to trace how it happens?

    I have checked whether any job is running at that time or any trigger causing the issue but nothing was there at that time.

    please help.

    Setup SQL Auditing on that table for deletes.

    --

    SQLBuddy

  • Grant Fritchey (3/28/2014)


    free_mascot (3/28/2014)


    Check the option of Extended event.

    Sorry? What?

    Do you mean set up an extended event session to capture sql batches and rpc calls? That's a good idea. I'm not sure what you mean by "option of Extended Event"

    The main reason to use extended events over trace events is that they have a lower impact on the server. The problem with using them in pre-2012 is that there's no GUI for consuming the data forcing you to write queries against the XML output.

    Yes, I mean extended event session if user is comfortable with XML output.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • Thanks Everyone for the Reply.

    Free_mascot : Do you have any template for tracking this using extended events?

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

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