Export (0) Print
Expand All

Database.Checkpoint Method ()

 

Applies To: SQL Server 2016 Preview

Issues a checkpoint.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public void Checkpoint()

A checkpoint forces any modified pages that are in memory to be written to the disk. Checkpoints are automatically issued at intervals that are determined by the Recovery Interval SQL Server configuration option. The Checkpoint method issues a checkpoint immediately, regardless of the Recovery Interval settings.

Legacy Code Example

VB

Code snippet is not found. Confirm that the code snippet name 'SMO How to' is correct.

PowerShell

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

$sc = new-object System.Collections.Specialized.StringCollection
$sc = $db.CheckTables([Microsoft.SqlServer.Management.Smo.RepairType]'None')
$c = 0
For ($c=0; $c -le $sc.Count - 1; $c++)
{
   Write-Host $sc.Item($c)
}
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft