Skip to main content
cdc.ddl_history (Transact-SQL)

Updated: June 10, 2016

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2008) noAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

Returns one row for each data definition language (DDL) change made to tables that are enabled for change data capture. You can use this table to determine when a DDL change occurred on a source table and what the change was. Source tables that have not had DDL changes will not have entries in this table.

We recommend that you do not query the system tables directly. Instead, execute the sys.sp_cdc_get_ddl_history stored procedure.

Column nameData typeDescription
source_object_idintID of the source table to which the DDL change was applied.
object_idintID of the change table associated with a capture instance for the source table.
required_column_updatebitIndicates that the data type of a captured column was modified in the source table. This modification altered the column in the change table.
ddl_commandnvarchar(max)DDL statement applied to the source table.
ddl_lsnbinary(10)Log sequence number (LSN) associated with the commitment of the DDL modification.
ddl_timedatetimeDate and time that the DDL change was made to the source table.

sys.sp_cdc_help_change_data_capture (Transact-SQL)
cdc.fn_cdc_get_all_changes_<capture_instance> (Transact-SQL)