sys.sp_cdc_help_jobs (Transact-SQL)


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

Applies to: SQL Server (SQL Server 2008 through current version).

Topic link icon Transact-SQL Syntax Conventions


0 (success) or 1 (failure)

Column nameData typeDescription
job_iduniqueidentifierThe ID of the job.
job_typenvarchar(20)The type of job.
maxtransintThe maximum number of transactions to process in each scan cycle.

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

 maxscans is valid only for capture jobs.
continuousbitA 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 (Transact-SQL).

 continuous is valid only for capture jobs.
pollingintervalbigintThe number of seconds between log scan cycles.

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

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

Requires membership in the db_owner fixed database role.

The following example returns information about the defined capture and cleanup jobs for the AdventureWorks2012 database.

USE AdventureWorks2012;  
EXEC sys.sp_cdc_help_jobs;  

dbo.cdc_jobs (Transact-SQL)
sys.sp_cdc_add_job (Transact-SQL)

Community Additions