Azure SQL database - Access to sys.sql_expression_dependencies for Server Admin user

vivek 0 Reputation points
2025-01-16T19:59:35.3633333+00:00

I created an Azure SQL database with SQL Server admin and password. As per documentation the admin user should have access to 'all' objects in the database. However, Upon login to the database I am not able to access the system view : sys.sql_expression_dependencies. In the master schema.

When trying to run:

SELECT TOP (10) from FROM [sys].[sql_expression_dependencies]
I get the following error:
The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'.

When I try to grant this permission with the same admin user I get:
SQL: GRANT SELECT ON sys.sql_expression_dependencies TO myadmin;

ERROR:
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
What's weird is that I have access to many other views like sys.synonyms, sys.table_types etc.

I need select permission on this view to be able to integrate with an automated lineage solution.

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 115.6K Reputation points MVP
    2025-01-16T22:40:06.8733333+00:00

    I seriously question that you have any need to access sys.sql_expression_dependencies in master database of your Azure SQL Server.

    You rarely have reason to create objects in master, and certainly not to the extent that you need to track the dependencies.

    You might use this view in one or more databases on the Azure SQL Server, but I can't see what use you would have of it in master.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.