Starts a specified job.
run job job_name [wait [timeout]]
run job immediately executes the job, regardless of any existing job schedule.
run job myjob_1 go
run job myjob wait go
The returned result is:
SUBMIT TIME FINISH TIME COMPARISONS READ (S) DIFFS M O I R ERRORS ------------------- ------------------- ----------- -------- ----- - - - - ------ 2013-06-27 10:20:51 2013-06-27 10:26:59 1 10000 0 0 0 0 0 0 (0 rows affected)
In this example, you regain control of the isql prompt after 6 seconds approximately (the difference between the Submit Time and the Finish Time).
run job myjob wait 10 go
SUBMIT TIME FINISH TIME COMPARISONS READ (S) DIFFS M O I R ERRORS ------------------- ------------------- ----------- -------- ----- - - - - ------ 2013-06-27 10:31:52 2013-06-27 10:38:02 1 10000 0 0 0 0 0 0 (0 rows affected)
In this example, you regain control of the isql prompt after 6 seconds approximately (the difference between the Submit Time and the Finish Time).
run job myjob wait 5 go
COMPARISON PART STATUS SUBMIT TIME END TIME RUN PROGRESS NEXT RETRY ERROR ---------- ---- ------- ------------------- -------- --- -------- ---------- ----- mycmp 0 RUNNING 2013-06-27 10:49:54 1 89% [#103] Waited 5 seconds, the job is still running. (0 rows affected)
In this example, you regain control of the isql prompt after 5 seconds and the output shows the current 'running' state of the job.