Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Posts
    52

    Question Unanswered: DTS question??????????????????

    Hi,

    I use DTS import/export to import data from DB2 into SQL 2000 tables.
    It works find. However , I want to truncate the tables first before the
    copy.

    What is the best way to do this?


    Thank you for all your suggestions.

  2. #2
    Join Date
    Jan 2004
    Posts
    164
    Do you have ajob set up for the DTS package?

  3. #3
    Join Date
    Feb 2004
    Posts
    52
    I have the DTS save under local PAckages, but I don't know how to
    create a job for it.

  4. #4
    Join Date
    Feb 2004
    Posts
    492
    From EM right click the package, select 'schedule package'

  5. #5
    Join Date
    Jan 2004
    Posts
    164
    once you schedule the package, go to managment -> Jobs. Find the Job that you just created for the DTS. Right click on the job and go to the steps tab. There will be a step already in there for the data that you are transfering. Click on the insert button to insert a new step. A new step box will apear for you to enter info in. Name the step whatever you want. Fot Type, make sure its t-sql script. Make sure you select the right database. In the command text box type truncate table (and the name of the table yo want to clear). Click Apply. THen you will be back in steps tab. There are some arrows to rearrange the steps. Make sure that the truncate step is first. There is also a drop down box to where you select which step goes first.

    Hope this helps.

  6. #6
    Join Date
    Feb 2004
    Posts
    52
    Thank you all for helping. I'll try that.

    Thanks again

  7. #7
    Join Date
    Jan 2004
    Posts
    164
    No problem. Let me know if you run into a snag.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •