Solved

[SQLSTATE 42000] (Error 8630)."

Posted on 2010-09-08
7
2,063 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
  • 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now