Statistic 类
The Statistic class represents a SQL Server statistic counter.
继承层次结构
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..::..Statistic
命名空间: Microsoft.SqlServer.Management.Smo
程序集: Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)
语法
声明
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute> _
Public NotInheritable Class Statistic _
Inherits ScriptNameObjectBase _
Implements ICreatable, IDroppable, IMarkForDrop, IScriptable
用法
Dim instance As Statistic
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute]
public sealed class Statistic : ScriptNameObjectBase,
ICreatable, IDroppable, IMarkForDrop, IScriptable
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute]
public ref class Statistic sealed : public ScriptNameObjectBase,
ICreatable, IDroppable, IMarkForDrop, IScriptable
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute>]
type Statistic =
class
inherit ScriptNameObjectBase
interface ICreatable
interface IDroppable
interface IMarkForDrop
interface IScriptable
end
public final class Statistic extends ScriptNameObjectBase implements ICreatable, IDroppable, IMarkForDrop, IScriptable
Statistic 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
Statistic() () () () | Initializes a new instance of the Statistic class. | |
Statistic(SqlSmoObject, String) | Initializes a new instance of the Statistic class on the specified parent object and with the specified name. |
页首
属性
名称 | 说明 | |
---|---|---|
Events | Gets the events associated with the database. | |
ExecuteForScalar | Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (从 SqlSmoObject 继承。) | |
FileGroup | Gets or sets the file group where the statistic counter is stored. | |
FilterDefinition | ||
HasFilter | ||
ID | Gets the ID value that uniquely identifies the statistic counter. | |
IsAutoCreated | Gets the Boolean property value that specifies whether the statistic counter is automatically created. | |
IsFromIndexCreation | Gets the Boolean property value that specifies whether the statistic counter was generated from the creation of an index. | |
IsTouched | Gets the Boolean property value that specifies whether the object properties have been updated but not yet persisted on the server. (从 SqlSmoObject 继承。) | |
LastUpdated | Gets the date and time when the statistic counter was last updated. | |
Name | Gets or sets the name of the object. (从 NamedSmoObject 继承。) | |
NoAutomaticRecomputation | Gets or sets the Boolean property value that specifies whether the statistics counter recomputed automatically. | |
ObjectInSpace | Gets the Boolean property value that specifies whether the object exists in isolation, or whether it is directly or indirectly connected to the instance of SQL Server. (从 SqlSmoObject 继承。) | |
Parent | Gets or sets the SqlSmoObject object that is the parent of the Statistic object. | |
Properties | Gets a collection of Property objects that represent the object properties. (从 SqlSmoObject 继承。) | |
ScalarResult | Gets the scalar result for the referenced object. (从 SqlSmoObject 继承。) | |
State | Gets the state of the referenced object. (从 SmoObjectBase 继承。) | |
StatisticColumns | Represents a collection of StatisticColumn objects. Each StatisticColumn object represents a column defined on the statistic counter. | |
Urn | Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (从 SqlSmoObject 继承。) | |
UserData | Gets or sets user-defined data associated with the referenced object. (从 SmoObjectBase 继承。) |
页首
方法
页首
显式接口实现
名称 | 说明 | |
---|---|---|
IAlienObjectDiscover | (从 SqlSmoObject 继承。) | |
IAlienObjectGetParent | (从 SqlSmoObject 继承。) | |
IAlienObjectGetProperty | (从 SqlSmoObject 继承。) | |
ISfcPropertyProviderGetPropertySet | (从 SqlSmoObject 继承。) | |
IAlienObjectGetUrn | (从 SqlSmoObject 继承。) | |
IAlienObjectResolve | (从 SqlSmoObject 继承。) | |
IAlienObjectSetProperty | (从 SqlSmoObject 继承。) |
页首
注释
To get Statistic object properties, users can be a member of the public fixed server role.
To set Statistic object properties, users must have ALTER permission on the parent table or view or be a member of the db_owner fixed database role.
To create or drop a statistics counter, users must have ALTER permission on the parent table or view or be a member of the db_owner fixed database role.
To update statistics, users must have ALTER permission on the parent table or view or be a member of the db_owner fixed database role.
Thread Safety
此类型的任何公共静态(Microsoft Visual Basic 中的 Shared)成员在多线程操作中是安全的。 不保证所有实例成员都对于线程安全的。
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。