Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Technical Reference
 sys.sp_cdc_disable_table (Transact-...
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_table (Transact-SQL)

Disables change data capture for the specified source table and capture instance in 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_table 
  [ @source_schema = ] 'source_schema' , 
  [ @source_name = ] 'source_name'
  [ , [ @capture_instance = ] 'capture_instance' | 'all' ]
[ @source_schema = ] 'source_schema'

Is the name of the schema in which the source table is contained. source_schema is sysname, with no default, and cannot be NULL.

source_schema must exist in the current database.

[ @source_name = ] 'source_name'

Is the name of the source table from which change data capture is to be disabled. source_name is sysname, with no default, and cannot be NULL.

source_name must exist in the current database.

[ @capture_instance = ] 'capture_instance' | 'all'

Is the name of the capture instance to disable for the specified source table. capture_instance is sysname and cannot be NULL.

When 'all' is specified, all capture instances defined for source_name are disabled.

0 (success) or 1 (failure)

None

sys.sp_cdc_disable_table drops the change data capture change table and system functions associated with the specified source table and capture instance. It deletes any rows associated with the specified capture instance from the change data capture system tables and sets the is_tracked_by_cdc column for the table entry in the sys.tables catalog view to 0.

Requires membership in the db_owner fixed database role.

The following example disables change data capture for the HumanResources.Employee table.

USE AdventureWorks;
GO
EXECUTE sys.sp_cdc_disable_table 
    @source_schema = N'HumanResources', 
    @source_name = N'Employee',
    @capture_instance = N'HumanResources_Employee';
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