Solved

[SQLSTATE 42000] (Error 8630)."

Posted on 2010-09-08
7
2,068 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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server can be started but not accessed 1 26
Sql user function 7 31
How to SQL Trace a SPECIFIC query 24 57
MS SQLK Server multi-part identifier cannot be bound 5 25
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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: …
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

929 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

12 Experts available now in Live!

Get 1:1 Help Now