Currently I am using:
SELECT * FROM sys.service_message_types
to list service broker message types. However, how would I go about deleting all message types?
Currently I am using:
SELECT * FROM sys.service_message_types
to list service broker message types. However, how would I go about deleting all message types?
Copyright © 2021 Jogjafile Inc.
Below is an example that drops all user message types in the current database, using the
modeldatabase as a reference to exclude system message types.Note the
DROPwill fail if contracts use the type. Contracts bound to the type and indirectly referencing SB objects (i.e. services) will need to be dropped first.