Table.EnumLastStatisticsUpdates Método
Enumerates a list of information about the most recent statistics updates.
Espacio de nombres: Microsoft.SqlServer.Management.Smo
Ensamblado: Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Sintaxis
'Declaración
Public Function EnumLastStatisticsUpdates As DataTable
'Uso
Dim instance As Table
Dim returnValue As DataTable
returnValue = instance.EnumLastStatisticsUpdates()
public DataTable EnumLastStatisticsUpdates()
public:
DataTable^ EnumLastStatisticsUpdates()
member EnumLastStatisticsUpdates : unit -> DataTable
public function EnumLastStatisticsUpdates() : DataTable
Valor devuelto
Tipo: 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 the key or index on which the statistic counter is based. |
|
LastUpdated |
The date and time when the statistics were last updated. |
Ejemplos
The following code example demonstrates how to enumerate statistic update information.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2012"];
lastStatisticsUpdates[];
Table tb1 = db.Tables[0];
Table tb2 = db.Tables[1];
DataTable[] lastSUpdates = new DataTable[2] {tb1.EnumLastStatisticsUpdates(), tb2.EnumLastStatisticsUpdates()}
Powershell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2012")
$tb1 = $db.Tables[0]
$tb2 = $db.Tables[1]
$lastSUpdates = @($tb1.EnumLastStatisticsUpdates(), $tb2.EnumLastStatisticsUpdates());
Vea también
Referencia
Sobrecarga de EnumLastStatisticsUpdates
Espacio de nombres Microsoft.SqlServer.Management.Smo