patternsqlMinor
sql server removing service_queues
Viewed 0 times
sqlservice_queuesremovingserver
Problem
When I query
I need to remove
http://www.sqlsolutions.com/products/sql-deadlock-detector/Uninstall.html
select * from sys.service_queues in SQL Server 2008 sp3, I am getting:InternalMailQueue
ExternalMailQueue
_LakeSide_DbTools_DeadlockQueue
QueryNotificationErrorsQueue
EventNotificationErrorsQueue
_LakeSide_DbTools_LockQueue
syspolicy_event_queue
ServiceBrokerQueueI need to remove
_LakeSide_DbTools_DeadlockQueue and _LakeSide_DbTools_LockQueue from MSDB database permanently. I installed that lakesidetool and manually removed all procedures, now stuck in removing this services. I used their uninstall tool, but it didn't help.http://www.sqlsolutions.com/products/sql-deadlock-detector/Uninstall.html
Solution
Queues are schema bound objects and as such they may belong to a different schema than your current default schema (likely
You can get the schema name from sys.service_queues:
dbo). If that's the case the DROP statement must qualify the queue with a two part name:DROP QUEUE .;You can get the schema name from sys.service_queues:
SELECT SCHEMA_NAME(schema_id), name FROM sys.service_queues;Code Snippets
DROP QUEUE <schema>.<queue>;SELECT SCHEMA_NAME(schema_id), name FROM sys.service_queues;Context
StackExchange Database Administrators Q#28092, answer score: 3
Revisions (0)
No revisions yet.