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?
Best Answer
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:
create a login for sqlaudit on the server you want to audit
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 theCONTROL SERVER
permission.b)Users with the
ALTER ANY SERVER AUDIT
permission can create server audit specifications and bind them to any audit.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:
Now you are sqlaudits and the objects you create will be technically owned by you