2

I've been tasked with setting up our SQL server audits - despite having never done this before. So please forgive a really basic question.

I setup a specific user, sqlAudits, that I would like to own the audits.

How can I configure an audit to run under the sqlAudits account?

I've searched for hours but all I find it how to audit users, not how to change the account running the audit.

Can anyone point me in the right direction?

1

despite having never done this before

that's not a problem at all - I just would recommend you do all this on a test server first. the whole process. then you do it in live.


This is how I would do it:

  1. you create the domain account sqlaudits as you mentioned and take note of its password as you will need it later on
  2. create a login for sqlaudit on the server you want to audit

  3. grant sqlaudits all the permissions it might need: on that server

    Check the permissions for altering an audit:

    a)To create, alter, or drop a server audit, principals require the ALTER ANY SERVER AUDIT or the CONTROL SERVER permission.

    b)Users with the ALTER ANY SERVER AUDIT permission can create server audit specifications and bind them to any audit.

  4. run ssms as a different user using the sqlaudits account credentials

to run ssms a different user press the shift and right click on the ssms icon and that will give the options below:

enter image description here

Now you are sqlaudits and the objects you create will be technically owned by you

| improve this answer | |
  • 1
    Jeez, that's exactly what I needed. Thanks! It makes sense. I have done the "run as" before, just never occured to me to try this. Thank you! – user80151 May 24 at 1:10
  • that's wonderful to hear, thanks for letting me know, and enjoy your audits! – Marcello Miorelli May 24 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.