次の方法で共有


Logins Collection

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The Logins collection contains Login objects that reference login records that form one part of Microsoft SQL Server security.

現在のオブジェクトを表す SQL-DMO オブジェクト モデル

Properties

Count Property

Methods

Add Method

Refresh Method

Item Method

Remove Method (Collections)

解説

With the Logins collection, you can:

  • Create SQL Server login records used for SQL Server Authentication or used by Windows Authentication for security account identification.
  • Remove login records, disabling SQL Server Authentication for the login or removing configured behavior for a Windows security account.

For more information about creating SQL Server login records using the Login object and Logins collection, see Login Object.

To remove a login record

  1. Use the Remove method of the Logins collection, as in:

    oSQLServer.Logins.Remove("someone")
    

When using the Item or Remove method, the Logins collection supports member identification using either name or ordinal reference syntax. For example:

Set oLogin = oSQLServer.Logins("somebody")

Or:

Set oLogin = oSQLServer.Logins(1)
ms131927.note(ja-jp,SQL.90).gifメモ :
Creating or removing SQL Server logins by using the Logins collection requires appropriate privilege. The SQL Server login used for SQLServer object connection must be a member of the fixed role securityadmin or a role with greater privilege.