Created
May 24, 2012 13:09
-
-
Save jdaigle/2781464 to your computer and use it in GitHub Desktop.
SQL Server Service Broker: Query to get estimated number of rows in queues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT q.name, p.rows | |
FROM sys.partitions p | |
INNER JOIN sys.internal_tables t ON t.object_id = p.object_id | |
INNER JOIN sys.service_queues q ON q.object_id = t.parent_object_id | |
WHERE p.index_id IN (1, 0) --AND q.name = 'QueueName' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment