Search code examples
sql-serverazure-synapseazure-synapse-analytics

Unable to execute sys.fn_get_audit_file() procedure in Azure Synaspe Serverless Pool


Unable to execute sys.fn_get_audit_file() function in Azure Synaspe Serverless Pool. The procedure fails with ERROR

VIEW SERVER SECURITY AUDIT permission was denied on object 'server', database 'master'.

Granted view server state and control permission to the SQL user.

use db1;
GRANT CONTROL TO testuser;

use master;
GRANT VIEW SERVER STATE TO testuser;

Still facing the similar error. when trying to execute procedure with SQL user.

Note- I'm able to run the function using Azure AD user but not with SQL user.

Any addition information required for sql user to execute sys.fn_audit_file() function?


Solution

  • Does https://dba.stackexchange.com/a/199449 answer your question? CONTROL is a db permission while CONTROL SERVER is server level one