Reports the login security configuration of the server.
xp_loginconfig ['config_name']
where
Configuration value |
Description |
---|---|
login mode | The login security mode. Possible values are standard, integrated, and mixed. |
default login | The name of the default SQL Server login ID for authorized users of trusted connections (for users without matching login names in the syslogins table). This value is NULL if no default is allowed (users without matching login names in syslogins will not be allowed to connect) or if the login mode is standard. |
default domain | The name of the default Windows NT domain for network users of trusted connections. This value is NULL if the login mode is standard. |
audit level | The audit level. Possible values are none, success, failure, and all. Audits are written to the error log and/or to the Windows NT Event Viewer. |
set hostname | Indicates whether the hostname from the client login record is replaced with the Windows NT network username for users under integrated security. Possible values are true or false. If this is set, the network username appears in output from sp_who. |
map _ | Reports which special Windows NT characters are mapped to the valid SQL Server character _ (underscore). Possible values are domain separator, space, null, or any single character. |
map # | Reports which special Windows NT characters are mapped to the valid SQL Server character # (pound sign). Possible values are domain separator, space, null, or any single character. |
map $ | Reports which special Windows NT characters are mapped to the valid SQL Server character $ (dollar sign). Possible values are domain separator, space, null, or any single character. |
The xp_loginconfig extended stored procedure cannot be used to set configuration values. Use the SQL Server setup program to change configuration settings.
This example shows all of the currently configured settings for integrated login security.
xp_loginconfig
name |
config_value |
---------------- |
------------------------- |
login mode |
integrated |
default login |
guest |
default domain |
REDMOND |
audit level |
none |
set hostname |
false |
map _ |
domain separator |
map $ |
NULL |
map # |
- |
This example shows the setting for only the login mode.
xp_loginconfig 'login mode'
name |
config_value |
---------------- |
------------------------- |
login mode |
standard |
Execute permission defaults to the system administrator and can be granted to other users.
xp_grantlogin | xp_revokelogin |
xp_logininfo |