I want to schedule a Jobs Step to run a DTS. I am wornking in Visual Basic 6.0. The DTS is generate from my applications, but I need to schedule it, could you help me please.
I cannot tell you how to schedule from VB6, but I would advise that you request your DBA to schedule any jobs, as he/she would need to ensure all permissions, and the DTS package integrity are correct.
Above all else, it's courtesy for the DBA to OK all jobs running on their server.
The application generates a DTS, so I need to be able to schedule the step from it. Actually , the end user is who choose tha date and time to execute...
I'm sorry, I can't fully answer your question, except that scheduling DTS packages to run are under the auspices of the SQL Server Agent. I'm not sure if you have access to that agent, if you do, then that would be the way to go.
You must run "dtsrun" command prompt utility on the server.
In order to schedule a job you must have access to msdb database and be able to run sp_add_job, and sp_add_jobstep and sp_add_jobschedule. Take a look at these stored procedures in SQL Server Books Online.
You will need to schedule a job that will run a command prompt script(@subsystem ='CMDEXEC').
Talk to your DBA first. I am sure they can be of much help.
dky1e's reply clicked something in the back of my mind.
If you can create the DTS package locally, then you should have the dtsrun utility loaded locally as well.
If so, then you can run the DTS package using the dtsutility from a command line.
Therefore, taking that a step further, you can create a batch file to kick off the dtsutility and then use the widnows scheduler to run the batch file.
All this is theory, I have not even attempted the latter two stages, but, as they say, theory can work.
It sounds as if you are dynamically building your DTS in your VB app each time it is run as opposed to creating it one time in Enterprise Mgr, saving it, and scheduling it.
If this is the case, you can use windows scheduler to kick off your VB app. If the user doesn't access the scheduler directly, you could schedule it from an app using some winapi calls.
If you use Norton Anti-Virus, you will find that when you schedule scans and definition updates, it creates an entry in your windows scheduler in much the same way.
I have checked sp_add_jobstep stored procedure, my question is: that store procedure has a parameter called
@command ,the command(s) to be executed by SQLServerAgent .
I don't know how to poblate this parameter in order to add a step that executes a DTS, when a Schedule a DTS and look in the sysjobsJob that executes a DTS do you follow me?? Sorry for my english.
when a query the sysjobsteps, the field command has the following value for a dts job schedule:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.