(0) exportieren Drucken
Alle erweitern
Dieser Artikel wurde manuell übersetzt. Bewegen Sie den Mauszeiger über die Sätze im Artikel, um den Originaltext anzuzeigen. Weitere Informationen
Übersetzung
Original
Dieser Artikel wurde noch nicht bewertet - Dieses Thema bewerten.

DatabaseRole-Klasse

The DatabaseRole object represents a SQL Server database security role.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
[StateChangeEventAttribute("CREATE_ROLE", "ROLE")]
[StateChangeEventAttribute("ALTER_ROLE", "ROLE")]
[PhysicalFacetAttribute]
[SfcElementTypeAttribute("Role")]
[StateChangeEventAttribute("ALTER_AUTHORIZATION_DATABASE", "ROLE")]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)]
public sealed class DatabaseRole : ScriptNameObjectBase, 
	ISfcSupportsDesignMode, IObjectPermission, ICreatable, IDroppable, IAlterable, 
	IRenamable, IExtendedProperties, IScriptable

Der DatabaseRole-Typ macht folgende Elemente verfügbar.

  NameBeschreibung
Öffentliche MethodeDatabaseRole()Initializes a new instance of the DatabaseRole class.
Öffentliche MethodeDatabaseRole(Database, String)Initializes a new instance of the DatabaseRole class.
Zum Anfang
  NameBeschreibung
Öffentliche EigenschaftCreateDateGets the date and time when the database role was created.
Öffentliche EigenschaftDateLastModifiedGets the date and time when the database role was last modified.
Öffentliche EigenschaftExtendedPropertiesGets the extended properties of the database role.
Öffentliche EigenschaftIDGets the ID value that uniquely identifies the database role.
Öffentliche EigenschaftIsFixedRoleGets the Boolean property value that specifies whether the database role is a fixed role or a user-defined role.
Öffentliche EigenschaftNameGets or sets a String value that specifies the name of the database role. (Überschreibt NamedSmoObject.Name.)
Öffentliche EigenschaftOwnerGets or sets the owner of the database role.
Öffentliche EigenschaftParentGets or sets the Database object that is the parent of the DatabaseRole object.
Öffentliche EigenschaftPropertiesGets a collection of Property objects that represent the object properties. (Geerbt von SqlSmoObject.)
Öffentliche EigenschaftStateGets the state of the referenced object. (Geerbt von SmoObjectBase.)
Öffentliche EigenschaftUrnGets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Geerbt von SqlSmoObject.)
Öffentliche EigenschaftUserDataGets or sets user-defined data associated with the referenced object. (Geerbt von SmoObjectBase.)
Zum Anfang
  NameBeschreibung
Öffentliche MethodeAddMemberAdds an existing database user or database role to the database role.
Öffentliche MethodeAlterUpdates any DatabaseRole object property changes on the instance of Microsoft SQL Server.
Öffentliche MethodeCreateCreates a database role on the instance of Microsoft SQL Server as defined by the DatabaseRole object.
Öffentliche MethodeDeny(ObjectPermissionSet, String)Denies the specified set of permissions for the specified grantee on the database role.
Öffentliche MethodeDeny(ObjectPermissionSet, String[])Denies the specified set of permissions for the specified grantees on the database role.
Öffentliche MethodeDeny(ObjectPermissionSet, String, Boolean)Denies the specified set of permissions for the specified grantee and other users that the grantee granted the specified set of permissions on the database role.
Öffentliche MethodeDeny(ObjectPermissionSet, String[], Boolean)Denies the specified set of permissions for the specified grantees and other users that the grantee granted the specified set of permissions on the database role.
Öffentliche MethodeDiscoverDiscovers a list of type Object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeDropDrops the database role.
Öffentliche MethodeDropMemberRemoves the specified database user or role from the referenced database role.
Öffentliche MethodeEnumAgentProxyAccountsReturns a list of agent proxy accounts that are assigned to the database role.
Öffentliche MethodeEnumMembersReturns a list of database users that are members of the database role.
Öffentliche MethodeEnumObjectPermissions()Returns a list of object permissions assigned to the referenced database role.
Öffentliche MethodeEnumObjectPermissions(String)Returns a list of object permissions assigned to the referenced database role for the specified member of the role.
Öffentliche MethodeEnumObjectPermissions(ObjectPermissionSet)Returns a list of object permissions assigned to the referenced database role for the specified set of object permissions.
Öffentliche MethodeEnumObjectPermissions(String, ObjectPermissionSet)Returns a list of object permissions assigned to the referenced database role for the specified member of the role and for the specified set of permissions.
Öffentliche MethodeEnumRolesReturns a list of the roles that the referenced database role is a member of.
Öffentliche MethodeEquals (Geerbt von Object.)
Geschützte MethodeFormatSqlVariantFormats an object as SqlVariant type. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetContextDBGets the context database that is associated with this object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetDBNameGets the database name that is associated with the object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeGetHashCode (Geerbt von Object.)
Geschützte MethodeGetPropValueGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetPropValueOptionalGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetPropValueOptionalAllowNullGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetServerObjectGets the server of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeGetType (Geerbt von Object.)
Öffentliche MethodeGrant(ObjectPermissionSet, String)Grants the specified set of permissions to the specified grantee on the database role.
Öffentliche MethodeGrant(ObjectPermissionSet, String[])Grants the specified set of permissions to the specified grantees on the database role.
Öffentliche MethodeGrant(ObjectPermissionSet, String, Boolean)Grants access to the specified permission to the grantee and the ability to grant access to other users on the database role.
Öffentliche MethodeGrant(ObjectPermissionSet, String[], Boolean)Grants access to the specified permission to the grantees and the ability to grant access to other users on the database role.
Öffentliche MethodeGrant(ObjectPermissionSet, String, Boolean, String)Grants the specified set of permissions to the grantees and the ability to grant the set of permissions to other users on the database role under an assumed role.
Öffentliche MethodeGrant(ObjectPermissionSet, String[], Boolean, String)Grants the specified set of permissions to the grantees and the ability to grant the set of permissions to other users on the database role under an assumed role.
Öffentliche MethodeInitialize()Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Öffentliche MethodeInitialize(Boolean)Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Geschützte MethodeIsObjectInitializedVerifies whether the object has been initialized. (Geerbt von SqlSmoObject.)
Geschützte MethodeIsObjectInSpaceVerifies whether the object is isolated or connected to the instance of SQL Server. (Geerbt von SqlSmoObject.)
Öffentliche MethodeRefreshRefreshes the script name. (Geerbt von ScriptNameObjectBase.)
Öffentliche MethodeRenameRenames the database role.
Öffentliche MethodeRevoke(ObjectPermissionSet, String)Revokes a previously granted set of permissions from a grantee on the database role.
Öffentliche MethodeRevoke(ObjectPermissionSet, String[])Revokes a previously granted set of permissions from a list of grantees on the database role.
Öffentliche MethodeRevoke(ObjectPermissionSet, String, Boolean, Boolean)Revokes previously granted permissions from a grantee on the database role and any other users to whom the grantee has granted the specified set of permissions. The grantee is also given the ability to revoke the specified set of permissions from other users under an assumed role.
Öffentliche MethodeRevoke(ObjectPermissionSet, String[], Boolean, Boolean)Revokes previously granted permissions from grantees on the database role and any other users to whom the grantees have granted the specified set of permissions. The grantees are also given the ability to revoke the specified set of permissions from other users under an assumed role.
Öffentliche MethodeRevoke(ObjectPermissionSet, String, Boolean, Boolean, String)Revokes previously granted permissions from a grantee on the database role and any other users to whom the grantee has granted the specified set of permissions. The grantee is also given the ability to revoke the specified set of permissions from other users under an assumed role.
Öffentliche MethodeRevoke(ObjectPermissionSet, String[], Boolean, Boolean, String)Revokes previously granted permissions from grantees on the database role and any other users to whom the grantees have granted the specified set of permissions. The grantees are also given the ability to revoke the specified set of permissions from other users under an assumed role.
Öffentliche MethodeScript()Generates a Transact-SQL script that can be used to re-create the Microsoft SQL Server database role.
Öffentliche MethodeScript(ScriptingOptions)Generates a Transact-SQL script that can be used to re-create the Microsoft SQL Server database role as specified by the scripting options.
Geschützte MethodeSetParentImplSets the parent of the SqlSmoObject to the newParent parameter. (Geerbt von SqlSmoObject.)
Öffentliche MethodeToStringReturns a String that represents the referenced object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeValidateValidates the state of an object. (Geerbt von SmoObjectBase.)
Zum Anfang
  NameBeschreibung
Öffentliches EreignisPropertyChangedRepresents the event that occurs when a property is changed. (Geerbt von SqlSmoObject.)
Öffentliches EreignisPropertyMetadataChangedRepresents the event that occurs when property metadata changes. (Geerbt von SqlSmoObject.)
Zum Anfang
  NameBeschreibung
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.DiscoverDiscovers any dependencies. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetDomainRootReturns the root of the domain. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetParentGets the parent of this object. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetPropertyTypeGets the type of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetPropertyValueGets the value of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetUrnGets the Unified Resource Name (URN) of the object. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.ResolveGets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.SetObjectStateSets the object state to the specified SfcObjectState value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.SetPropertyValueSets the property value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeISfcPropertyProvider.GetPropertySetGets the interface reference to the set of properties of this object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate EigenschaftISfcSupportsDesignMode.IsDesignModeGets a Boolean value that specifies whether the database role supports design mode.
Zum Anfang

To get DatabaseRole object properties, users can be a member of the public fixed server role.

To set DatabaseRole object properties, users must have ALTER permission on the database role.

To create a database role, users must have CREATE ROLE permission on the parent database.

To drop a database role, users must have ALTER ANY ROLE permission on the parent database.

To add or remove members from the database role, users must be members of the db_owner or db_security admin fixed database role.

To grant, deny, or revoke permission on the database for other users, users must have CONTROL permission on the database role.

Thread Safety

Alle öffentlichen, statischen Elemente dieses Typs (Shared in Microsoft Visual Basic) sind für Vorgänge mit mehreren Threads sicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.
Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
Vielen Dank für Ihr Feedback.

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2014 Microsoft. Alle Rechte vorbehalten.