Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 1.89 KB

drop-message-type-transact-sql.md

File metadata and controls

58 lines (46 loc) · 1.89 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
DROP MESSAGE TYPE (Transact-SQL)
DROP MESSAGE TYPE (Transact-SQL)
WilliamDAssafMSFT
wiassaf
03/06/2017
sql
t-sql
reference
DROP_MESSAGE_TYPE_TSQL
DROP MESSAGE TYPE
message types [Service Broker], removing
deleting message types
dropping message types
DROP MESSAGE TYPE statement
removing message types
TSQL

DROP MESSAGE TYPE (Transact-SQL)

[!INCLUDE SQL Server - ASDBMI]

Drops an existing message type.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

DROP MESSAGE TYPE message_type_name  
[ ; ]  

Arguments

message_type_name
The name of the message type to delete. Server, database, and schema names cannot be specified.

Permissions

Permission for dropping a message type defaults to the owner of the message type, members of the db_ddladmin or db_owner fixed database roles, and members of the sysadmin fixed server role.

Remarks

You cannot drop a message type if any contracts refer to the message type.

Examples

The following example deletes the //Adventure-Works.com/Expenses/SubmitExpense message type from the database.

DROP MESSAGE TYPE [//Adventure-Works.com/Expenses/SubmitExpense] ;  

See Also

ALTER MESSAGE TYPE (Transact-SQL)
CREATE MESSAGE TYPE (Transact-SQL)
EVENTDATA (Transact-SQL)