Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Technical Reference
 sys.sp_cdc_disable_db (Transact-SQL...
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
SQL Server 2008 Books Online (October 2009)
sys.sp_cdc_disable_db (Transact-SQL)

Disables change data capture for the current database. Change data capture is available only in SQL Server 2008 Enterprise, Developer, and Evaluation editions.

Topic link icon Transact-SQL Syntax Conventions

sys.sp_cdc_disable_db

0 (success) or 1 (failure)

None

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.

Bb522508.note(en-us,SQL.100).gifNote:
If there are many capture instances defined for the database at the time change data capture is disabled, a long running transaction can cause the execution of sys.sp_cdc_disable_db to fail. This problem can be avoided by disabling the individual capture instances by using sys.sp_cdc_disable_table before running sys.sp_cdc_disable_db.

Requires membership in the sysadmin fixed server role.

The following example disables change data capture for the AdventureWorks database.

USE AdventureWorks;
GO
EXECUTE sys.sp_cdc_disable_db;
GO
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker