Skip to content

Latest commit

 

History

History
102 lines (73 loc) · 4.7 KB

File metadata and controls

102 lines (73 loc) · 4.7 KB
title xp_loginconfig (Transact-SQL)
description Reports the login security configuration of an instance of SQL Server.
author VanMSFT
ms.author vanto
ms.reviewer randolphwest
ms.date 06/23/2025
ms.service sql
ms.subservice system-objects
ms.topic reference
f1_keywords
xp_loginconfig_TSQL
xp_loginconfig
helpviewer_keywords
xp_loginconfig
dev_langs
TSQL

xp_loginconfig (Transact-SQL)

[!INCLUDE SQL Server]

Reports the login security configuration of an instance of [!INCLUDE ssNoVersion].

Important

[!INCLUDE ssNoteDepFutureAvoid]

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

xp_loginconfig [ 'config_name' ]

Arguments

[!INCLUDE extended-stored-procedures]

'config_name'

The configuration value to be displayed. If config_name isn't specified, all configuration values are reported. config_name is sysname, with a default of NULL, and can be one of the following values.

Value Description
login mode Login security mode. Possible values are Mixed and Windows Authentication.

Replaced by:

SELECT SERVERPROPERTY('IsIntegratedSecurityOnly');
default login Name of the default [!INCLUDE ssNoVersion] login ID for authorized users of trusted connections (for users without matching login name). The default login is guest.

Note: This value is provided for backward compatibility.
default domain Name of the default Windows domain for network users of trusted connections. The default domain is the domain of the computer running Windows and [!INCLUDE ssNoVersion].

Note: This value is 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 Event Viewer.
set hostname Indicates whether the host name from the client login record is replaced with the Windows network user name. Possible values are true or false. If this option is set, the network user name appears in output from sp_who.
map _ Reports what special Windows characters are mapped to the valid [!INCLUDE ssNoVersion] underscore character (_). Possible values are domain separator (default), space, null, or any single character.

Note: This value is provided for backward compatibility.
map $ Reports what special Windows characters are mapped to the valid [!INCLUDE ssNoVersion] dollar sign character ($). Possible values are domain separator, space, null, or any single character. The default is space.

Note: This value is provided for backward compatibility.
map # Reports what special Windows characters are mapped to the valid [!INCLUDE ssNoVersion] number sign character (#). Possible values are domain separator, space, null, or any single character. Default is the hyphen.

Note: This value is provided for backward compatibility.

Return code values

0 (success) or 1 (failure).

Result set

Column name Data type Description
name sysname Configuration value
config value sysname Configuration value setting

Remarks

xp_loginconfig can't be used to set configuration values.

To set the login mode and audit level, use [!INCLUDE ssManStudioFull].

Permissions

Requires CONTROL permission on the master database.

Examples

A. Report all configuration values

The following example shows all the currently configured settings.

EXECUTE xp_loginconfig;
GO

B. Report a specific configuration value

The following example shows the setting for only the login mode.

EXECUTE xp_loginconfig 'login mode';
GO

Related content