xp_loginconfig Extended Stored Procedure

Reports the login security configuration of the server.

Syntax

xp_loginconfig ['config_name']

where

config_name
Specifies the configuration value about which to display information. If no config_name is specified, all configuration values are reported. These values are valid:
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.

Remarks

The xp_loginconfig extended stored procedure cannot be used to set configuration values. Use the SQL Server setup program to change configuration settings.

Examples

A.    Report All Configuration Values

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 #
-


B.    Report Login Mode Configuration Value

This example shows the setting for only the login mode.

xp_loginconfig 'login mode'
    name
config_value
    ----------------
-------------------------
    login mode
standard


Permission

Execute permission defaults to the system administrator and can be granted to other users.

See Also

xp_grantlogin xp_revokelogin
xp_logininfo