The query processor encountered an unexpected error during execution hresult 0x80040e19

SQL Server: Fix Msg 8630, Level 16, State 1, Line 1 – Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19). This is going to be a quick reference for people encountering this error and to do the fix more than a blog post but I do […]

Содержание

  1. SQL Server: Fix Msg 8630, Level 16, State 1, Line 1 – Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).
  2. The Error:
  3. The problem – Memory pressure?
  4. ..or corruption?
  5. The Solution:
  6. Internal query processor error
  7. Answered by:
  8. Question
  9. Answers
  10. All replies
  11. Internal query processor error
  12. Answered by:
  13. Question
  14. Answers
  15. All replies

SQL Server: Fix Msg 8630, Level 16, State 1, Line 1 – Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).

This is going to be a quick reference for people encountering this error and to do the fix more than a blog post but I do show a small trick on how to do an UPDATE in chunks 😉

The Error:

I ran into this error with

  • (Microsoft SQL Server 2012 (SP4-GDR) (KB4057116) – 11.0.7462.6 (X64) Jan 5 2018 22:11:56 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

When you run a query such as below:

It produced an obscure error

The problem – Memory pressure?

Initial Google search indicated that it was due to memory pressure and a fix is needed via a Service Pack (for the older versions of SQL Server).

Thinking it was trying to do too much at once, I broke the UPDATE to do it in chunks of 10000 rows thinking it would help with the memory pressure part :-). Indeed, it might help you if that was the case for you, but it did not help me! Basically, the idea is to keep updating rows that qualify in chunks of 10000 inside a loop until no more rows qualify for the UPDATE and we exit the loop. A supporting index that makes this query efficient would be helpful.

..or corruption?

However, this link listed many possible problems that could cause this error and I decided to try DBCC CHECKTABLE on the table in question.

Doing a quick check, the table indeed had a corrupted index

The Solution:

To fix the index corruption, I tried doing an online index rebuild and it wasn’t supported in the Standard edition I was running. So, I just dropped and recreated the index.

Then, I ran the UPDATE and it worked like a charm!

Источник

Internal query processor error

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I have an ETL job which runs daily on SQL server. It failed last week while trying to read data from a database which is present in the same server where ETL job is also running with the following error :

«Internal Query Processor Error: The query processor encountered an unexpected error during execution.»

The job runs on SQL Server 2005 with Standard Edition (Service Pack2) on a 32 bit machine.

RAM Size : 15.9 GB

The ETL job was running fine all these days. This error had occurred recently and after that for 1 week the job was running fine. But this error occurred again for the second time after 1 week.

Can someone please help me out in this?

Answers

It may be also caused by job agent which control by msdb database. You could try to turn msdb to single user model and run the below query:

DBCC CHECKDB (‘msdb’, Repair_ALL)

Best Regards,
Peja

Please remember to click «Mark as Answer» on the post that helps you, and to click «Unmark as Answer» if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Some time ago, I was also faced the same issue, and I ran the update stats and later executed the query and its successful.

Please try that, still if you are facing the issue please try to open a case with MS.

The reason why i executed the upstats is, query optimiser will builds the plan based on stats, if the stats are updated we can ran the situtation like «Internal Query Processor Error». ( in my point of view)

Thanks, Satish Kumar. Please mark as this post as answered if my anser helps you to resolves your issue 🙂

I am not sure if there is corruption in any of the database and that can cause such issues. Once you have verified that databases are clean from corruption, I would suggest you to upgrade to latest build of SQL Server as there have been few fixes about the error which you are seeing.

What is the information in ERRORLOG?

8630 is a generic error with many possible causes. If none of above help then my request would be to open support ticket with Microsoft SQL Support team as this would need additional troubleshooting and gather more details. Again, please apply latest patch of SQL Server 2005 before contacting us.

Balmukund Lakhani | Please mark solved if I’ve answered your question, vote for it as helpful to help other user’s find a solution quicker
———————————————————————————
This posting is provided «AS IS» with no warranties, and confers no rights.
———————————————————————————
My Blog | Team Blog | @Twitter

I would recommend to start by installing the SP4 for SQL Server 2005.

Otherwise, tell me your query.

Also can you check is there any recent modification done at the SP level, if so you can tune and check it out.

also I would suggest you to check Optimization(reindex and update statistics)optmization job well , also is there any other performance issue faced during that time i,e is there any adhoc or additional load was ran against the DB level .

if vendors OK with the latest patch then upgrade to latest ->SP+Hotfix for SQL server 2005.

Rama Udaya.K ramaudaya.blogspot.com —————————————- Please remember to mark the replies as answers if they help and unmark them if they provide no help.

I use the below query

select
A.productno,A.customerno,A.accountno,A.Orgno
from (
(
SELECT S.productno,S.customerno,S.accountno,S.Orgno
From StagingTable S
INNER JOIN (SELECT productno from tabeA
UNION
SELECT productno from tableB
UNION
SELECT productno from tableC
UNION
SELECT productno from tableD
UNION
SELECT productno from tableE
UNION
SELECT productno from tableF
UNION
SELECT productno from tableG
UNION
SELECT productno from tableH
UNION
SELECT productno from tableI
UNION
SELECT productno from tableJ
) M
ON S.productno=M.productno
)
UNION
(
SELECT S.productno,S.customerno,S.accountno,S.Orgno
From StagingTable S INNER JOIN FactTable F
on S.productno=F.productno
)

(SELECT CTK.productno,M.customerno,C.accountno,MK.Orgno
From FactTable CTK
INNER JOIN
(SELECT cutsomerno,customerkey FROM Dim_Cust ) M
ON CTK.customerkey=M.customerkey
INNER JOIN
(SELECT accountno,accountkey from Dim_Account) C
ON CTK.Accountkey=C.Accountkey
INNER JOIN
(SELECT Orgno,Orgkey from Dim_Org)MK
ON CTK.Orgkey=MK.Orgkey
)A

Hi Rama Udaya,
There wasn’t any additional load which was happening that time.

I also wanted to know why this error occurs ?

Источник

Internal query processor error

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I have an ETL job which runs daily on SQL server. It failed last week while trying to read data from a database which is present in the same server where ETL job is also running with the following error :

«Internal Query Processor Error: The query processor encountered an unexpected error during execution.»

The job runs on SQL Server 2005 with Standard Edition (Service Pack2) on a 32 bit machine.

RAM Size : 15.9 GB

The ETL job was running fine all these days. This error had occurred recently and after that for 1 week the job was running fine. But this error occurred again for the second time after 1 week.

Can someone please help me out in this?

Answers

It may be also caused by job agent which control by msdb database. You could try to turn msdb to single user model and run the below query:

DBCC CHECKDB (‘msdb’, Repair_ALL)

Best Regards,
Peja

Please remember to click «Mark as Answer» on the post that helps you, and to click «Unmark as Answer» if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Some time ago, I was also faced the same issue, and I ran the update stats and later executed the query and its successful.

Please try that, still if you are facing the issue please try to open a case with MS.

The reason why i executed the upstats is, query optimiser will builds the plan based on stats, if the stats are updated we can ran the situtation like «Internal Query Processor Error». ( in my point of view)

Thanks, Satish Kumar. Please mark as this post as answered if my anser helps you to resolves your issue 🙂

I am not sure if there is corruption in any of the database and that can cause such issues. Once you have verified that databases are clean from corruption, I would suggest you to upgrade to latest build of SQL Server as there have been few fixes about the error which you are seeing.

What is the information in ERRORLOG?

8630 is a generic error with many possible causes. If none of above help then my request would be to open support ticket with Microsoft SQL Support team as this would need additional troubleshooting and gather more details. Again, please apply latest patch of SQL Server 2005 before contacting us.

Balmukund Lakhani | Please mark solved if I’ve answered your question, vote for it as helpful to help other user’s find a solution quicker
———————————————————————————
This posting is provided «AS IS» with no warranties, and confers no rights.
———————————————————————————
My Blog | Team Blog | @Twitter

I would recommend to start by installing the SP4 for SQL Server 2005.

Otherwise, tell me your query.

Also can you check is there any recent modification done at the SP level, if so you can tune and check it out.

also I would suggest you to check Optimization(reindex and update statistics)optmization job well , also is there any other performance issue faced during that time i,e is there any adhoc or additional load was ran against the DB level .

if vendors OK with the latest patch then upgrade to latest ->SP+Hotfix for SQL server 2005.

Rama Udaya.K ramaudaya.blogspot.com —————————————- Please remember to mark the replies as answers if they help and unmark them if they provide no help.

I use the below query

select
A.productno,A.customerno,A.accountno,A.Orgno
from (
(
SELECT S.productno,S.customerno,S.accountno,S.Orgno
From StagingTable S
INNER JOIN (SELECT productno from tabeA
UNION
SELECT productno from tableB
UNION
SELECT productno from tableC
UNION
SELECT productno from tableD
UNION
SELECT productno from tableE
UNION
SELECT productno from tableF
UNION
SELECT productno from tableG
UNION
SELECT productno from tableH
UNION
SELECT productno from tableI
UNION
SELECT productno from tableJ
) M
ON S.productno=M.productno
)
UNION
(
SELECT S.productno,S.customerno,S.accountno,S.Orgno
From StagingTable S INNER JOIN FactTable F
on S.productno=F.productno
)

(SELECT CTK.productno,M.customerno,C.accountno,MK.Orgno
From FactTable CTK
INNER JOIN
(SELECT cutsomerno,customerkey FROM Dim_Cust ) M
ON CTK.customerkey=M.customerkey
INNER JOIN
(SELECT accountno,accountkey from Dim_Account) C
ON CTK.Accountkey=C.Accountkey
INNER JOIN
(SELECT Orgno,Orgkey from Dim_Org)MK
ON CTK.Orgkey=MK.Orgkey
)A

Hi Rama Udaya,
There wasn’t any additional load which was happening that time.

I also wanted to know why this error occurs ?

Источник

Перейти к контенту

  • Remove From My Forums
  • Question

  • I was attempting to cleanup backup history, but in doing so I get an error

    I ran «exec sp_delete_backuphistory ‘9/1/2014′» and received the error

    Msg 8630, Level 16, State 1, Procedure sp_delete_backuphistory, Line 59

    Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).


    Lee

Answers

  • The problem was a DBCC inconsistency in the MSDB. I was able to fix using the appropriate DBCC CheckDatabase options.


    Lee

    • Marked as answer by

      Thursday, October 30, 2014 12:00 AM

  • Remove From My Forums
  • Question

  • I was attempting to cleanup backup history, but in doing so I get an error

    I ran «exec sp_delete_backuphistory ‘9/1/2014′» and received the error

    Msg 8630, Level 16, State 1, Procedure sp_delete_backuphistory, Line 59

    Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).


    Lee

Answers

  • The problem was a DBCC inconsistency in the MSDB. I was able to fix using the appropriate DBCC CheckDatabase options.


    Lee

    • Marked as answer by

      Thursday, October 30, 2014 12:00 AM

Please help me out with the solution.

When i try to execute the Update Command, I am getting the following error. I am using SQL Server 2012.

UPDATE WorkOrder SET Delivered = GETDATE() WHERE WONumber= 69375

Error: Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19)

Muhammad Qasim's user avatar

asked Apr 3, 2019 at 6:29

KISHORE GLHN's user avatar

In my issue with the same error, while running a DBCC checkdb command through SQL, I found issues with a few Tables.
I had to place the database in Single_User Mode,
run the – DBCC CHECKDB (‘xxxx’,REPAIR_REBUILD);
(note: the ‘xxxx’ is the database name),
then place the database back in Multi_User Mode.
This resolved the issue for my Client.

TT.'s user avatar

TT.

15.6k6 gold badges46 silver badges86 bronze badges

answered Nov 27, 2019 at 19:30

Scott A.'s user avatar

0

  • Remove From My Forums
  • Question

  • I was attempting to cleanup backup history, but in doing so I get an error

    I ran «exec sp_delete_backuphistory ‘9/1/2014′» and received the error

    Msg 8630, Level 16, State 1, Procedure sp_delete_backuphistory, Line 59

    Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).


    Lee

Answers

  • The problem was a DBCC inconsistency in the MSDB. I was able to fix using the appropriate DBCC CheckDatabase options.


    Lee

    • Marked as answer by

      Thursday, October 30, 2014 12:00 AM

Корпорация Майкрософт распространяет исправления Microsoft SQL Server 2008 как один загружаемый файл. Так как исправления являются накопительными, каждый выпуск содержит все исправления и все исправления безопасности, которые были включены в предыдущие 2008 SQL Server исправления выпуска.

Симптомы

Имеется сервер Microsoft SQL Server 2008, при недостатке памяти. При выполнении запроса на сервере, появляется следующее сообщение об ошибке:

Состояние уровня 17 msg 8630 52
Ошибка: 8630, уровень опасности: 17, состояние: 52
Внутренняя ошибка обработчика запросов: Обработчик запросов обнаружил непредвиденную ошибку во время выполнения.

Решение


Исправление этой уязвимости первого выпуска накопительного обновления 6 для SQL Server 2008 Пакет обновления 1. Дополнительные сведения о этот накопительный пакет обновления щелкните следующий номер статьи базы знаний Майкрософт:

977443 накопительного обновления пакет обновления 6 для SQL Server 2008 Пакет обновления 1Примечание. Поскольку построения являются накопительными, каждый новый выпуск исправление содержит все исправления и все исправления, входившие в состав предыдущих SQL Server 2008 выпуска исправлений. Мы рекомендуем рассмотреть применение последнего выпуска исправления, содержащего это исправление. Для получения дополнительных сведений щелкните следующий номер статьи базы знаний Майкрософт:

970365 SQL Server 2008 выполняет построение, выпущенных после выпуска SQL Server 2008 Пакет обновления 1
Исправления Microsoft SQL Server 2008 создаются для определенных пакетов обновления SQL Server. Необходимо установить исправление SQL Server 2008 Пакет обновления 1 для установки SQL Server 2008 Пакет обновления 1. По умолчанию какие-либо исправления, включенный в пакет обновления SQL Server включено в следующий пакет обновления SQL Server.

Статус

Корпорация Майкрософт подтверждает, что это проблема продуктов Майкрософт, перечисленных в разделе «Относится к».

Ссылки

Сведения о добавочных модель обслуживания для SQL Server щелкните следующий номер статьи базы знаний Майкрософт:

935897 добавочных модель обслуживания доступна из группы SQL Server для предоставления исправления для проблем, о которых сообщалось в

Дополнительные сведения о схеме именования для обновления SQL Server щелкните следующий номер статьи базы знаний Майкрософт:

822499 Новая схема присвоения имен пакетам обновлений программного обеспечения Microsoft SQL Server

Для получения дополнительных сведений о терминологии обновлений программного обеспечения щелкните следующий номер статьи базы знаний Майкрософт:

Описание 824684 Стандартные термины, используемые при описании обновлений программных продуктов Майкрософт

Нужна дополнительная помощь?

  • Remove From My Forums
  • Question

  • Hello Everyone, 

    I’m having an issue that I just cant seem to solve. We are currently in the process of implementing an edge server for external access. When I go and publish the new topology using the Skype for Business Server 20-15, Topology Builder I receive the error
    below. 

    Any advise on how to resolve this issue would be greatly appreciated. 

    Link to attachment as it is too small to see using forum
    https://ibb.co/iOa8o5

    • Edited by
      sanoske312
      Monday, May 8, 2017 5:31 PM

All replies

  • Hi sanoske312,

    Based on my research, there may be something wrong with the SQL server, please make sure the service of SQL server is started.

    What’s your SQL server version, and where did you publish your topology?

    When you deploying Edge server, you need to use workgroup computer and use two network adapter, and you need to publish the topology in SFB FE server.

    Please check the steps for deploying SFB edge server, the following blog describes how to deploy Edge server, please refer to

    https://technet.microsoft.com/en-us/library/dn933903.aspx


    Regards,

    Alice Wang


    Please remember to
    mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

    • Edited by
      Alice-Wang
      Tuesday, May 9, 2017 6:06 AM
    • Proposed as answer by
      Alice-Wang
      Monday, May 15, 2017 9:21 AM
  • Remove From My Forums
  • Question

  • Hello Everyone, 

    I’m having an issue that I just cant seem to solve. We are currently in the process of implementing an edge server for external access. When I go and publish the new topology using the Skype for Business Server 20-15, Topology Builder I receive the error
    below. 

    Any advise on how to resolve this issue would be greatly appreciated. 

    Link to attachment as it is too small to see using forum
    https://ibb.co/iOa8o5

    • Edited by
      sanoske312
      Monday, May 8, 2017 5:31 PM

All replies

  • Hi sanoske312,

    Based on my research, there may be something wrong with the SQL server, please make sure the service of SQL server is started.

    What’s your SQL server version, and where did you publish your topology?

    When you deploying Edge server, you need to use workgroup computer and use two network adapter, and you need to publish the topology in SFB FE server.

    Please check the steps for deploying SFB edge server, the following blog describes how to deploy Edge server, please refer to

    https://technet.microsoft.com/en-us/library/dn933903.aspx


    Regards,

    Alice Wang


    Please remember to
    mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

    • Edited by
      Alice-Wang
      Tuesday, May 9, 2017 6:06 AM
    • Proposed as answer by
      Alice-Wang
      Monday, May 15, 2017 9:21 AM

This is going to be a quick reference for people encountering this error and to do the fix more than a blog post but I do show a small trick on how to do an UPDATE in chunks 😉

I ran into this error with

  • (Microsoft SQL Server 2012 (SP4-GDR) (KB4057116) – 11.0.7462.6 (X64)   Jan  5 2018 22:11:56   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)

When you run a query such as below:

update dbo.person
	set last_name = 'Doe', first_name = 'John'
	where person_id not in (select person_id from dbo.aus_user)
	and last_name is not null
	and first_name <> 'COMPANY'

It produced an obscure error

Msg 8630, Level 16, State 1, Line 3
Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).

The problem – Memory pressure?

Initial Google search indicated that it was due to memory pressure and a fix is needed via a Service Pack (for the older versions of SQL Server).

Thinking it was trying to do too much at once, I broke the UPDATE to do it in chunks of 10000 rows thinking it would help with the memory pressure part :-). Indeed, it might help you if that was the case for you, but it did not help me! Basically, the idea is to keep updating rows that qualify in chunks of 10000 inside a loop until no more rows qualify for the UPDATE and we exit the loop. A supporting index that makes this query efficient would be helpful.

--
--Run the UPDATE in chunks of 10000 records (governed by the TOP clause)
--
WHILE 1=1
BEGIN
	update TOP (10000) dbo.person
	set last_name = 'Doe', first_name = 'John'
	where person_id not in (select person_id from dbo.aus_user)
	and last_name is not null
	and first_name <> 'COMPANY'
	and last_name <> 'Doe'
	and first_name <> 'John'


   IF @@ROWCOUNT = 0
      BREAK;
END;

..or corruption?

However, this link listed many possible problems that could cause this error and I decided to try DBCC CHECKTABLE on the table in question.

Doing a quick check, the table indeed had a corrupted index

DBCC CHECKTABLE('dbo.person')
Msg 8951, Level 16, State 1, Line 1
Table error: table 'person' (ID 229575856). Data row does not have a matching index row in the index 'IX_person_last_name' (ID 5). Possible missing or invalid keys for the index row matching:
Msg 8955, Level 16, State 1, Line 1
Data row (1:14114873:8) identified by (person_id = 88731303) with index values 'last_name = 'Advantedix' and person_id = 88731303'.
DBCC results for 'person'.
There are 440151 rows in 29587 pages for object "person".
CHECKTABLE found 0 allocation errors and 1 consistency errors in table 'person' (object ID 229575856).
repair_rebuild is the minimum repair level for the errors found by DBCC CHECKTABLE (MyDBName.dbo.person).
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Completion time: 2021-04-15T07:45:32.5252719-04:00

The Solution:

To fix the index corruption, I tried doing an online index rebuild and it wasn’t supported in the Standard edition I was running. So, I just dropped and recreated the index.

DROP INDEX [IX_person_last_name] ON [dbo].[person]
GO

CREATE NONCLUSTERED INDEX [IX_person_last_name] ON [dbo].[person]
(
	[last_name] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 70) ON [PRIMARY]
GO

Then, I ran the UPDATE and it worked like a charm!

RRS feed

  • Remove From My Forums
  • Question

  • Hello Everyone, 

    I’m having an issue that I just cant seem to solve. We are currently in the process of implementing an edge server for external access. When I go and publish the new topology using the Skype for Business Server 20-15, Topology Builder I receive the error
    below. 

    Any advise on how to resolve this issue would be greatly appreciated. 

    Link to attachment as it is too small to see using forum
    https://ibb.co/iOa8o5

    • Edited by
      sanoske312
      Monday, May 8, 2017 5:31 PM

All replies

  • Hi sanoske312,

    Based on my research, there may be something wrong with the SQL server, please make sure the service of SQL server is started.

    What’s your SQL server version, and where did you publish your topology?

    When you deploying Edge server, you need to use workgroup computer and use two network adapter, and you need to publish the topology in SFB FE server.

    Please check the steps for deploying SFB edge server, the following blog describes how to deploy Edge server, please refer to

    https://technet.microsoft.com/en-us/library/dn933903.aspx


    Regards,

    Alice Wang


    Please remember to
    mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

    • Edited by
      Alice-Wang
      Tuesday, May 9, 2017 6:06 AM
    • Proposed as answer by
      Alice-Wang
      Monday, May 15, 2017 9:21 AM

Понравилась статья? Поделить с друзьями:
  • The program received an x window system error
  • The program has encountered a fatal error and will close как исправить
  • The program cannot be started a general error occurred while accessing your central configuration
  • The procedure entry point cef is cert status minor error could not be located
  • The printed output may be printed incorrectly click resolve error or try to print again