Tuesday, March 27, 2012

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.Do you have ajob set up for the DTS package?|||I have the DTS save under local PAckages, but I don't know how to
create a job for it.|||From EM right click the package, select 'schedule package'|||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.|||Thank you all for helping. I'll try that.

Thanks again|||No problem. Let me know if you run into a snag.

No comments:

Post a Comment