After a query is executed, SQL Complete determines the number of open transactions by querying the sys.dm_exec_sessions dynamic management view from a separate session.
Without the VIEW SERVER STATE privilege, SQL Server does not allow access to information about other sessions. As a result, the query returns NULL, and the notification is not displayed.
Diagnostics
The issue can be reproduced with the following steps:
Step 1. Open the First Query Document
Open a new query document in SSMS or dbForge Studio for SQL Server and execute:
BEGIN TRAN
SELECT
@@SPID AS current_session_id,
(SELECT open_transaction_count
FROM sys.dm_exec_sessions
WHERE session_id = @@SPID) AS tr_count_in_session
Step 2. Open a Second Query Document
Open another query document and execute:
SELECT @@SPID AS current_session_id,
(SELECT open_transaction_count
FROM sys.dm_exec_sessions
WHERE session_id = <doc1_session_id>) AS tr_count_in_session