alter login profile

Changes the attributes of a login profile.

Syntax

alter login profile login_profile_name
	{  [as [ not ] default ]
	| [modify attribute_value_pair_list ]
	| [add auto activated roles role_name [, role_name_list ]]
	| [drop auto activated roles { ALL | role_name [, role_name_list ]}]
	| [drop attribute_name_list] }

Parameters

Examples

Usage

  • Precedence rules determine how login account attributes are applied when attributes are taken from different login profiles or when values have been specified using sp_passwordpolicy. For precedence rules, see Applying Login Profile and Password Policy Attributes in the Security Administration Guide.

  • You can specify a login script to be invoked at login. For more information, see Invoking a Login Script in the Security Administration Guide.

See also:
  • create login, create login profile, alter login, drop login, drop login profile

  • For information about altering login profiles, see the Security Administration Guide.

  • lprofile_id, lprofile_name in Reference Manual: Building Blocks

  • sp_passwordpolicy, sp_displaylogin, sp_displayroles, sp_locklogin in Reference Manual: Procedures

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

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

SettingDescription
Enabled

With granular permissions enabled, you must have the manage any login profile privilege to execute alter login profile.

Disabled

With granular permissions disabled, you must have sso_role to execute alter login profile.

Auditing

Values in event and extrainfo columns of sysaudits are:

InformationValues
Event

140

Audit option

security_profile

Command or access audited

alter login profile

Information in extrainfo
Keywords contain:
  • DEFAULT

  • NOT DEFAULT

  • DROP attribute_name_list

  • MODIFY attribute_value_pair_list

  • ADD AUTO ACTIVATED ROLES role1 [role2][ ... [ roleN]... ]]

  • DROP AUTO ACTIVATED ROLES {ALL | role1 [, role2 [... [, roleN] ... ] ] }

Related reference
alter login
create login
create login profile
drop login
drop login profile