Skip to content

Latest commit

 

History

History
73 lines (56 loc) · 2.74 KB

sys-sp-cdc-help-jobs-transact-sql.md

File metadata and controls

73 lines (56 loc) · 2.74 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sys.sp_cdc_help_jobs (Transact-SQL)
Reports information about all change data capture cleanup or capture jobs in the current database.
markingmyname
maghan
randolphwest
08/22/2024
sql
system-objects
reference
sp_cdc_help_jobs
sys.sp_cdc_help_jobs_TSQL
sp_cdc_help_jobs_TSQL
sys.sp_cdc_help_jobs
sp_cdc_help_jobs
TSQL

sys.sp_cdc_help_jobs (Transact-SQL)

[!INCLUDE SQL Server]

Reports information about all change data capture cleanup or capture jobs in the current database.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sys.sp_cdc_help_jobs
[ ; ]

Return code values

0 (success) or 1 (failure).

Result set

Column name Data type Description
job_id uniqueidentifier The ID of the job.
job_type nvarchar(20) The type of job.
job_name sysname The name of the job.
maxtrans int The maximum number of transactions to process in each scan cycle.

maxtrans is valid only for capture jobs.
maxscans int The maximum number of scan cycles to execute in order to extract all rows from the log.

maxscans is valid only for capture jobs.
continuous bit A flag indicating whether the capture job is to run continuously (1), or run in one-time mode (0). For more information, see sys.sp_cdc_add_job.

continuous is valid only for capture jobs.
pollinginterval bigint The number of seconds between log scan cycles.

pollinginterval is valid only for capture jobs.
retention bigint The number of minutes that change rows are to be retained in change tables.

retention is valid only for cleanup jobs.
threshold bigint The maximum number of delete entries that can be deleted using a single statement on cleanup.

Permissions

Requires membership in the db_owner fixed database role.

Examples

The following example returns information about the defined capture and cleanup jobs for the [!INCLUDE sssampledbobject-md] database.

USE AdventureWorks2022;
GO

EXEC sys.sp_cdc_help_jobs;
GO

Related content