Server.EnumMembers Method

Enumerates a list of members of server roles and database roles on the instance of Microsoft SQL Server.

Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public Function EnumMembers ( _
    roleType As RoleTypes _
) As StringCollection
public StringCollection EnumMembers (
    RoleTypes roleType
)
public:
StringCollection^ EnumMembers (
    RoleTypes roleType
)
public StringCollection EnumMembers (
    RoleTypes roleType
)
public function EnumMembers (
    roleType : RoleTypes
) : StringCollection

Parameters

  • roleType
    A RoleTypes object value that specifies the type of role of which to limit the results.

Return Value

A StringCollection object value that contains a list of members and the roles to which they belong.

Remarks

Updated text:

Use this method to obtain a list of the members of server roles, database roles, or both.

This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

Server Class
Server Members
Microsoft.SqlServer.Management.Smo Namespace

Other Resources

How to: Use an SMO Method with a Parameter in Visual Basic .NET
Calling Methods
Managing Servers

Change History

Release

History

New content:
  • Added to the description in the Remarks section.