Returns the change data capture configuration for each table enabled for change data capture in the current database. Up to two rows can be returned for each source table, one row for each capture instance. Change data capture is available only in SQL Server 2008 Enterprise, Developer, and Evaluation editions.
Name of the source table schema.
Name of the source table.
Name of the capture instance.
ID of the change table associated with the source table.
ID of the source table.
Log sequence number (LSN) representing the low endpoint for querying the change table.
NULL = the low endpoint has not been established.
LSN representing the high endpoint for querying the change table. In SQL Server 2008, this column is always NULL.
Net change support is enabled.
Not used in SQL Server 2008.
Name of the database role used to control access to the change data.
NULL = a role is not used.
Name of the index used to uniquely identify rows in the source table.
Name of the filegroup in which the change table resides.
NULL = change table is in the default filegroup of the database.
Date that the capture instance was enabled.
List of index columns used to uniquely identify rows in the source table.
List of captured source columns.
When both source_schema and source_name default to NULL, or are explicitly set the NULL, this stored procedure returns information for all of the database capture instances that the caller has SELECT access to. When source_schema and source_name are non-NULL, only information on the specific named enabled table is returned.
When source_schema and source_name are NULL, the caller's authorization determines which enabled tables are included in the result set. Callers must have SELECT permission on all of the captured columns of the capture instance and also membership in any defined gating roles for the table information to be included. Members of the db_owner database role can view information about all defined capture instances. When information for a specific enabled table is requested, the same SELECT and membership criteria are applied for the named table.
A. Returning change data capture configuration information for a specified table
The following example returns the change data capture configuration for the HumanResources.Employee table.
USE AdventureWorks2008R2; GO EXECUTE sys.sp_cdc_help_change_data_capture @source_schema = N'HumanResources', @source_name = N'Employee'; GO
B. Returning change data capture configuration information for all tables
The following example returns configuration information for all enabled tables in the database that contain change data that the caller is authorized to access.
USE AdventureWorks2008R2; GO EXECUTE sys.sp_cdc_help_change_data_capture; GO