• Wilfred van Dijk (6/11/2009)


    I didn't found any restrictions on truncate in combination with FK (in BOL).

    - Is this a known issue (bug?)

    Not a bug, a documented restriction.

    From Books online, the page titled "Truncate Table"

    Restrictions

    You cannot use TRUNCATE TABLE on tables that:

    - Are referenced by a FOREIGN KEY constraint. (You can truncate a table that has a foreign key that references itself.)

    - Participate in an indexed view.

    - Are published by using transactional replication or merge replication.

    Either drop the constraint or use Delete.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass