ServerRoles Collection (SQL-DMO)

The ServerRoles collection contains ServerRole objects enumerating the security administration units used to configure installation-affecting permissions.

Remarks

Microsoft® SQL Server™ defines a fixed number of installation-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)

Methods
Item Method Refresh Method

Properties

Count Property

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.