Why cannot I view the sessions from all users in azure sql database?

WisonHii 81 Reputation points
2023-09-06T00:44:42.39+00:00

Currently, there is one user which has below permissions in one azure sql database:

SHOWPLAN

SELECT ON SCHEMA::SYS

VIEW DEFINITION

VIEW DATABASE STATE

VIEW DATABASE PERFORMANCE STATE

DB_DATAREADER

but I cann't find the session status from all users by sys.dm_exec_sessions, dm_exec_connections and dm_exec_requests.

From the MS site, https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-sessions-transact-sql?view=sql-server-ver16,

it says that

SQL Database: Requires VIEW DATABASE STATE to see all connections to the current database. VIEW DATABASE STATE can't be granted in the master database.

Azure SQL Database
{count} votes

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.