Msg 8624 Level 16 State 1 Internal Sql Server Error
Contents |
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Msg 8624, Level 16, State 1, Procedure broadcast_item_delete, internal query processor error the query processor could not produce a query plan Line 39 Internal Query Processor Error: The query processor could not produce internal query processor error sql 2008 r2 a query plan. For more information, contact Customer Support Services. SQL Server > SQL Server Database Engine Question
Internal Query Processor Error The Query Processor Encountered An Unexpected
0 Sign in to vote I have a very simple procedure which is crashing with this error. we are using sql2008. the FK to table rashim_titles is causing the problem
Query Processor Could Not Produce A Query Plan Because Of The Hints Defined In This Query
as when I drop the FK it works the crashing statement: exec broadcast_item_delete @item=7573605 (it crashes even with no data in the table) Msg 8624, Level 16, State 1, Procedure broadcast_item_delete, Line 49 Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services. the 2 tables and the procedure: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[broadcast_items]( [broadcast_item_code] [int] IDENTITY(1,1) NOT NULL, [channel_code] [tinyint] NOT NULL, [broadcast_item_type_code] [tinyint] NOT NULL, [broadcast_item_name] [nvarchar](50) NOT NULL, [duration] [decimal](6, 2) NOT NULL, [updated_by] [int] NOT NULL, [update_time] [smalldatetime] NOT NULL, [rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL, [hafaka_num] [int] NULL, CONSTRAINT [PK_broadcast_items] PRIMARY KEY CLUSTERED ( [broadcast_item_code] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO CREATE UNIQUE NONCLUSTERED INDEX [Index_broadcast_items_rg] ON [dbo].[broadcast_items] ( [rowguid] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) GO CREATE NONCLUSTERED INDEX [IX_broadcast_items] ON [dbo].[broadcast_items] ( [channel_code] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) GO CREATE NONCLUSTERED INDEX [IX_broadcast_items_1] ON [dbo].[broadcast_items] ( [broadcast_item_name] ASC, [duration] ASC ) INCLUDE ( [broadcast_item_code], [channel_code]) WITH (PAD_INDEX = OFF,
Processor Error: The query processor could not produce a query plan. ★★★★★★★★★★★★★★★ BalmukundJuly 15, 20143 Share 0 0 Sometimes we see the below error in SQL Server 2008 R2 SP1 when executing a query in SQL Server Management Studio: ----------------------------------------- Error: 8624, Severity: 16, State: 116. Internal Query Processor Error: The query processor could not produce a query plan. For more https://social.msdn.microsoft.com/Forums/sqlserver/en-US/fd7fa01d-79c8-4eaa-a251-4a9db2e68f18/msg-8624-level-16-state-1-procedure-broadcastitemdelete-line-39-internal-query-processor?forum=sqldatabaseengine information, contact Customer Support Services. ----------------------------------------- So, how to handle this situation? I am using SQL Server 2008 R2 SP1 specifically, because some bugs related to the above problem has been fixed in SQL Server 2005 SP2: http://support.microsoft.com/kb/931329 As I am using SQL Server 2008 R2 SP1, so I https://blogs.msdn.microsoft.com/sqlserverfaq/2014/07/15/troubleshooting-error-8624-severity-16-state-21-internal-query-processor-error-the-query-processor-could-not-produce-a-query-plan/ should not get this error message, but still I am getting this. So, maybe I am doing something wrong which is not the above bug but something different. Let’s check. I have used the below query (well, the logic of the query is not important here) in my SSMS: ------------------------------------------ select * from (select c2 "c7", c4 "c8", COUNT(1) "c9" from Table1 group by c2, c4) Table2 where (c7) not in (select c7 from (select c2 "c7", c4 "c8", COUNT(1) "c9" from Table1 group by c2, c4) Table2, (select c7 "c11", COUNT(c7) "c12" from (select c2 "c7", c4 "c8", COUNT(1) "c9" from Table1 group by c2, c4) Table2 group by c7 having count(c7)=1) Table3 where Table2.c7=Table3.c11 and Table2.c9>1) ------------------------------------------ The query failed with: Error: 8624, Severity: 16, State: 116 Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Service
FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! http://www.tek-tips.com/viewthread.cfm?qid=1159898 Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access http://stackoverflow.com/questions/2823659/nested-sql-select-statement-fails-on-sql-server-2000-ok-on-sql-server-2005 To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. query processor By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This internal query processor Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Microsoft SQL Server: Programming Forum at Tek-Tips HomeForumsProgrammersDBMS PackagesMicrosoft SQL Server: Programming Forum Server: Msg 8624, Level 16, State 21, Line 1 Internal SQL Server error thread183-1159898 Forum Search FAQs Links MVPs Server: Msg 8624, Level 16, State 21, Line 1 Internal SQL Server error Server: Msg 8624, Level 16, State 21, Line 1 Internal SQL Server error tonydismukes (Programmer) (OP) 2 Dec 05 11:15 I have a view:CODECREATE VIEW ViewForCustom867DownloadASSELECT h.customerkey,d.REF02_SL_SALESMANNUM as salesman_num, d.PID05_F_ITEMDESC as description,convert(int,d.QTY02_39_SHIPPEDQTY) as qty,d.LIN_UA_UPCCASECODE as upc, convert(datetime,h.DTM02_035_DeliveryDate) as DeliveryDate,n.N102_NAME as name,n.N301_ADDRESSONE +''+n.N302_ADDRESSTWO +''+n.N401_CITY +', '+n.N402_STATE +' '+ n.N403_ZIP as addressFROM DETAIL d, HEADER h, NAMES nwhere h.customerkey = d.customerkeyand h.customerkey = n.customerkeyand h.headerkey
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Nested SQL Select statement fails on SQL Server 2000, ok on SQL Server 2005 up vote 1 down vote favorite Here is the query: INSERT INTO @TempTable SELECT UserID, Name, Address1 = (SELECT TOP 1 [Address] FROM (SELECT TOP 1 [Address] FROM [UserAddress] ua INNER JOIN UserAddressOrder uo ON ua.UserID = uo.UserID WHERE ua.UserID = u.UserID ORDER BY uo.AddressOrder ASC) q ORDER BY AddressOrder DESC), Address2 = (SELECT TOP 1 [Address] FROM (SELECT TOP 2 [Address] FROM [UserAddress] ua INNER JOIN UserAddressOrder uo ON ua.UserID = uo.UserID WHERE ua.UserID = u.UserID ORDER BY uo.AddressOrder ASC) q ORDER BY AddressOrder DESC) FROM User u In this scenario, users have multiple address definitions, with an integer field specifying the preferred order. "Address2" (the second preferred address) attempts to take the top two preferred addresses, order them descending, then take the top one from the result. You might say, just use a subquery which does a SELECT for the record with "2" in the Order field, but the Order values are not contiguous. How can this be rewritten to conform to SQL 2000's limitations? Very much appreciated. [EDIT] When I replace u.UserID in the WHERE clause with an actual User ID, SQL Server 2000 doesn't complain. It seems that SQL 2000 can't handle linking the inner reference (u.UserID) to the outer table (User u). Again, the error thrown is: Msg 8624, Level 16, State 16, Line 24 Internal SQL Server error. sql-server-2005 sql-server-2000 nested-queries share|improve this question edited May 13 '10 at 19:25 asked May 13 '10 at 0:10 Jay 63117 1 What error do you get with SQL 2000? –SqlACID May 13 '10 at 0:17 The error is: Msg 8624, Level 16, State 16, Line 24 Internal SQL Server error. –Jay May 13 '10 at 16:02 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Since the problem was due to not being able to resolve the inner reference uo.UserID in the line INNER JOIN UserAddressOrder uo ON ua.UserID = uo.UserID, I replaced the line with a call to a function which accepts the uo.UserID value as a parameter. This doesn't solve the problem elegantly, but it got the job done (alth