Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to put a SQL Agent Job wait in the trigger while the job is running.

$
0
0

Hello!

I am not a geek in writing t-sql code so I am seeking forum help in completion of my task.

I have a trigger which fires upon a action and with in that code, I am starting a job via t-sql like

EXEC msdb.dbo.sp_start_job N'JobName';

Now, I want to check the condition like that, If the trigger got invoked while the job is running, it should wait till the successfully completion of the job.

Thanks for your time and help on this.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>