Microsoft KB Archive/838409

= FIX: SQL Server 2000 Service Pack 1 (SP1) and later builds may not generate an execution plan for a query, and you receive error message 8623 =

Article ID: 838409

Article Last Modified on 11/2/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Service Pack 1
 * Microsoft SQL Server 2000 Service Pack 1
 * Microsoft SQL Server 2000 Service Pack 1
 * Microsoft SQL Server 2000 Service Pack 1
 * Microsoft SQL Server 2000 Service Pack 1
 * Microsoft SQL Server 2000 Desktop Engine
 * Microsoft SQL Server 2000 Service Pack 2
 * Microsoft SQL Server 2000 Service Pack 2
 * Microsoft SQL Server 2000 Service Pack 2
 * Microsoft SQL Server 2000 Service Pack 2
 * Microsoft SQL Server 2000 Service Pack 2
 * Microsoft SQL Server 2000 Desktop Engine
 * Microsoft SQL Server 2000 Service Pack 3
 * Microsoft SQL Server 2000 Service Pack 3
 * Microsoft SQL Server 2000 Service Pack 3
 * Microsoft SQL Server 2000 Personal Edition Service Pack 3
 * Microsoft SQL Server 2000 Service Pack 3
 * Microsoft SQL Server 2000 Desktop Engine
 * Microsoft SQL Server 2000 Desktop Engine
 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Personal Edition SP3a
 * Microsoft SQL Server 2000 Enterprise Evaluation Edition
 * Microsoft SQL Server 2000 Desktop Engine
 * Microsoft SQL Server 2000 Workgroup Edition
 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Enterprise Edition 64-bit

-



Bug #: 471415 (SQL Server 8.0)



Microsoft SQL Server 2000 fixes are distributed as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2000 fix release.



SYMPTOMS
When all the following conditions are true, SQL Server 2000 Service Pack 1 (SP1) and later builds may not generate an execution plan for a query:
 * The query contains a UNION statement to concatenate the results of two queries.
 * One of the queries has hard-coded return values in the select list that are typed to match the select list of the other query by using the Convert function or the Cast function.

You receive the following error message:

Server: Msg 8623, Level 16, State 1, Line 1

Internal Query Processor Error: The query processor could not produce a query plan. Contact your primary support provider for more information.



Service pack information
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 How to obtain the latest SQL Server 2000 service pack

Hotfix information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Note A 64-bit version of this hotfix is also available.

IA-64
 Date        Time   Version            Size    File name -  28-Apr-2004  01:30  2000.80.936.0      56,832  Dbmslpcn.dll 10-Oct-2003 18:48                      1,581  Inst_repl_hotfix.sql 28-Apr-2004 01:30  2000.80.936.0     185,856  Msgprox.dll 28-Apr-2004 01:30  2000.80.936.0     150,528  Odsole70.dll 28-Apr-2004 01:30  2000.80.936.0     148,992  Osql.exe 27-Apr-2004 18:31                  1,104,848  Replmerg.sql 28-Apr-2004 01:30  2000.80.936.0     534,016  Replprov.dll 28-Apr-2004 01:30  2000.80.936.0     769,024  Replrec.dll 28-Apr-2004 01:30  2000.80.936.0     160,768  Semmap.dll 28-Apr-2004 01:30  2000.80.936.0      32,256  Sqlctr80.dll 28-Apr-2004 01:30  2000.80.936.0  13,845,504  Sqldmo.dll 28-Apr-2004 01:30                     39,936  Sqldumper.exe 28-Apr-2004 01:30  2000.80.936.0      23,040  Sqlmap70.dll 28-Apr-2004 01:30  2000.80.936.0     152,064  Sqlrepss.dll 28-Apr-2004 01:30  2000.80.936.0  24,961,024  Sqlservr.exe 28-Apr-2004 01:30                 20,941,824  Sqlservr.pdb 28-Apr-2004 01:30  2000.80.936.0     120,320  Sqlvdi.dll 28-Apr-2004 01:30  2000.80.936.0      53,760  Ssmslpcn.dll 28-Apr-2004 01:30  2000.80.936.0     254,976  Ssnetlib.dll 28-Apr-2004 01:30  2000.80.936.0      20,992  Ssnmpn70.dll 28-Apr-2004 01:30  2000.80.936.0     430,080  Svrnetcn.dll 28-Apr-2004 01:30  2000.80.936.0     185,856  Svrnetcn.exe 28-Apr-2004 01:30  2000.80.936.0     187,392  Xpweb70.dll

x86
 Date        Time   Version            Size    File name --  27-Apr-2004  18:03  2000.80.936.0     664,128  Autoplt.dll 27-Apr-2004 18:03  2000.80.936.0      78,400  Console.exe 27-Apr-2004 18:03  2000.80.936.0     315,968  Custtask.dll 27-Apr-2004 18:03  2000.80.936.0      33,340  Dbmslpcn.dll 08-Apr-2004 21:42                    786,432  Distmdl.ldf 08-Apr-2004 21:42                  2,359,296  Distmdl.mdf 10-Oct-2003 18:48                        180  Drop_repl_hotfix.sql 27-Apr-2004 18:03  2000.80.936.0   1,905,216  Dtspkg.dll 27-Apr-2004 18:03  2000.80.936.0     528,960  Dtspump.dll 27-Apr-2004 18:03  2000.80.936.0   1,557,052  Dtsui.dll 27-Apr-2004 18:03  2000.80.936.0     639,552  Dtswiz.dll 10-Oct-2003 18:48                    747,927  Instdist.sql 10-Oct-2003 18:48                      1,581  Inst_repl_hotfix.sql 27-Apr-2004 18:03  2000.80.936.0      82,492  Itwiz.exe 27-Apr-2004 18:03  2000.80.936.0      90,692  Msgprox.dll 27-Apr-2004 18:03  2000.80.936.0      62,024  Odsole70.dll 27-Apr-2004 18:04  2000.80.936.0      25,144  Opends60.dll 27-Apr-2004 18:04                     82,944  Opends60.pdb 27-Apr-2004 18:03  2000.80.936.0      57,904  Osql.exe 27-Apr-2004 18:03  2000.80.936.0     279,104  Pfutil80.dll 10-Oct-2003 18:37                    550,780  Procsyst.sql 08-Apr-2004 21:42                     12,305  Qfe469315.sql 08-Apr-2004 21:42                     19,195  Qfe469571.sql 27-Apr-2004 16:54                  1,104,848  Replmerg.sql 27-Apr-2004 18:03  2000.80.936.0     221,768  Replprov.dll 27-Apr-2004 18:03  2000.80.936.0     307,784  Replrec.dll 27-Apr-2004 17:02  2000.80.936.0     159,813  Replres.rll 10-Oct-2003 18:48                  1,087,150  Replsys.sql 10-Oct-2003 18:48                    986,603  Repltran.sql 27-Apr-2004 18:03  2000.80.936.0     287,304  Rinitcom.dll 27-Apr-2004 18:03  2000.80.936.0      66,112  Semmap.dll 27-Apr-2004 18:03  2000.80.936.0      57,916  Semnt.dll 27-Apr-2004 18:03  2000.80.936.0     492,096  Semobj.dll 27-Apr-2004 17:30  2000.80.936.0     172,032  Semobj.rll 27-Apr-2004 18:03  2000.80.936.0      53,832  Snapshot.exe 12-Mar-2004 03:10                    117,834  Sp3_serv_uni.sql 27-Apr-2004 18:02  2000.80.936.0      28,672  Sqlagent.dll 27-Apr-2004 18:03  2000.80.936.0     311,872  Sqlagent.exe 27-Apr-2004 18:02  2000.80.936.0     168,001  Sqlakw32.dll 27-Apr-2004 18:03  2000.80.936.0      33,344  Sqlctr80.dll 27-Apr-2004 18:03  2000.80.936.0   4,215,360  Sqldmo.dll 27-Apr-2004 18:03                     25,172  Sqldumper.exe 27-Apr-2004 16:52  2000.80.936.0      28,672  Sqlevn70.rll 27-Apr-2004 18:03  2000.80.936.0     180,792  Sqlmap70.dll 27-Apr-2004 18:03  2000.80.936.0     188,992  Sqlmmc.dll 27-Apr-2004 17:31  2000.80.936.0     479,232  Sqlmmc.rll 27-Apr-2004 18:03  2000.80.936.0     401,984  Sqlqry.dll 27-Apr-2004 18:03  2000.80.936.0      57,920  Sqlrepss.dll 27-Apr-2004 18:04  2000.80.936.0   7,581,777  Sqlservr.exe 27-Apr-2004 18:04                 13,050,880  Sqlservr.pdb 27-Apr-2004 18:03  2000.80.936.0     590,396  Sqlsort.dll 27-Apr-2004 18:03  2000.80.936.0      45,644  Sqlvdi.dll 27-Apr-2004 18:03  2000.80.936.0     106,588  Sqsrvres.dll 27-Apr-2004 18:03  2000.80.936.0      33,340  Ssmslpcn.dll 27-Apr-2004 18:03  2000.80.936.0      82,492  Ssnetlib.dll 27-Apr-2004 18:03  2000.80.936.0      25,148  Ssnmpn70.dll 27-Apr-2004 18:03  2000.80.936.0     123,456  Stardds.dll 27-Apr-2004 18:03  2000.80.936.0     158,240  Svrnetcn.dll 27-Apr-2004 18:03  2000.80.936.0      76,416  Svrnetcn.exe 27-Apr-2004 18:04  2000.80.936.0      49,228  Ums.dll 27-Apr-2004 18:04                    132,096  Ums.pdb 27-Apr-2004 18:03  2000.80.936.0      98,872  Xpweb70.dll

Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.

SQL Server startup parameter
Note After you apply this hotfix, you must also add trace flag 9054. To do this, follow these steps:
 * 1) In SQL Server Enterprise Manager, right-click your SQL Server name, and then click Properties.
 * 2) In the SQL Server Properties (Configure) -   dialog box, click the General tab.
 * 3) On the General tab, click Startup Parameters.
 * 4) In the Startup Parameters -   dialog box, type &quot;-T9054&quot; (without the quotation marks) in the Parameter text box.
 * 5) Click Add, and then click OK.
 * 6) In the Startup Parameters -   dialog box, click OK.
 * 7) Restart the SQL Server service for the new startup parameter to take effect.



WORKAROUND
To work around this problem for an individual query, use either of the following methods:
 * Use a UNION ALL statement instead of a UNION statement.
 * Set the data type of the constant values by using something other than the Convert function or the Cast function because the other query sets the data type.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.



MORE INFORMATION
For additional information about software updates, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Keywords: kbbug kbfix kbqfe kbsqlserv2000presp4fix kbhotfixserver KB838409

-

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

© Microsoft Corporation. All rights reserved.