Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Enumerates a list of information about the most recent statistics updates for the specified statistic counter.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
Public Function EnumLastStatisticsUpdates ( _
statname As String _
) As DataTable
'Usage
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
Parameter
- statname
Typ: System.String
A String value that specifies the statistic counter to which to limit the results.
Rückgabewert
Typ: 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 |
The name of key or index on which the statistic counter is based. |
|
LastUpdated |
The date and time when the statistics were last updated. |
Beispiele
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")
Siehe auch
Verweis
EnumLastStatisticsUpdates-Überladung
Microsoft.SqlServer.Management.Smo-Namespace