Catch create user with extended events

Miyagi82 1 Reputation point


I try to catch in extended events session the creation/deletion of a new login.
Already added object_created/object_altered/object_deleted but no success.

I also want to catch the grant and revoke events for the users in extended events.
How can I do that?

Thank you!

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,813 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 78,111 Reputation points MVP

    You should probably look at SQL audit instead, which uses the Extended Events framework under the covers.

    0 comments No comments

  2. YufeiShao-msft 6,986 Reputation points

    Hi @Miyagi82

    For your needs, all can be implemented using SQL Server Audit
    you have to audit(like via ddl) the actual REVOKE or DENY statement.
    In SQL Server log, from the default track, you also can see some event about logins and objects are changed


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments