sp_grantlogin

Description

Windows NT only Assigns Adaptive Server roles or default permissions to Windows NT users and groups when Integrated Security mode or Mixed mode (with Named Pipes) is active.

Syntax

sp_grantlogin {login_name | group_name} 
	["role_list" | default]

Parameters

login_name

is the network login name of the Windows NT user.

group_name

is the Windows NT group name.

role_list

is a list of the Adaptive Server roles granted. The role list can include one or more of the following role names: sa_role, sso_role, oper_role. If you specify more than one role, separate the role names with spaces, not commas.

default

specifies that the login_name or group_name receive default permissions assigned with the grant statement or sp_role procedure.

Examples

Example 1

Assigns the Adaptive Server oper_role to the Windows NT user “jeanluc”:

sp_grantlogin jeanluc, oper_role

Example 2

Assigns the default value to the Windows NT user “valle”. User “valle” receives any permissions that were assigned to her via the grant command or sp_role procedure:

sp_grantlogin valle

Example 3

Assigns the Adaptive Server sa_role and sso_role to all members of the Windows NT administrators group:

sp_grantlogin Administrators, "sa_role sso_role"

Usage

Permissions

Only a System Administrator can execute sp_grantlogin.

See also

Commands grant, setuser

System procedures sp_addlogin, sp_displaylogin, sp_droplogin, sp_locklogin, sp_logininfo, sp_modifylogin, sp_revokelogin, sp_role