DTS error: Its not truncating tables befoe insterting

  • I have a simple dts package that has two connections. See diagram below:

    SQLTask(Truncate dest table)---on success-->

    Source----Transform Task-->Destination

    The problem is when I run this it gives me unique index key violiation. Somehow the truncate is not happening, so the data populating fails. If I manually truncate the table before executing the package it succedes.

    Specifics: A transform task is used to pull a single table's data from the source connection (Progress db table) to a destination (SQL Server table). Before starting it, I added a SQL Task that truncates the destination table. The work flow is set so that the truncate must succeed before the transform data tasks begins.

    Any suggestions would be appreciated. Thanks!

     


    smv929

  • I hate to sound patronising, but somehow your truncate table is not working.

    Check the connection to make sure you are truncating the table from the right database. Try running the truncate task only from the dts package and see what happens.


    ------------------------------
    The Users are always right - when I'm not wrong!

  • I found the problem. It was running a version I had saved before adding the truncate table sql task. I'm not sure why. I had the package open and would File/Save it. Then I would switch to cmd line and execute. For whatever reason it would grab the version before. The save didn't take effect. I later closed and reopened the package and noticed it was not afterall saved. Anyway. Thanks. 


    smv929

  • Glad to hear it works.


    ------------------------------
    The Users are always right - when I'm not wrong!

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

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