(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.

View-Klasse

The View object represents a SQL Server view. 

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
public sealed class View : TableViewBase, ISfcSupportsDesignMode, 
	IColumnPermission, IObjectPermission, ICreatable, IAlterable, IDroppable, 
	IRenamable, IExtendedProperties, ITextObject, IViewOptions, IDmfFacet

Der View-Typ macht folgende Elemente verfügbar.

  NameBeschreibung
Öffentliche MethodeView()Initializes a new instance of the View object.
Öffentliche MethodeView(Database, String)Initializes a new instance of the View object on the specified database and with the specified name.
Öffentliche MethodeView(Database, String, String)Initializes a new instance of the View object on the specified database and with the specified name and schema.
Zum Anfang
  NameBeschreibung
Öffentliche EigenschaftAnsiNullsStatusGets the Boolean property value that specifies whether ISO NULL handling is enabled on the view.
Öffentliche EigenschaftColumnsGets a column collection. (Geerbt von TableViewTableTypeBase.)
Öffentliche EigenschaftCreateDateGets the time and date when the view was created.
Öffentliche EigenschaftDateLastModifiedGets the time and date when the view was last modified.
Öffentliche EigenschaftEventsGets the events associated with the view.
Öffentliche EigenschaftExtendedPropertiesGets an extended property collection. (Geerbt von TableViewTableTypeBase.)
Öffentliche EigenschaftFullTextIndexGets the full text index on the table or view. (Geerbt von TableViewBase.)
Öffentliche EigenschaftHasAfterTriggerGets the Boolean property value that specifies whether the view has any after triggers.
Öffentliche EigenschaftHasColumnSpecificationGets the Boolean property that specifies whether the view has a column specification.
Öffentliche EigenschaftHasDeleteTriggerGets the Boolean property value that specifies whether the view has a delete trigger.
Öffentliche EigenschaftHasIndexGets the Boolean property value that specifies whether the view has at least one index.
Öffentliche EigenschaftHasInsertTriggerGets the Boolean property value that specifies whether the view has an insert trigger.
Öffentliche EigenschaftHasInsteadOfTriggerGets the Boolean property value that specifies whether the view has any instead of triggers.
Öffentliche EigenschaftHasUpdateTriggerGets the Boolean property value that specifies whether the view has at least one update trigger.
Öffentliche EigenschaftIDGets the ID value that uniquely identifies the view.
Öffentliche EigenschaftIndexesGets the IndexCollection object. (Überschreibt TableViewTableTypeBase.Indexes.)
Öffentliche EigenschaftIsEncryptedGets or sets the Boolean property that specifies whether the view is encrypted.
Öffentliche EigenschaftIsIndexableGets the Boolean property that specifies whether it is possible to place an index on the view.
Öffentliche EigenschaftIsSchemaBoundGets or sets the Boolean property that specifies whether a schema is bound to the view.
Öffentliche EigenschaftIsSchemaOwnedGets a Boolean value that indicates whether the View object is owned by a schema.
Öffentliche EigenschaftIsSystemObjectGets the Boolean property value that specifies whether the view is a system object.
Öffentliche EigenschaftNameGets or sets a String value that specifies the name of the view table type. (Geerbt von TableViewTableTypeBase.)
Öffentliche EigenschaftOwnerGets the name of the owner of the UserDefinedType object.
Öffentliche EigenschaftParentGets the Database object that is the parent of the View object.
Öffentliche EigenschaftPropertiesGets a collection of Property objects that represent the object properties. (Geerbt von SqlSmoObject.)
Öffentliche EigenschaftQuotedIdentifierStatusGets or sets a Boolean property value that specifies whether identifiers delimited by double quotation marks are Transact-SQL reserved keywords or contain characters not usually allowed by the Transact-SQL syntax rules.
Öffentliche EigenschaftReturnsViewMetadataGets or sets a Boolean property value that specifies whether the view returns metadata.
Öffentliche EigenschaftSchemaGets or sets a String value that specifies the name of the schema that contains the view table type. (Geerbt von TableViewTableTypeBase.)
Öffentliche EigenschaftStateGets the state of the referenced object. (Geerbt von SmoObjectBase.)
Öffentliche EigenschaftStatisticsRepresents a collection of Statistic objects. Each Statistic object represents a statistic counter that is defined on the table or view. (Geerbt von TableViewBase.)
Öffentliche EigenschaftTextBodyGets or sets the Transact-SQL string that defines the view.
Öffentliche EigenschaftTextHeaderGets or sets the header part of the Transact-SQL string that defines the view.
Öffentliche EigenschaftTextModeGets or sets the Boolean property that specifies whether the text header is editable as text.
Öffentliche EigenschaftTriggersRepresents a collection of Trigger objects. Each Trigger object represents a trigger that is defined on the table or view. (Geerbt von TableViewBase.)
Ö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 MethodeAlterUpdates any View object property changes on the instance of Microsoft SQL Server. 
Öffentliche MethodeChangeSchemaChanges the schema for the view.
Öffentliche MethodeCreateCreates a view on the instance of SQL Server as defined by the View object.
Öffentliche MethodeDeny(ObjectPermissionSet, String)Denies the specified set of permissions for the specified grantee on the view.
Öffentliche MethodeDeny(ObjectPermissionSet, String[])Denies the specified set of permissions for the specified grantees on the view.
Ö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 view.
Öffentliche MethodeDeny(ObjectPermissionSet, String, String[])Denies the specified set of permissions to the grantee on the specified columns on the view.
Öffentliche MethodeDeny(ObjectPermissionSet, String[], Boolean)Denies the specified permission for the specified grantees on the view.
Öffentliche MethodeDeny(ObjectPermissionSet, String[], String[])Denies the specified set of permissions for the grantees on the specified columns on the view.
Öffentliche MethodeDeny(ObjectPermissionSet, String, 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 specified columns on the view.
Öffentliche MethodeDeny(ObjectPermissionSet, String[], 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 specified columns on the view.
Öffentliche MethodeDiscoverDiscovers a list of type Object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeDropRemoves the view from the database.
Öffentliche MethodeEnumColumnPermissions()Enumerates a list of column permissions for the view.
Öffentliche MethodeEnumColumnPermissions(String)Enumerates a list of column permissions for a specified grantee on the view.
Öffentliche MethodeEnumColumnPermissions(ObjectPermissionSet)Enumerates a list of column permissions for a specified permission on the view.
Öffentliche MethodeEnumColumnPermissions(String, ObjectPermissionSet)Enumerates a list of column permissions for a specified grantee and a specified permission on the view.
Öffentliche MethodeEnumColumnsEnumerates a list of columns defined in the view.
Öffentliche MethodeEnumFragmentation()Enumerates information about fragments of data that are stored in a table or view. (Geerbt von TableViewBase.)
Öffentliche MethodeEnumFragmentation(FragmentationOption)Enumerates information about fragments of data that are stored in a table or view with the option to specify how detailed the results should be. (Geerbt von TableViewBase.)
Öffentliche MethodeEnumFragmentation(FragmentationOption, Int32)Enumerates information about fragments of data that are stored in a table or view on a specified partition, and with the option to specify how detailed the results should be. (Geerbt von TableViewBase.)
Öffentliche MethodeEnumObjectPermissions()Enumerates a list of object permissions for the view.
Öffentliche MethodeEnumObjectPermissions(String)Enumerates a list of object permissions for a specified grantee on the view.
Öffentliche MethodeEnumObjectPermissions(ObjectPermissionSet)Enumerates a list of object permissions for a specified permission on the view.
Öffentliche MethodeEnumObjectPermissions(String, ObjectPermissionSet)Enumerates a list of object permissions for a specified grantee and a specified permission on the view.
Ö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 view.
Öffentliche MethodeGrant(ObjectPermissionSet, String[])Grants the specified set of permissions to the specified grantees on the view.
Öffentliche MethodeGrant(ObjectPermissionSet, String, Boolean)Grants access to the specified permission and the ability to grant access to other uses for the specified grantee on the view.
Öffentliche MethodeGrant(ObjectPermissionSet, String, String[])Grants access to the specified permission on the specified columns for the specified grantee on the specified columns on the view.
Öffentliche MethodeGrant(ObjectPermissionSet, String[], Boolean)Grants access to the specified permission and the ability to grant access to other uses for the specified grantees on the view.
Öffentliche MethodeGrant(ObjectPermissionSet, String[], String[])Grants the specified set of permissions to the grantees to the specified columns on the view.
Öffentliche MethodeGrant(ObjectPermissionSet, String, Boolean, String)Grants the specified set of permissions to the grantee and the ability to grant the set of permissions to other users on the view under an assumed role.
Öffentliche MethodeGrant(ObjectPermissionSet, String, String[], Boolean)Grants the specified permission to the grantee and the ability to grant the specified set of permissions to other users on the specified columns on the view.
Ö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 view under an assumed role.
Öffentliche MethodeGrant(ObjectPermissionSet, String[], String[], Boolean)Grants the specified set of permissions to the grantees and the ability to grant the set of permissions to other users on the specified columns on the view.
Öffentliche MethodeGrant(ObjectPermissionSet, String, String[], Boolean, String)Grants the specified set of permissions to the grantee and the ability to grant the set of permissions to other users on the specified columns on the view under an assumed role.
Öffentliche MethodeGrant(ObjectPermissionSet, String[], 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 specified columns on the view 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 MethodeReCompileReferencesRecompiles any view or trigger that depends on the base SMO object. (Geerbt von TableViewBase.)
Öffentliche MethodeRefresh()Refreshes the View object or Table object properties. (Geerbt von TableViewBase.)
Öffentliche MethodeRefresh(Boolean)Refreshes the View object properties with the option to refresh metadata.
Öffentliche MethodeRenameRenames the view.
Öffentliche MethodeRevoke(ObjectPermissionSet, String)Revokes a previously granted set of permissions from a grantee on the view.
Öffentliche MethodeRevoke(ObjectPermissionSet, String[])Revokes a previously granted set of permissions from a list of grantees on the view.
Öffentliche MethodeRevoke(ObjectPermissionSet, String, String[])Revokes a previously granted set of permissions from a grantee on the specified columns on the view.
Öffentliche MethodeRevoke(ObjectPermissionSet, String[], String[])Revokes a previously granted set of permissions from a list of grantees on the specified columns on the view.
Öffentliche MethodeRevoke(ObjectPermissionSet, String, Boolean, Boolean)Revokes a previously granted set of permissions from a grantee on the view 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.
Öffentliche MethodeRevoke(ObjectPermissionSet, String[], Boolean, Boolean)Revokes a previously granted set of permissions from grantees on the view 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.
Öffentliche MethodeRevoke(ObjectPermissionSet, String, Boolean, Boolean, String)Revokes a previously granted set of permissions from a grantee from the view 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, String[], Boolean, Boolean)Revokes a previously granted set of permissions from grantees on the specified columns on the view 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 a previously granted set of permissions from grantees on the view and any other users to whom the grantees have granted access. 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[], String[], Boolean, Boolean)Revokes a previously granted set of permissions from grantees on the specified columns on the view 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, String[], Boolean, Boolean, String)Revokes a previously granted set of permissions from a grantee on the specified columns on the view 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[], String[], Boolean, Boolean, String)Revokes a previously granted set of permissions from the grantees for the specified columns on the view and any other users to whom the grantee has granted access. The grantee is also given the ability to revoke other users' access under an assumed role.
Öffentliche MethodeScript()Generates a Transact-SQL script that can be used to re-create the database object. (Geerbt von TableViewTableTypeBase.)
Öffentliche MethodeScript(ScriptingOptions)Generates a Transact-SQL script that can be used to re-create the database object with the specified scripting options. (Geerbt von TableViewTableTypeBase.)
Öffentliche MethodeScriptHeaderReturns the text header with the option to modify the text.
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 MethodeUpdateStatistics()Updates statistics for the table or view. (Geerbt von TableViewBase.)
Öffentliche MethodeUpdateStatistics(StatisticsTarget, StatisticsScanType)Updates the statistics for the table or view with the option to specify the target and the type of scan performed. (Geerbt von TableViewBase.)
Öffentliche MethodeUpdateStatistics(StatisticsTarget, StatisticsScanType, Int32)Updates the statistics for the table or view with the option to specify the target, the type of scan performed, and the sample size. (Geerbt von TableViewBase.)
Öffentliche MethodeUpdateStatistics(StatisticsTarget, StatisticsScanType, Int32, Boolean)Updates the statistics for the table or view with the option to specify the target, the type of scan performed, the sample size, and whether to recompute the statistics. (Geerbt von TableViewBase.)
Ö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.IsDesignModeNur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Gets a Boolean value that indicates whether the object supports design mode.
Zum Anfang

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

To set View object properties, ALTER permission on the view or ALTER VIEW permission on the database.

To create a view, users must CREATE VIEW permission on the database and ALTER permission on the specified schema.

To drop a view, users must have CONTROL permission on the view and ALTER permission on the specified schema.

To grant, deny, or revoke permissions on the view to other users, users must have CONTROL permission on the view.

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.