If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > SQL 2000 job hanging

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-20-03, 12:45
egonee egonee is offline
Registered User
 
Join Date: Feb 2003
Location: NM
Posts: 2
Exclamation SQL 2000 job hanging

My company uses SQL2000 SP2 on Windows 2000 and we're seeing intermittent hanging on specific SQL jobs. The only commonality I can identify is that they all use xp_cmdshell.

Here is an example:
A scheduled job runs a stored procedure called sp_Run_rpt. The sp_Run_rpt is below:
CREATE PROCEDURE sp_Run_rpt (@strType varchar(1) = null,
@strDBServer varchar(20) = null,
@strDBName varchar(20)) AS
/*--------------------------------------------------*/
/* Execute a report and save output in a text file. */
/*--------------------------------------------------*/
set DEADLOCK_PRIORITY Low
declare @strCommand varchar(255)
select @strCommand = 'd:\Rpt_run.bat ' + @strType + ' ' + @strDBServer + ' ' + @strDBName
EXEC master..xp_cmdshell @strCommand, no_output
RETURN 0
/*--------------------------------------------------*/
/* //end */
/*--------------------------------------------------*/
GO

This job runs every 15 minutes, and will sometimes run successfully for days before it hangs. Can anyone help?
Reply With Quote
  #2 (permalink)  
Old 02-20-03, 21:23
nigelrivett nigelrivett is offline
Registered User
 
Join Date: Oct 2001
Location: England
Posts: 426
the agent will sit there waiting for the xp_cmdshell to complete. If it doesn't complete then it will hang.
This is often because someone has put some user interaction in the called exe but can be anything wrong with it.
Reply With Quote
  #3 (permalink)  
Old 02-21-03, 06:03
flanco flanco is offline
Registered User
 
Join Date: Feb 2003
Posts: 4
Re: SQL 2000 job hanging

i had the same problem and i upgraded to sp3. It seams that the problem has been resolved.
Reply With Quote
  #4 (permalink)  
Old 02-27-03, 11:20
egonee egonee is offline
Registered User
 
Join Date: Feb 2003
Location: NM
Posts: 2
Exclamation RE: SP3

SQL 2000 SP3 or an OS SP3?

From what I've heard the SQL 2000 SP3 only fixed security issues and probably would not address this issue.

Please let me know, I'm very interested in solving this problem. When you experienced the issue, was it intermittent, like ours is?

Thanks for your help!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On