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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-01-25 : 08:24:45
|
| Rodney writes "I wrote a Stored Procedure to pull data from a unidata database and insert into a SQL server table. I created a job to run the stored procedure every 15 minutes. This will run find for weeks at a time but every now and then it justs hangs, it doesn't fail. If I do not watch it can hang forever. I have to manually stop the job and then it will start on its own at the scheduled time and run again for days at a time. What I have been looking for is some sort of time out for the job, the job take about 2 minutes to run and if it ran over 10 minutes I would like to be notify. Is there any way to do that.The code that locks the job up is below.set @Date = cast((datename(year,getdate())+'-'+ datename(month,getdate())+'-'+ datename(day,(getdate()-1)))as varChar(30))set @SQL = 'DECLARE csrCall CURSOR FOR SELECT * FROM OPENQUERY(Condor800Calls, ''SELECT * FROM PLATTFORM_CALLS_NF_SUB where F23 >= { d ''''' + @Date + ''''' }'')'Windows 2000SQL Server 2000" |
|
|
|
|
|