drop login profile

Description

Drops a login profile or list of login profiles.

Syntax

drop login profile login_profile_name [, login_profile_name_list]
	 [ with override ] 

Parameters

login_profile_name

specifies the name of the login profile to be dropped.

login_profile_name_list

specifies a list of login profiles to be dropped.

with override

forcefully drops login profiles that are bound to login accounts. The login accounts associated with the dropped login profile will be associated with the default login profile.

Examples

Example 1

Drops the login profile group1_login_profile if it is not bound to one or more login accounts.

drop login profile group1_login_profile

Example 2

An error is generated because the sa_login_profile being bound to one or more login accounts.

drop login profile sa_login_profile

Msg 11193, Level 16, State 1:
Line 1:
The specified login profile is the default login profile
and/or associated with one or more login accounts. 
Remove the default property and/or associations or use 
the WITH OVERRIDE clause to drop the login profile.

Example 3

The sa_login_profile is dropped even though it is bound to one or more login accounts.

drop login profile sa_login_profile with override

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

The permission checks for drop login profile differ based on your granular permissions settings.

Granular permissions enabled

With granular permissions enabled, you must be a user with manage any login profile privilege.

Granular permissions disabled

With granular permissions disabled, you must be a user with sso_role to drop the login profile.

Auditing

Values in event and extrainfo columns of sysaudits are:

Event

Audit option

Command or access audited

Information in extrainfo

141

security_profile

drop login profile

Keywords contain:

login_profile_name [WITH OVERRIDE]

See also

Commands create login profile, create login, alter login profile, alter login , drop login

Documents For more information about dropping login profiles, see the Security Administration Guide.

Functions lprofile_id, lprofile_name

System procedure sp_passwordpolicy, sp_displaylogin, sp_displayroles, sp_locklogin