arst06d
Programmer
- Nov 29, 2002
- 324
Hi
I have a DTS package that runs every night. It connects to the AS400 via ODBC and sucks data into SQL Server. I need it to wait until the overnight processes on the 400 have finished before doing its work, and can determine this by querying a table on the 400 where a completion flag is set.
So - How do you code a wait loop in DTS (using SQL 2000):
- wait for 1am say
- Test for completion flag on 400
- If set, continue
- If not set, wait another 15 mins
Up til now I've been using an ExecuteSQL task which issues a WAITFOR command for 6am when I'm pretty sure the overnight processes have finished. But the execution time is starting to creep over 9am which is not acceptable.
Thanks in advance.
I have a DTS package that runs every night. It connects to the AS400 via ODBC and sucks data into SQL Server. I need it to wait until the overnight processes on the 400 have finished before doing its work, and can determine this by querying a table on the 400 where a completion flag is set.
So - How do you code a wait loop in DTS (using SQL 2000):
- wait for 1am say
- Test for completion flag on 400
- If set, continue
- If not set, wait another 15 mins
Up til now I've been using an ExecuteSQL task which issues a WAITFOR command for 6am when I'm pretty sure the overnight processes have finished. But the execution time is starting to creep over 9am which is not acceptable.
Thanks in advance.