• Question

  • Hi ,

    is there a way to audit users are member in the Sysadmin role using SQL auditing ?

    Sunday, August 24, 2014 9:15 AM


All replies

  • Hello Here is a T-SQL script tomget all the sysadmins SELECT name,type_desc,is_disabled FROM master.sys.server_principals WHERE IS_SRVROLEMEMBER ('sysadmin',name) = 1 ORDER BY name

    Javier Villegas | @javier_villhttp://sql-javier-villegas.blogspot.com/

    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you

    Sunday, August 24, 2014 12:37 PM
  • Thanks for your reply , but may be I wasn't totally clear with mu question

    I need to audit actions done by SQL users are member in the Sysadmin role , is there a way to achieve this ?

    Monday, August 25, 2014 9:16 AM
  • You can audit sysadmin users as you can do it for every other user, it don't make a difference. Just one Little difference: They could disable / delete audit logs.

    See Understanding SQL Server Audit and Auditing (Database Engine)

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Monday, August 25, 2014 9:29 AM