Microsoft KB Archive/323586

= PRB: A SELECT INTO Query May Return the Internal Query Processor Error 8630 =

Article ID: 323586

Article Last Modified on 10/16/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q323586



SYMPTOMS
A SELECT INTO query may return the following error message

Msg 8630, Level 16, State 77, Line XX Internal Query Processor Error: The query processor encountered an unexpected error during execution.

when all of the following conditions are true:
 * You run the same SELECT INTO query twice and separately.
 * In between the two executions, you perform an operation that causes SQL Server to recompile the second SELECT INTO query.



WORKAROUND
To work around this problem, add the option KEEP PLAN after the second SELECT INTO statement, or change the current database to the target database before you run SELECT INTO statements.

For example, you can add the KEEP PLAN option, or specify the target database before you run the SELECT INTO statement:

Example:

Instead of using the following: select * into test2..t2 from test1..t1 Change it to either of the following:

select * into test2..t2 from test1..t1 option (keep plan) -or- use test2 go select * into test2..t2 from test1..t1

Keywords: kbprb kbpending KB323586

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.