Show TOC

REVOKE CONNECT StatementLocate this document in the navigation structure

Removes a user from the database.

Syntax
REVOKE CONNECT
   FROM <userID> [,...]
Parameters

(back to top)

  • userID must be the name of an existing user or role that has a login password. Separate multiple userIDs with commas.
Usage

(back to top)

Use system procedures or CREATE USER and DROP USER statements, not GRANT and REVOKE statements, to add and remove user IDs.

You cannot revoke the connect privileges from a user if he or she owns database objects, such as tables. Attempting to do so with a REVOKE statement, or sp_droplogin or sp_iqdroplogin stored procedure returns an error such as Cannot drop a user that owns tables in runtime system.

Standards

(back to top)

ANSI SQL–compliance level: Transact-SQL extension.

Permissions

(back to top)

Requires the MANAGE ANY USER system privilege.
Note

If revoking CONNECT permissions or revoking table permissions from another user, the target user cannot be connected to the database.