Run part of DTS conditionally | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Run part of DTS conditionally

Env: SQL-Server 2000 on Windows 2000 I have a DTS package that imports 3 text files into 3 tables. I need one of the text files to import once a week, i.e. Mondays. One way is to have 2 DTS packages: one import 2 of text files and the other imports 1 text file. And in the calling stored procedure, I check the day and call or not the DTS. Is there a way that I check for day within the DTS and run or not the part related to that text file? Thanks, Farhad R
[email protected]
Farhad, I do it using SQL DMO (VBScript+ COM+). But it so easy leave this task to SQL Agent, that I prefer use it. We have a Server Monitor that send me a alert when one SQL Server job failed, in my cell phone. Everything self producing. Everything in VBScript + COM+. Would you like know this tool?
Instead create 3 packages and schedule them seperately, depending upon the execution result of Job1 call Job2 and so on. HTH Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
quote:Originally posted by johnny_bigu Farhad, I do it using SQL DMO (VBScript+ COM+). But it so easy leave this task to SQL Agent, that I prefer use it. We have a Server Monitor that send me a alert when one SQL Server job failed, in my cell phone. Everything self producing. Everything in VBScript + COM+. Would you like know this tool?

Yes, I would like to know more about it? Is it a third party product? Farhad R
[email protected]
Our situation is that an application calls a stored procedure and that sp calls the DTS package. So, it is not possible to schadule the job. The question is how I can run or don’t run the part of DTS package using VBScript. Thanks,
quote:Originally posted by satya Instead create 3 packages and schedule them seperately, depending upon the execution result of Job1 call Job2 and so on. HTH Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Farhad R
[email protected]
If you just want to run or not run certain steps in the package use this example oPkg.Steps("DTSStep_DTSBulkInserttask_1").DisableStep = False ‘Enable first text import
oPkg.Steps("DTSStep_DTSBulkInsertTask_3").DisableStep = True ‘ Disable second text import
]]>