|
1 | 1 | --- |
2 | 2 | title: "CHECKPOINT (Transact-SQL) | Microsoft Docs" |
3 | 3 | ms.custom: "" |
4 | | -ms.date: "03/14/2017" |
| 4 | +ms.date: "07/27/2017" |
5 | 5 | ms.prod: "sql-non-specified" |
6 | 6 | ms.reviewer: "" |
7 | 7 | ms.suite: "" |
@@ -35,42 +35,38 @@ manager: "jhubbard" |
35 | 35 | # CHECKPOINT (Transact-SQL) |
36 | 36 | [!INCLUDE[tsql-appliesto-ss2008-xxxx-xxxx-xxx_md](../../includes/tsql-appliesto-ss2008-xxxx-xxxx-xxx-md.md)] |
37 | 37 |
|
38 | | - Generates a manual checkpoint in the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] database to which you are currently connected. |
39 | | - |
40 | | -> [!NOTE] |
41 | | -> For information about different types of database checkpoints and checkpoint operation in general, see [Database Checkpoints (SQL Server)](../../relational-databases/logs/database-checkpoints-sql-server.md). |
42 | | - |
43 | | -|| |
44 | | -|-| |
45 | | -|**Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ([!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] through [current version](http://go.microsoft.com/fwlink/p/?LinkId=299658)).| |
46 | | - |
47 | | -  [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) |
48 | | - |
49 | | -## Syntax |
50 | | - |
51 | | -``` |
52 | | - |
53 | | -CHECKPOINT [ checkpoint_duration ] |
54 | | -``` |
55 | | - |
56 | | -## Arguments |
57 | | - *checkpoint_duration* |
58 | | - Specifies the requested amount of time, in seconds, for the manual checkpoint to complete. When *checkpoint_duration* is specified, the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] attempts to perform the checkpoint within the requested duration. The *checkpoint_duration* must be an expression of type **int** and must be greater than zero. When this parameter is omitted, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] adjusts the checkpoint duration to minimize the performance impact on database applications. *checkpoint_duration* is an advanced option. |
59 | | - |
60 | | -## Factors Affecting the Duration of Checkpoint Operations |
61 | | - In general, the amount time required for a checkpoint operation increases with the number of dirty pages that the operation must write. By default, to minimize the performance impact on other applications, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] adjusts the frequency of writes that a checkpoint operation performs. Decreasing the write frequency increases the time the checkpoint operation requires to complete. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] uses this strategy for a manual checkpoint unless a *checkpoint_duration* value is specified in the CHECKPOINT command. |
62 | | - |
63 | | - The performance impact of using *checkpoint_duration* depends on the number of dirty pages, the activity on the system, and the actual duration specified. For example, if the checkpoint would normally complete in 120 seconds, specifying a *checkpoint_duration* of 45 seconds causes [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to devote more resources to the checkpoint than would be assigned by default. In contrast, specifying a *checkpoint_duration* of 180 seconds would cause [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to assign fewer resources than would be assigned by default. In general, a short *checkpoint_duration* will increase the resources devoted to the checkpoint, while a long *checkpoint_duration* will reduce the resources devoted to the checkpoint. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] always completes a checkpoint if possible, and the CHECKPOINT statement returns immediately when a checkpoint completes. Therefore, in some cases, a checkpoint may complete sooner than the specified duration or may run longer than the specified duration. |
64 | | - |
65 | | -## <a name="Security"></a> Security |
66 | | - |
67 | | -### Permissions |
68 | | - CHECKPOINT permissions default to members of the **sysadmin** fixed server role and the **db_owner** and **db_backupoperator** fixed database roles, and are not transferable. |
69 | | - |
70 | | -## See Also |
71 | | - [ALTER DATABASE (Transact-SQL)](../../t-sql/statements/alter-database-transact-sql.md) |
72 | | - [Database Checkpoints (SQL Server)](../../relational-databases/logs/database-checkpoints-sql-server.md) |
73 | | - [Configure the recovery interval Server Configuration Option](../../database-engine/configure-windows/configure-the-recovery-interval-server-configuration-option.md) |
74 | | - [SHUTDOWN (Transact-SQL)](../../t-sql/language-elements/shutdown-transact-sql.md) |
75 | | - |
76 | | - |
| 38 | + Generates a manual checkpoint in the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] database to which you are currently connected. |
| 39 | + |
| 40 | +> [!NOTE] |
| 41 | +> For information about different types of database checkpoints and checkpoint operation in general, see [Database Checkpoints (SQL Server)](../../relational-databases/logs/database-checkpoints-sql-server.md). |
| 42 | + |
| 43 | +  [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) |
| 44 | + |
| 45 | +## Syntax |
| 46 | + |
| 47 | +``` |
| 48 | + |
| 49 | +CHECKPOINT [ checkpoint_duration ] |
| 50 | +``` |
| 51 | + |
| 52 | +## Arguments |
| 53 | + *checkpoint_duration* |
| 54 | + Specifies the requested amount of time, in seconds, for the manual checkpoint to complete. When *checkpoint_duration* is specified, the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] attempts to perform the checkpoint within the requested duration. The *checkpoint_duration* must be an expression of type **int** and must be greater than zero. When this parameter is omitted, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] adjusts the checkpoint duration to minimize the performance impact on database applications. *checkpoint_duration* is an advanced option. |
| 55 | + |
| 56 | +## Factors Affecting the Duration of Checkpoint Operations |
| 57 | + In general, the amount time required for a checkpoint operation increases with the number of dirty pages that the operation must write. By default, to minimize the performance impact on other applications, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] adjusts the frequency of writes that a checkpoint operation performs. Decreasing the write frequency increases the time the checkpoint operation requires to complete. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] uses this strategy for a manual checkpoint unless a *checkpoint_duration* value is specified in the CHECKPOINT command. |
| 58 | + |
| 59 | + The performance impact of using *checkpoint_duration* depends on the number of dirty pages, the activity on the system, and the actual duration specified. For example, if the checkpoint would normally complete in 120 seconds, specifying a *checkpoint_duration* of 45 seconds causes [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to devote more resources to the checkpoint than would be assigned by default. In contrast, specifying a *checkpoint_duration* of 180 seconds would cause [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to assign fewer resources than would be assigned by default. In general, a short *checkpoint_duration* will increase the resources devoted to the checkpoint, while a long *checkpoint_duration* will reduce the resources devoted to the checkpoint. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] always completes a checkpoint if possible, and the CHECKPOINT statement returns immediately when a checkpoint completes. Therefore, in some cases, a checkpoint may complete sooner than the specified duration or may run longer than the specified duration. |
| 60 | + |
| 61 | +## <a name="Security"></a> Security |
| 62 | + |
| 63 | +### Permissions |
| 64 | + CHECKPOINT permissions default to members of the **sysadmin** fixed server role and the **db_owner** and **db_backupoperator** fixed database roles, and are not transferable. |
| 65 | + |
| 66 | +## See Also |
| 67 | + [ALTER DATABASE (Transact-SQL)](../../t-sql/statements/alter-database-transact-sql.md) |
| 68 | + [Database Checkpoints (SQL Server)](../../relational-databases/logs/database-checkpoints-sql-server.md) |
| 69 | + [Configure the recovery interval Server Configuration Option](../../database-engine/configure-windows/configure-the-recovery-interval-server-configuration-option.md) |
| 70 | + [SHUTDOWN (Transact-SQL)](../../t-sql/language-elements/shutdown-transact-sql.md) |
| 71 | + |
| 72 | + |
0 commit comments