0

I am new to database administration, and I need to implement auditing of all users of multiple databases.

Can we audit multiple users of a multiple database by creating just one audit specification?

I tried to create the audit specification, but I get the error message in the screenshot below.

enter image description here

2
  • 1
    It would be more useful to reviewers and other users if you copied and pasted the error text into your post. The image is still useful as it contains your setup.
    – Matt
    Commented Oct 18, 2018 at 13:51
  • "you can only create audit action on object in current database" error 33221
    – Saad Ullah
    Commented Oct 18, 2018 at 17:18

2 Answers 2

1

The error message is telling you exactly what the problem is:

You can only create audit actions on objects in the current database. (Microsoft SQL Server, Error: 33221)

The audit can only be on objects in the current database. Your screenshot shows that you are trying to audit two different databases: audit_test and db_aiudit

You will need to create two database audit specificiations - one for each of the two databases listed above a the respective database level

-1

SQL Server Audit can only be done on Enterprise and Datacenter editions of SQL Server 2008 R2. With SQL server 2008 and 2008 R2 standard edition you couldn't perform auditing. But you can do the default trace for the basic auditing or you can write custom script for the auditing purpose. I advice you to use trigger is the best and a powerful way to detect the date and time of a specific query and details, also you can use the logon trigger ect...

For More details please have a look on Microsoft Documentation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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