ServerRoles Collection

Diese Funktion wird in zukünftigen Versionen von Microsoft SQL Server nicht mehr bereitgestellt. Verwenden Sie diese Funktion beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

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

SQL-DMO-Objektmodell, das das aktuelle Objekt anzeigt

Properties

Hinweise

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)