Export (0) Print
Expand All
Expand Minimize

DROP QUEUE (Transact-SQL)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Drops an existing queue.

Applies to: SQL Server (SQL Server 2008 through current version).

Topic link icon Transact-SQL Syntax Conventions

DROP QUEUE <object>
[ ; ]

<object> ::=
{
    [ database_name . [ schema_name ] . | schema_name . ]
        queue_name
}

database_name

The name of the database that contains the queue to drop. When no database_name is provided, defaults to the current database.

schema_name (object)

The name of the schema that owns the queue to drop. When no schema_name is provided, defaults to the default schema for the current user.

queue_name

The name of the queue to drop.

You cannot drop a queue if any services refer to the queue.

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

The following example drops the ExpenseQueue queue from the current database.

DROP QUEUE ExpenseQueue ;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft