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

Sp to call another SP if all the latest packages ran successfully

$
0
0

Hi-

I have 3 ssis packages, If in the recent execution all the packages ran successfully then another SP has to run. I have created a audit table which keeps the package info. Below is the audit table.

pkg_name,exe_status,pkg_exe_time
pkg3,fail,2014-02-01 08:27:12.867
Pkg1,Succ,2014-02-02 09:26:47.203
pkg2,succ,2014-02-26 09:27:09.920
pkg2,fail,2014-02-27 09:41:52.457
Pkg1,Succ,2014-02-28 09:42:01.750
pkg3,Succ,2014-02-28 09:42:28.740

I have to write a stored procedure which will call another SP.

If the "pkg_exe_time" is the latest time and "exe_status" is "succ" for all the pkg_name(pkg1,pkg2,pkg3) then only it will execute another sp.

Can any one please help me to write a sp.

Regards,

Partha


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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