question

shaikhshoaib-6404 avatar image
0 Votes"
shaikhshoaib-6404 asked ·

SQL Server Database Level Audit Question

I need to enable DB level audit on a large number of databases.
DELETE - there are 2 mandatory fields - object name and principal name.
In object name: I can choose a list of all DB by clicking the check boxes however when I click ok, it only show name of one DB.
So does it mean only One DB is selected, or SQL server does not show all db names even if multiple are selceted?
Principle name is ok as I can select public to capture all users.
So idea is basically to capture DELETE operations on all DB in one DELETE category.
80042-image.png



sql-server-general
image.png (164.3 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AmeliaGu-msft avatar image
0 Votes"
AmeliaGu-msft answered ·

Hi @shaikhshoaib-6404,

does it mean only One DB is selected, or SQL server does not show all db names even if multiple are selected?

Unfortunately, you can only create audit actions on objects in the current database. If you want to audit several databases, you will need to create multiple database audit specifications, in each database separately. And you can only specify one object name in one action in the database audit specification page.
In addition, if you want to capture DELETE operations on database, please remember to change object class to DATABASE in action in the database audit specification page.
If you have any other question, please feel free to let us know.

Best Regards,
Amelia


If the answer is helpful, please click "Accept Answer" and upvote it.
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


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.