Disabling an account on unexpected SQL Statement

  • Hi Folks,

    Wondering if anyone had any ideas on this dilema?

    I want to be able to trace code through my database, looking for certain patterns of sql code.

    If the code being run, does not look genuine, i want to be able to lock the account that is sending it.

    I am considering looking at the dmv's and pulling out the running queries and then locking the account, and send an alert.

    Are there better ways of doing this?

    Thanks.

  • Can you give an example of code not looking genuine? SELECT queries and execution of stored procedures would be hard to manipulate in this way as they don't fire DML triggers. You might be able to do something with extended events or via the results of traces, but if you use a trace, there's always going to be a lag.

    K. Brian Kelley
    @kbriankelley

Viewing 2 posts - 1 through 1 (of 1 total)

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