Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Grants a Windows group or user access to SQL Server.
Ważne: |
|---|
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use CREATE LOGIN instead. |
Transact-SQL Syntax Conventions
Składnia
xp_grantlogin {[@loginame = ] 'login'} [,[@logintype = ] 'logintype']
Arguments
[ @loginame = ] 'login'
Is the name of the Windows user or group to be added. The Windows user or group must be qualified with a Windows domain name in the form Domain\User. login is sysname, with no default.[ @logintype = ] 'logintype'
Is the security level of the login being granted access. logintype is varchar(5), with a default of NULL. Only admin can be specified. If admin is specified, login is granted access to SQL Server, and added as a member of the sysadmin fixed server role.
Return Code Values
0 (success) or 1 (failure)
Uwagi
xp_grantlogin is now a system stored procedure instead of an extended stored procedure. xp_grantlogin calls sp_grantlogin and sp_addsrvrolemember.
Permissions
Requires membership in the securityadmin fixed server role. When changing the logintype, requires membership in the sysadmin fixed server role.
Zobacz także
Odwołanie
System Stored Procedures (Transact-SQL)
Ważne: