Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Checking for Job Status

Author  Topic 

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-08-10 : 23:24:08
Hi,

I just created a vb6.0 exe file with only a module and a class file.

If I run this on a command prompt, the exe stops automatically after completion but if I run it in a job, the job just continues executing.

I know it has completed the task but why doesn't the job stop?

Is there a way to determine if a job has stopped or check its status via tsql (i mean performing a lookup in a system table)?

Thanks in advance....

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-08-10 : 23:48:49
EXEC msdb.dbo.sp_get_composite_job_info

gives you the status of jobs. Does the .exe have any prompts in it? That's one of the problems of running things through xp_cmdshell. It's not interactive. Also, if it gets stuck it doesn't have any error handling. It's just stuck.


MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-08-11 : 02:35:12
Hi Derrick,

Thanks for the info. I did not use prompts, instead I created a log file (txt file) and I already resolved this, just issued an 'end' command . I can't seem to find the problem.
Go to Top of Page
   

- Advertisement -