Freigeben über


ServerLoginMode Method

Dieses Feature wird in einer zukünftigen Version von Microsoft SQL Server entfernt. Verwenden Sie dieses Feature beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

The ServerLoginMode method returns the default login mode for the specified server.

Syntax

object
.ServerLoginMode(
ServerName 
)
as
SQLDMO_SECURITY_TYPE

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • ServerName
    String that specifies the server name.

Prototype (C/C++)

HRESULT ServerLoginMode(
SQLDMO_LPCSTR ServerName, 
SQLDMO_SECURITY_TYPE *pRetVal);

Returns

ServerLoginMode returns one of these SQLDMO_SECURITY_TYPE values.

Constant Value Description

SQLDMOSecurity_Integrated

1

Allow Windows Authentication only

SQLDMOSecurity_Mixed

2

Allow Windows Authentication or SQL Server Authentication

SQLDMOSecurity_Normal

0

Allow SQL Server Authentication only

SQLDMOSecurity_Unknown

9

Security type unknown

Hinweise

The ServerLoginMode method allows an application to determine the login mode of a server without logging in. Login information is stored in the registry, and is accessible remotely if Windows Registry Key Permissions is set to Enumerate Subkeys.

By calling ServerLoginMode, and application may be able to reduce the amount of time necessary to determine the login mode of a server. This can be useful in a situation where the application must overcome time-out issues.

ms143092.note(de-de,SQL.90).gifHinweis:
ServerLoginMode can be used with SQL Server 7.0, and Microsoft SQL Server 2000 or later.

Applies To:

SQLServer2 Object