| 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 |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | e58684d1-c394-48de-906e-da6ee91100c3 | ||
| caps.latest.revision | 16 | ||
| author | BYHAM | ||
| ms.author | rickbyh | ||
| manager | jhubbard |
[!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). |
Transact-SQL Syntax Conventions
sp_droplogin [ @loginame = ] 'login'
[ @loginame = ] 'login'
Is the login to be removed. login is sysname, with no default. login must already exist in [!INCLUDEssNoVersion].
0 (success) or 1 (failure)
sp_droplogin calls DROP LOGIN.
sp_droplogin cannot be executed within a user-defined transaction.
Requires ALTER ANY LOGIN permission on the server.
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
Security Stored Procedures (Transact-SQL)
DROP LOGIN (Transact-SQL)
System Stored Procedures (Transact-SQL)