Solved

[SQLSTATE 42000] (Error 8630)."

Posted on 2010-09-08
7
2,086 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 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