xp_revokelogin Extended Stored Procedure

Revokes SQL Server access from a Windows NT - based group or user.

Syntax

xp_revokelogin 'account_name'

where

account_name
Specifies the Windows NT - based group or username for which to revoke access. If the group or username does not include a domain name and a backslash (\), Windows NT initially searches for a matching user on the local computer, then on the primary domain controller, and then on trusted domains.

Remarks

You can revoke permission only on an account on which you have been explicitly granted permission through xp_grantlogin.

Example

This example revokes SQL Server access from the SQL Server Administrator group.

xp_revokelogin 'SQL Server administrator'

Permission

Execute permission defaults to the system administrator and can be granted to other users.

See Also

xp_grantlogin xp_logininfo
xp_loginconfig