Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1242
  • Last Modified:

sql job timeout

We had have a job that executes a stored proc that has been working fine
(the stored proc executes a query that involves a table on a linked server)

The job started failing saying there was a schema change

I was out of the office and a colleague said he redid the linked server connection (not sure why) which got rid of that error but now there is a time out error


What is strange is that if the stored proc executed by job  is manually executed it runs fine but when scheduled in the job it times out.  Not sure what the difference would be
0
johnnyg123
Asked:
johnnyg123
  • 2
  • 2
1 Solution
 
SStoryCommented:
My initial thought is that in a query browser there is no timeout, but _PERHAPS_ scheduled jobs make a connection to the server like vb apps do with a timeout in the connection string or something.
0
 
Kevin CrossChief Technology OfficerCommented:
Check permissions.  Maybe the user the job runs as does not have the same permissions on the newly created linked server.  i.e., make sure the new setup matches what you had before.
0
 
SStoryCommented:
Oh, here we go:
Shutdown time-out interval (in seconds)

    Specifies the number of seconds that SQL Server Agent waits for jobs to complete before shutting down. If the job is still running after the interval specified, SQL Server Agent forcefully stops the job.

source: http://msdn.microsoft.com/en-us/library/ms189727.aspx
0
 
johnnyg123Author Commented:
After much research I figured it out

Long story short ...the issue occurred because of the change in linked server

I was getting a sql infinite compile message

Solution was to install service pack 2 for sql server 2008 r2 and problem went away
0
 
johnnyg123Author Commented:
None of the posted solutions was the correct answer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now