Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-04-13 : 07:21:23
|
| Anirudha writes "Hi,I would like to know if its possible to invoke a SQL Server agent job from command prompt and/or Stored procedure/query. Also is it possible to pass parameters to a Job or Define a set og Global Variable for various steps ina job.Thanks,Anirudha" |
|
|
jason
Posting Yak Master
164 Posts |
Posted - 2005-04-13 : 10:54:07
|
| I don't know what your job does, but it makes more sense to me to incorporate the task into the stored procedure. However, you can use sp_start_job to start the job and use the isql.exe to run it from the command line.You could use sp_add_step & sp_update_jobstep to create/recreate the step and pass the value at that time. Again, if you incorporate the job task into your stored procedure, you won't have to worry about that. |
 |
|
|
|
|
|