xp_loginconfig
Reports the login security configuration of Microsoft® SQL Server™ when running on Microsoft Windows 2000 or Microsoft Windows NT® 4.0.
Syntax
xp_loginconfig ['config_name']
Arguments
'config_name'
Is the configuration value to be displayed. If config_name is not specified, all configuration values are reported. config_name is sysname, with a default of NULL, and can be one of these values.
Value | Description |
---|---|
login mode | Login security mode. Possible values are Mixed and Windows Authentication. |
default login | Name of the default SQL Server login ID for authorized users of trusted connections (for users without matching login name). The default login is guest. Provided for backward compatibility. |
default domain | Name of the default Windows NT domain for network users of trusted connections. The default domain is the domain that the Windows NT computer running SQL Server is a member of. Provided for backward compatibility. |
audit level | Audit level. Possible values are none, success, failure, and all. Audits are written to the error log and 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. Possible values are true or false. If this is set, the network username appears in output from sp_who. |
map _ | Reports what special Windows NT characters are mapped to the valid SQL Server character _ (underscore). Possible values are domain separator (default), space, null, or any single character. Provided for backward compatibility. |
map $ | Reports what 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 default is space. Provided for backward compatibility. |
map # | Reports what special Windows NT characters are mapped to the valid SQL Server character # (number sign). Possible values are domain separator, space, null, or any single character. Default is the hyphen. Provided for backward compatibility. |
Return Code Values
0 (success) or 1 (failure)
Result Sets
Column name | Data type | Description |
---|---|---|
name | sysname | Configuration value |
config value | sysname | Configuration value setting |
Remarks
xp_loginconfig cannot be used to set configuration values.
Use SQL Server Enterprise Manager to set the login mode and audit level.
Permissions
Execute permissions for xp_loginconfig default to members of the db_owner fixed database role in the master database and members of the sysadmin fixed server role, but can be granted to other users.
Examples
A. Report all configuration values
This example shows all of the currently configured settings.
EXEC xp_loginconfig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
B. Report login mode configuration value
This example shows the setting for only the login mode.
EXEC xp_loginconfig 'login mode'
|
|
|
|
|
|
See Also
System Stored Procedures (General Extended Procedures)