Unable to Create Trigger on CDC Tables

  • Hi All,

    I'm trying to create an insert trigger on the CDC table which will load the data from the CDC table in to my centralized audit table...when I enable the Trigger that does that..it is neither inserting the records in to CDC table nor in to my Audit table..I'm struggling with this from past two days...any suggestions on it is appreciated..

    Thanks,

    Pavan Posani

  • What kind of trigger, AFTER or INSTEAD OF? Without seeing the trigger code and your table definitions it is difficult to say much. Also, are you receiving any error or warning messages when inserting into the table?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Hi

    What is mean by CDC table???:crying:

    Ali
    MCTS SQL Server2k8

  • I am taking CDC to mean Change Data Capture.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Ali Tailor (4/20/2011)


    Hi

    What is mean by CDC table???:crying:

    CDC is change data capture which a feature which was added in SQL 2008

    Change data capture is designed to capture insert, update, and delete activity applied to SQL Server tables, and to make the details of the changes available in an easily consumed relational format. The change tables used by change data capture contain columns that mirror the column structure of a tracked source table, along with the metadata needed to understand the changes that have occurred.

    Wondering you are MCTS sqlserver2008 not knowing what CDC is.

    Cdc is quite cool feature of sql 2008.

    Here he has asked as

    pkposani (4/19/2011) it is neither inserting the records in to CDC table nor in to my Audit table

    which means he was not able to apply trigger to the table where cdc is enabled.Why you need to apply trigger to the table.Change data capture provides information about DML changes on a table and a database. By using change data capture, you eliminate expensive techniques such as user triggers, timestamp columns, and join queries..Have help file for your reference.

    Thanks
    Parthi

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply