Database.AutoUpdateStatisticsEnabled Property
SQL Server 2008
Gets a Boolean property value that specifies whether statistics are automatically updated for the database.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Property Value
Type: System.BooleanA Boolean value that specifies the whether statistics are automatically updated for the database.
If True, statistics are automatically updated for the database. Otherwise, False (default).
Implements
IDatabaseOptions.AutoUpdateStatisticsEnabled
'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")
'Display the current options for statistics.
Console.WriteLine("Automatically create statistics = " + _
db.AutoCreateStatisticsEnabled.ToString)
Console.WriteLine("Automatically update statistics = " + _
db.AutoUpdateStatisticsEnabled.ToString)
