How can I keep a batch file active for the duration of a SQL DTS job?
The job runs for variable lengths of time but usually around 45 min. to an hour.
When I execute this batch job, it immediately returns a 0 for a return code and the DOS window closes.
I have other time sensitive jobs dependent on its completion.
I have a batch file calling ISQL using the command:
isql -U sa -P sa -d db_name -s server -i SQL_Exec.sql -o SQL_Exec_output.txt -n -b
The input script "SQL_Exec" is as follows:
USE msdb
DECLARE @RC int
EXEC @RC = sp_start_job @job_name = 'Test'
The SQL job "Test" kicks off a DTS utility using:
DTSRUN /S server /E /N package_name
The job runs for variable lengths of time but usually around 45 min. to an hour.
When I execute this batch job, it immediately returns a 0 for a return code and the DOS window closes.
I have other time sensitive jobs dependent on its completion.
I have a batch file calling ISQL using the command:
isql -U sa -P sa -d db_name -s server -i SQL_Exec.sql -o SQL_Exec_output.txt -n -b
The input script "SQL_Exec" is as follows:
USE msdb
DECLARE @RC int
EXEC @RC = sp_start_job @job_name = 'Test'
The SQL job "Test" kicks off a DTS utility using:
DTSRUN /S server /E /N package_name