title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sys.sp_cdc_drop_job (Transact-SQL) |
Removes a change data capture cleanup or capture job for the current database from msdb. |
markingmyname |
maghan |
randolphwest |
08/21/2024 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
Removes a change data capture cleanup or capture job for the current database from msdb
.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sys.sp_cdc_drop_job [ [ @job_type = ] N'job_type' ]
[ ; ]
Type of job to remove. job_type is nvarchar(20) and can't be NULL
. Valid inputs are capture
and cleanup
.
0
(success) or 1
(failure).
None.
sp_cdc_drop_job
is called internally by sys.sp_cdc_disable_db.
Requires membership in the db_owner fixed database role.
The following example removes the cleanup job for the [!INCLUDE sssampledbobject-md] database.
USE AdventureWorks2022;
GO
EXEC sys.sp_cdc_drop_job @job_type = N'cleanup';