Reputation: 2188
How do you query the file group of a Service Broker Queue object in SQL Server?
I can see the information via SQL Server Management Studio, by looking at the Properties of the Queue, but I'd like to be able to query for the information in a script.
It doesn't seem I can use the same methods as for querying the filegroup of a table - but maybe I've missed something?
Upvotes: 0
Views: 340
Reputation: 294387
You have to look for the internal table with parent_object_id
matching the queue:
select o.*
from sys.service_queues q
join sys.objects o on o.parent_object_id = q.object_id;
Upvotes: 1