Showing posts with label dts. Show all posts
Showing posts with label dts. Show all posts

Thursday, March 29, 2012

Holiday schedule for scheduled DTS Packages

I have scheduled DTS packages that I don't want to run on company
holidays. What's an easy way to do this? I have the holidays listed in
a table, but am unsure how to make the DTS fail if the current day is
in that table. Thanks!MartyNg,
You can start with an execute sql task to pull the closes holiday and put
the result into a global variable, then use an activeX task to compare that
global variable and if it is equal to today's date, then exit main function
with DTSTaskExecResult_Failure.
AMB
"MartyNg" wrote:

> I have scheduled DTS packages that I don't want to run on company
> holidays. What's an easy way to do this? I have the holidays listed in
> a table, but am unsure how to make the DTS fail if the current day is
> in that table. Thanks!
>

Ho to Execute a Scheduled Job from VB6

Hi ,
I have an schedueled job which runs a DTS .
This job is executing everyday at 2:00 Pm and it transfers data from oracle to the SQl server.
In some cases data in Oracle is not ready at 2:00 , sometimes it is ready at 11:00 AM so what I need is to run that Scheduled job from an exe file .
I can write a code to run the DTS jobs but the problem in this case is I will lose the History Information I have with my schedueled job.So I need to run The Scheduled job to kep the history .
I researched the Internet and all I get is how to create a job but I dont have a clue how to run it .
I'm using Visual basic 6 .
Thanx .Have you looked at...

sp_add_jobschedule|||Thanx for you reply
sp_add_jobs is creating a new job. I dont wan to creat e a new job because the reason for this application is simply keeping track of this Job's history. Otherwise I could run the DTS itself .|||OK, lets try again...

Have you looked at...

sp_add_jobschedule|||I can use sp_update_jobschedule and change the data parameters of job and let it run .
But can't I really run a Job from visual basic ?|||OK...look at

EXECUTE msdb..sp_start_job|||PERFECT !
Thanx .