Skip to content

Latest commit

 

History

History
74 lines (57 loc) · 2.63 KB

File metadata and controls

74 lines (57 loc) · 2.63 KB
title sp_droplogin (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
sp_droplogin
sp_droplogin_TSQL
dev_langs
TSQL
helpviewer_keywords
sp_droplogin
ms.assetid e58684d1-c394-48de-906e-da6ee91100c3
caps.latest.revision 16
author BYHAM
ms.author rickbyh
manager jhubbard

sp_droplogin (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]

Removes a [!INCLUDEssNoVersion] login. This prevents access to an instance of [!INCLUDEssNoVersion] under that login name.

Important

[!INCLUDEssNoteDepFutureAvoid] Use DROP LOGIN instead.

Applies to: [!INCLUDEssNoVersion] ([!INCLUDEssKatmai] through current version).

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
sp_droplogin [ @loginame = ] 'login'  

Arguments

[ @loginame = ] 'login'
Is the login to be removed. login is sysname, with no default. login must already exist in [!INCLUDEssNoVersion].

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_droplogin calls DROP LOGIN.

sp_droplogin cannot be executed within a user-defined transaction.

Permissions

Requires ALTER ANY LOGIN permission on the server.

Examples

The following example uses DROP LOGIN to remove the login Victoria from an instance of [!INCLUDEssNoVersion]. This is the preferred method.

DROP LOGIN Victoria;  
GO  

See Also

Security Stored Procedures (Transact-SQL)
DROP LOGIN (Transact-SQL)
System Stored Procedures (Transact-SQL)