An OLE DB error has occurred. Error code: 0x80004005.
Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x00040EDA  
"Warning: Null value is eliminated by an aggregate or other SET operation.".

Please help to find the root cause for this temporary failure and that what can be done to avoid this in future.

  • 2
    You don't say what version of SQL Server you are using, but this is most like this bug, which has been fixed in later versions. As a workaround, refactor the option to not aggregate NULLs. – Paul White Apr 24 '15 at 5:06

Annoying isn't it. I've done some research and it turns out it is incorrectly reporting a ANSI warning as an error (resolved in SQL Server 2012, no patch available for previous versions).

One way to stop the error is to go through all your code, and wherever you have an aggregate function (e.g. SUM), use ISNULL to ensure the aggregated value can never be NULL:

i.e. change




This makes the error go away but might be impractical.


This seems like you are running SSIS package through SQL agent job and error details are not accurate in your question,to know error details ,know name of package and run below query

use ssisdb  

select top 10* from catalog.event_messages ce  
catalog.operations co  
on co.operation_id=ce.operation_id  
and co.object_name='your package name'  
and ce.event_name='onerror'  
order by co.operation_id desc

please post the error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.