PartitionFunction-Klasse

The PartitionFunction object provides programmatic access to partition functions.

Vererbungshierarchie

System.Object
  Microsoft.SqlServer.Management.Smo.SmoObjectBase
    Microsoft.SqlServer.Management.Smo.SqlSmoObject
      Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Smo.ScriptNameObjectBase
          Microsoft.SqlServer.Management.Smo.PartitionFunction

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

Syntax

'Declaration
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute> _
Public NotInheritable Class PartitionFunction _
    Inherits ScriptNameObjectBase _
    Implements ISfcSupportsDesignMode, IDroppable, IAlterable, ICreatable,  _
    IScriptable, IExtendedProperties
'Usage
Dim instance As PartitionFunction
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute]
public sealed class PartitionFunction : ScriptNameObjectBase, 
    ISfcSupportsDesignMode, IDroppable, IAlterable, ICreatable, IScriptable, 
    IExtendedProperties
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute]
public ref class PartitionFunction sealed : public ScriptNameObjectBase, 
    ISfcSupportsDesignMode, IDroppable, IAlterable, ICreatable, IScriptable, 
    IExtendedProperties
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute>]
type PartitionFunction =  
    class 
        inherit ScriptNameObjectBase 
        interface ISfcSupportsDesignMode 
        interface IDroppable 
        interface IAlterable 
        interface ICreatable 
        interface IScriptable 
        interface IExtendedProperties 
    end
public final class PartitionFunction extends ScriptNameObjectBase implements ISfcSupportsDesignMode, IDroppable, IAlterable, ICreatable, IScriptable, IExtendedProperties

Der PartitionFunction-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode PartitionFunction() Initializes a new instance of the PartitionFunction class.
Öffentliche Methode PartitionFunction(Database, String) Initializes a new instance of the PartitionFunction class for the specified database and with the specified name.

Zum Anfang

Eigenschaften

  Name Beschreibung
Öffentliche Eigenschaft CreateDate Gets the date and time when the partition function was created.
Öffentliche Eigenschaft Events Gets the events associated with the partition function.
Öffentliche Eigenschaft ExtendedProperties Represents a collection of ExtendedProperty objects. Each ExtendedProperty object represents an extended property defined on the partition function.
Öffentliche Eigenschaft ID Gets the zero-based ordinal of the PartitionFunction object, which specifies its position within the collection.
Öffentliche Eigenschaft Name Gets or sets a String which contains the name of the PartitionFunction. (Überschreibt NamedSmoObject.Name.)
Öffentliche Eigenschaft NumberOfPartitions Gets the number of partitions.
Öffentliche Eigenschaft Parent Gets or sets the Database object that is the parent of the PartitionFunction object.
Öffentliche Eigenschaft PartitionFunctionParameters Represents a collection of PartitionFunctionParameter objects. Each PartitionFunctionParameters object represents a partition function parameter defined on the partition function.
Öffentliche Eigenschaft Properties Gets a collection of Property objects that represent the object properties. (Geerbt von SqlSmoObject.)
Öffentliche Eigenschaft RangeType Gets or sets the placement of boundary values in relation to the interval.
Öffentliche Eigenschaft RangeValues Gets or sets range values that define the distribution of the partition function.
Öffentliche Eigenschaft State Gets the state of the referenced object. (Geerbt von SmoObjectBase.)
Öffentliche Eigenschaft Urn Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Geerbt von SqlSmoObject.)
Öffentliche Eigenschaft UserData Gets or sets user-defined data associated with the referenced object. (Geerbt von SmoObjectBase.)

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche Methode Alter Updates any PartitionFunction object property changes on the instance of Microsoft SQL Server. 
Öffentliche Methode Create Creates a partition function on the instance of Microsoft SQL Server as defined by the PartitionFunction object.
Öffentliche Methode Discover Discovers a list of type Object. (Geerbt von SqlSmoObject.)
Öffentliche Methode Drop Removes an existing partition function.
Öffentliche Methode Equals (Geerbt von Object.)
Geschützte Methode FormatSqlVariant Formats an object as SqlVariant type. (Geerbt von SqlSmoObject.)
Geschützte Methode GetContextDB Gets the context database that is associated with this object. (Geerbt von SqlSmoObject.)
Geschützte Methode GetDBName Gets the database name that is associated with the object. (Geerbt von SqlSmoObject.)
Öffentliche Methode GetHashCode (Geerbt von Object.)
Geschützte Methode GetPropValue Gets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte Methode GetPropValueOptional Gets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte Methode GetPropValueOptionalAllowNull Gets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte Methode GetServerObject Gets the server of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Öffentliche Methode GetType (Geerbt von Object.)
Öffentliche Methode Initialize() Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Öffentliche Methode Initialize(Boolean) Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Geschützte Methode IsObjectInitialized Verifies whether the object has been initialized. (Geerbt von SqlSmoObject.)
Geschützte Methode IsObjectInSpace Verifies whether the object is isolated or connected to the instance of SQL Server. (Geerbt von SqlSmoObject.)
Öffentliche Methode MergeRangePartition Merges two existing range partitions based on the specified boundary value.
Öffentliche Methode Refresh Refreshes the state information for the PartitionFunction object. (Überschreibt ScriptNameObjectBase.Refresh().)
Öffentliche Methode Script() Generates a Transact-SQL script that can be used to re-create the partition function.
Öffentliche Methode Script(ScriptingOptions) Generates a Transact-SQL script that can be used to re-create the partition function as specified by the script options.
Geschützte Methode SetParentImpl Sets the parent of the SqlSmoObject to the newParent parameter. (Geerbt von SqlSmoObject.)
Öffentliche Methode SplitRangePartition Splits an existing range partition into two parts based on a supplied boundary value.
Öffentliche Methode ToString Returns a String that represents the referenced object. (Geerbt von SqlSmoObject.)
Öffentliche Methode Validate Validates the state of an object. (Geerbt von SmoObjectBase.)

Zum Anfang

Ereignisse

  Name Beschreibung
Öffentliches Ereignis PropertyChanged Represents the event that occurs when a property is changed. (Geerbt von SqlSmoObject.)
Öffentliches Ereignis PropertyMetadataChanged Represents the event that occurs when property metadata changes. (Geerbt von SqlSmoObject.)

Zum Anfang

Explizite Schnittstellenimplementierungen

  Name Beschreibung
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.Discover Discovers any dependencies. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.GetDomainRoot Returns the root of the domain. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.GetParent Gets 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 Methode IAlienObject.GetPropertyType Gets the type of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.GetPropertyValue Gets the value of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.GetUrn Gets 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 Methode IAlienObject.Resolve Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.SetObjectState Sets the object state to the specified SfcObjectState value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.SetPropertyValue Sets the property value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode ISfcPropertyProvider.GetPropertySet Gets the interface reference to the set of properties of this object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Eigenschaft ISfcSupportsDesignMode.IsDesignMode Gets a Boolean value that indicates whether the object supports design mode. Nur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt.

Zum Anfang

Hinweise

Partition functions are used to partition tables and indexes across multiple file groups.

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

To set PartitionFunction object propertied, users must ALTER permission on the database or ALTER ANY DATASPACE permission on the server, or be a member of the db_owner or db_ddladmin fixed database roles or a member of sysadmin fixed server role.

To create or drop a partition function, users must have ALTER permission on the database or ALTER ANY DATASPACE permission on the server, or be a member of the db_owner or db_ddladmin fixed database roles or a member of sysadmin fixed server role.

To merge or split the range values on the partition function, users must have ALTER permission on the database or ALTER ANY DATASPACE permission on the server, or be a member of the db_owner or db_ddladmin fixed database roles or a member of sysadmin fixed server 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.

Beispiele

Verwenden von Dateigruppen und Dateien zur Speicherung von Daten

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.

Siehe auch

Verweis

Microsoft.SqlServer.Management.Smo-Namespace

Andere Ressourcen

CREATE PARTITION FUNCTION (Transact-SQL)