Solved

[SQLSTATE 42000] (Error 8630)."

Posted on 2010-09-08
7
2,123 Views
Last Modified: 2012-05-10
Hi all -

I am running (hypothetically) a stored procedure. When I run it out of the query window in ssms it runs just fine. When I put it into a job and execute it, it will run for a while and then I get :

Internal Query Processor Error: The query processor encountered an unexpected error during execution. [SQLSTATE 42000] (Error 8630).

SQL version is Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)   Mar 29 2009 10:11:52   Copyright (c) 1988-2008 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )

I've ran dbcc and everything checks out ok. I can execute other jobs just fine on the server and they run successfully. Help?
0
Comment
Question by:rmm2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 29

Expert Comment

by:QPR
ID: 33632830
does the Sp call any other objects during execution (functions, views, other stored procedures)?
If so, does the acount running the job have the necessary permissions to access these objects?
Does the job write to the file system or access a linked server?
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 33632845
Check whether you have a SELECT INTO statement in your procedure:

http://support.microsoft.com/kb/323586

Are you sure that you have applied SP1 for SQL Server 2008, if not then apply SP1 and try.

Also try checking ways to tune your procedure to get rid of SELECT INTO logic or any other complex statements.
0
 
LVL 7

Author Comment

by:rmm2001
ID: 33632860
the main sp calls a sub sp. and it works fine for a while and then just dies so it definitely has the permissions that it needs. and no on the linked server/file system object
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 7

Author Comment

by:rmm2001
ID: 33632879
No select into's. Just insert into's. And yes on the SP1. This is what it gives me :  Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)   Mar 29 2009 10:11:52   Copyright (c) 1988-2008 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 33634021
>> the main sp calls a sub sp. and it works fine for a while and then just dies so it definitely has the permissions that it needs

Does the execution of main SP works successfully when executed in SSMS.
Kindly let me know how much time it takes for the main SP to execute successfully.

If it takes more time, then we need to think of tuning the procedure.
0
 
LVL 7

Accepted Solution

by:
rmm2001 earned 0 total points
ID: 33684754
Sorry for the long delay. I've been trying various things. The procedure which this was happening on runs for 23-24 hours. And that's just how long it has to take. It handles a lot of data and we've tuned the best we can there. What ended up happening is that we started to process things in 10k chunks (not 5k because that produced the same error). So it's up and running now - I just don't know the explanation behind it all.

I want to thank you all for your input!
0
 
LVL 7

Author Closing Comment

by:rmm2001
ID: 33684798
Sorry for the long delay. I've been trying various things. The procedure which this was happening on runs for 23-24 hours. And that's just how long it has to take. It handles a lot of data and we've tuned the best we can there. What ended up happening is that we started to process things in 10k chunks (not 5k because that produced the same error). So it's up and running now - I just don't know the explanation behind it all.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question