Condividi tramite


ServerRoles Collection

Questa caratteristica verrà rimossa a partire da una delle prossime versioni di Microsoft SQL Server. Evitare di utilizzare questa funzionalità in un nuovo progetto di sviluppo e prevedere interventi di modifica nelle applicazioni in cui è attualmente implementata.

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

Modello di oggetti SQL-DMO in cui è visualizzato l'oggetto corrente

Properties

Osservazioni

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)