Table.EnumLastStatisticsUpdates 方法 (String)

Enumerates a list of information about the most recent statistics updates for the specified statistic counter.

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
Public Function EnumLastStatisticsUpdates ( _
    statname As String _
) As DataTable
用法
Dim instance As Table 
Dim statname As String 
Dim returnValue As DataTable 

returnValue = instance.EnumLastStatisticsUpdates(statname)
public DataTable EnumLastStatisticsUpdates(
    string statname
)
public:
DataTable^ EnumLastStatisticsUpdates(
    String^ statname
)
member EnumLastStatisticsUpdates : 
        statname:string -> DataTable
public function EnumLastStatisticsUpdates(
    statname : String
) : DataTable

参数

  • statname
    类型:System.String
    A String value that specifies the statistic counter to which to limit the results.

返回值

类型:System.Data.DataTable
A DataTable system object value that contains a list of information about the most recent statistics updates.

Column

Data type

Description

Name

String

The name of key or index on which the statistic counter is based.

LastUpdated

DateTime

The date and time when the statistics were last updated.

示例

The following code example demonstrates how to enumerate statistic update information.

C#

Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2012"];
Table tb = db.Tables["Address", "Person"];

DataTable dt;
dt = tb.EnumLastStatisticsUpdates("PK_Address_AddressID");

Powershell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2012")

$tb = $db.Tables.Item("Address", "Person")
$dt = $tb.EnumLastStatisticsUpdates("PK_Address_AddressID")

请参阅

参考

Table 类

EnumLastStatisticsUpdates 重载

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

创建、更改和删除表

CREATE TABLE (Transact-SQL)