我可以使用服务名称进行某种查询来检索队列名称吗?
问问题
1205 次
2 回答
3
service_queue_id
此服务使用的队列的对象 ID。不可为空。
因此,大致如下:
SELECT name as service_name,
OBJECT_SCHEMA_NAME(service_queue_id) as queue_schema_name,
OBJECT_NAME(service_queue_id) as queue_name
FROM sys.services
于 2013-03-14T11:50:39.947 回答
0
SELECT ServiQueue.name AS 'QueueName'
FROM sys.service_contract_message_usages AS MessageUsage
INNER JOIN sys.service_contracts AS ServiceContract ON ServiceContract.service_contract_id =MessageUsage.service_contract_id
INNER JOIN sys.service_contract_usages ServContractUse ON ServContractUse.service_contract_id =ServiceContract.service_contract_id
INNER JOIN sys.services AS Servi ON Servi.service_id=ServContractUse.service_id
INNER JOIN sys.service_queue_usages AS SerQueueUse ON SerQueueUse.service_id = Servi.service_id
INNER JOIN sys.service_queues AS ServiQueue ON ServiQueue.object_id=SerQueueUse.service_queue_id
WHERE Servi.name like 'OrderDepartment'
于 2013-03-14T11:24:08.190 回答