Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.37 KB

File metadata and controls

66 lines (50 loc) · 2.37 KB
title sp_droplogin (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql
ms.prod_service database-engine
ms.reviewer
ms.technology system-objects
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
author stevestein
ms.author sstein

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.

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)