ssis - How long does it take for SSISDB to record package execution status? -
i running series of ssis packages using dtexec in powershell. packages reside in ssisdb.
i have no trouble running package, running problems determining actual result status once package has completed. when package run ssisdb, dtexec appears return 0 return code when package fails (e.g. file not found during task validation).
i have tried query ssisdb (catalog.executions) check status once dtexec has completed (or think has completed). can status 2 ("running"). occurs when add 5-10 second wait.
i suspect code using run dtexec may culprit. function using:
function run_pkg ($dtexecargs) { $rc = -1 # run dtexec $pinfo = new-object system.diagnostics.processstartinfo $pinfo.filename = "c:\program files\microsoft sql server\110\dts\binn\dtexec.exe" write-host "starting... " $dtexecargs # next few lines required make sure process waits # package execution finish $pinfo.redirectstandardoutput = $true $pinfo.useshellexecute = $false $pinfo.arguments = $dtexecargs $p = new-object system.diagnostics.process $p.startinfo = $pinfo $p.start() | out-null $output = $p.standardoutput.readtoend() $p.waitforexit() $rc = $p.exitcode # dtexec finished return $rc }
the argument function looks like:
/isserver \ssisdb\ipts-dw\etl\etl_systype_t_pkg.dtsx /server localhost
i think waitforexit() should cause script wait until dtexec completes.
any ideas? dtexec throw work on fence ics , exit? doing wrong?
thanks
try passing synchronized flag dtexec
/par "$serveroption::synchronized(boolean)";true
Comments
Post a Comment