Database.Checkpoint Database.Checkpoint Database.Checkpoint Method

Definition

Issues a checkpoint.

public:
 void Checkpoint();
public void Checkpoint ();
Public Sub Checkpoint ()

Examples

VB

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)  
}  

Remarks

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.

Applies to