Disables change data capture for the current database. Change data capture is not available in every edition of MicrosoftSQL Server. For a list of features that are supported by the editions of SQL Server, see Features Supported by the Editions of SQL Server 2016.
|Applies to: SQL Server (SQL Server 2008 through current version).|
0 (success) or 1 (failure)
sys.sp_cdc_disable_db disables change data capture for all tables in the database currently enabled. All system objects related to change data capture, such as change tables, jobs, stored procedures and functions, are dropped. The is_cdc_enabled column for the database entry in the sys.databases catalog view is set to 0.
Requires membership in the sysadmin fixed server role.
The following example disables change data capture for the
USE AdventureWorks2012; GO EXECUTE sys.sp_cdc_disable_db; GO