REVOKE CONNECT Statement

Removes a user from the database.

Syntax

REVOKE CONNECT 
   FROM userID [,...]

Parameters

Usage

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

ANSI SQL – compliance level: Transact-SQL extension.

Permissions

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.