次の方法で共有


ServerRoles Collection

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

The ServerRoles collection contains ServerRole objects that enumerate the security administration units used to configure instance-affecting permissions.

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

Properties

説明

Microsoft SQL Server defines a fixed number of instance-affecting security administration units, called server roles. Because the number is fixed, the ServerRoles collection has fixed membership and does not support the Add or Remove methods.

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

Set oServerRole = oSQLServer.ServerRoles("sysadmin")

Or:

Set oServerRole = oSQLServer.ServerRoles(2)