--- title: "xp_revokelogin (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "06/10/2016" ms.prod: sql ms.prod_service: "database-engine" ms.reviewer: "" ms.technology: system-objects ms.topic: "language-reference" f1_keywords: - "xp_revokelogin" - "xp_revokelogin_TSQL" dev_langs: - "TSQL" helpviewer_keywords: - "xp_revokelogin" ms.assetid: b3fa7678-dba4-4537-be94-5ae63ca11f81 author: VanMSFT ms.author: vanto --- # xp_revokelogin (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-xxxx-xxxx-xxx-md](../../includes/tsql-appliesto-ss2008-xxxx-xxxx-xxx-md.md)] Revokes access from a Windows group or user to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. > [!IMPORTANT] > [!INCLUDE[ssNoteDepFutureAvoid](../../includes/ssnotedepfutureavoid-md.md)] Use [DROP LOGIN](../../t-sql/statements/drop-login-transact-sql.md) instead. ![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## Syntax ``` xp_revokelogin {[@loginame=] 'login'} ``` ## Arguments `[ @loginame = ] 'login'` Is the name of the Windows user or group from which to revoke access. *login* must include the domain name, for example **[ADVWKS\sylvester1]**. *login* is **sysname**, with no default. ## Return Code Values 0 (success) or 1 (failure) ## Remarks Use DROP LOGIN instead. ## Permissions Requires ALTER ANY LOGIN permission on the server. ## See Also [sp_denylogin (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-denylogin-transact-sql.md) [sp_grantlogin (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-grantlogin-transact-sql.md) [sp_revokelogin (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-revokelogin-transact-sql.md) [System Stored Procedures (Transact-SQL)](../../relational-databases/system-stored-procedures/system-stored-procedures-transact-sql.md) [General Extended Stored Procedures (Transact-SQL)](../../relational-databases/system-stored-procedures/general-extended-stored-procedures-transact-sql.md) [xp_loginconfig (Transact-SQL)](../../relational-databases/system-stored-procedures/xp-loginconfig-transact-sql.md) [xp_logininfo (Transact-SQL)](../../relational-databases/system-stored-procedures/xp-logininfo-transact-sql.md)