SQL Server Export Errors - sql-server

I'm trying to export the results of a SQL statement via the SQL Server Import and Export Wizard. I am receiving 2 errors:
- Copying to `Query` (Error)
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x00040EDA Description: "Warning: Null value is eliminated by an aggregate or other SET operation.".
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - Query" (1) returned error code 0xC0202009. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
The Executing Actions works just fine, if I run the SQL in the SQL Server management Studio it works just fine.
What do these errors mean an how can solve them so the export works? If it matters I'm exporting to Excel with the version 97-2003 selected.

This article discusses the cause and solution to this error. http://www.developmentnow.com/g/113_2006_9_0_0_828485/Warning-Null-value-is-eliminated-by-an-aggregate-or-other-SET-operation-.htm
The quick-answer is that you can turn off warnings by using this command before you run your query:
SET ANSI_WARNINGS OFF
However, if it is within a SP, it will recompile the SP every time you run it.

Related

SSIS tasks are getting fail with Communication link failure error

In a SSIS package I have an OLED Source, a look up transformation and an OLE DB destination task. I'm running my package on VS 2019 but the tasks(OLED Source, OLE DB destination) are getting fail after 10 to 15 minutes with below error:
[OLE DB Destination [27]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Communication link failure".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "TCP Provider: The semaphore timeout period has expired.
".
[OLE DB Destination [27]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "OLE DB Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "OLE DB Destination.Inputs[OLE DB Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (27) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (40). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
[OLE DB Source [66]] Error: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on OLE DB Source returned error code 0xC02020C4. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
I tried to fix this issue by setting validateExternalMetadata as false for the tasks but no luck.
I also checked others answers on stack overflow for almost the similar issues/ques. but that also didn't help.
Note: SSIS connection manager is using SQL server authentication and DB is Azure SQL
appreciate your help if any.
From my experience this error can have various reasons. For example this can be caused by the server being overloaded, or due to bad network. One thing you could try is to change the caching mode of your lookup component. I'm assuming it's running in "Full cache" mode, meaning that all the data in the lookups query will be read into memory of the SSIS server before doing the lookup. Changing this to "No cache" for example will result in the lookup query being run for every row that's fed into the component. "Partial cache" will cache, but only as each distinct value is encountered in the data flow. These other methods will put less load on memory of the SSIS server but more load on the lookup source database. If it works one option might be to increase RAM of the SSIS server.
I see that you are using a deprecated "Microsoft SQL Server Native Client 11.0"
Starting from 2018, it is better to use Microsoft OLE DB Driver for SQL Server
It is optimized for Azure, and has lots of new functionality.
Released: Microsoft OLE DB Driver for SQL Server
Microsoft OLE DB Driver for SQL Server

ODBC error when executed by SQL JOB AGENT

I am getting an error when I try to execute my SSIS Package by the Job Agent.
If I run through Visual Studio it runs perfectly.
The error is:
SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on ODBC Source returned error code 0x80004005. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
This ODBC is an "IBM i Access for Windows ODBC data source".
I have try to put the packages running at 32-bit. Change some parameters in my connection (that is a project parameter).
Update:
I had to change my queries and work with openquery. Just a note, get attention to numeric columns because I was having problems with decimal values.

Visual Studio 2013 Integration project errors

I created a visual studio 2013 integration project to copy data from an MS ACCESS database to a remote SQL Server (~13,000 records). The first time I ran it, it almost finished with (~12,000) with the following errors:
[OLE DB Destination [2]] Error: SSIS Error Code DTS_E_OLEDBERROR. An
OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is
available. Source: "Microsoft OLE DB Provider for SQL Server"
Hresult: 0x80004005 Description: "[DBNETLIB][ConnectionRead
(recv()).]General network error. Check your network documentation.".
[OLE DB Destination [2]] Error: SSIS Error Code
DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "OLE DB
Destination.Inputs[OLE DB Destination Input]" failed because error
code 0xC020907B occurred, and the error row disposition on "OLE DB
Destination.Inputs[OLE DB Destination Input]" specifies failure on
error. An error occurred on the specified object of the specified
component. There may be error messages posted before this with more
information about the failure.
[SSIS.Pipeline] Error: SSIS Error
Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component
"OLE DB Destination" (2) failed with error code 0xC0209029 while
processing input "OLE DB Destination Input" (15). The identified
component returned an error from the ProcessInput method. The error is
specific to the component, but the error is fatal and will cause the
Data Flow task to stop running. There may be error messages posted
before this with more information about the failure.
I ran the test a second and 3rd time, but each time it seem to fail only transferring less than 2000 records.
What could be the problem? Is this a network issues, as it seems all my mappings are correct.
This was a user error. My visual studio was not showing the count transferred. Something with the themes. I decided to go into sql server and run a query to check what was been transferred. This was the culprit. It broke each time I ran it! So bad idea to be messing with sql server when running SSIS.

DTS_E_OLEDBERROR. Error code: 0x80004005.Difference between SQl Native client and oledb provider for sql server

There was a communication link error while I was using SQL Server Native Client 10 in an SSIS Data Flow component.
Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has
occurred. Error code: 0x80004005. An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005
Description: "Communication link failure".An OLE DB record is
available. Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80004005 Description: "TCP Provider: The specified network
name is no longer available.
So I changed from SQL Server Native Client 10 to Microsoft OLEDB Provider for SQL Server, hoping that it would run fine. This time got an error as shown below:
[Transacn_Tbl1[737]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE
DB error has occurred. Error code: 0x80004005. An OLE DB record is
available. Source: "Microsoft OLE DB Provider for SQL Server"
Hresult: 0x80004005 Description: "Unspecified error occurred on SQL
Server. Connection may have been terminated by the server.".
[Transacn_Tbl1[737]] Error: SSIS Error Code
DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination
Input" (750)" failed because error code 0xC020907B occurred, and the
error row disposition on "input "OLE DB Destination Input" (750)"
specifies failure on error. An error occurred on the specified object
of the specified component. There may be error messages posted before
this with more information about the failure.
What is the difference between these 2 providers? Which one should I use?
I ran into this issue after releasing a new SSIS project to the production environment.
At first, I was able to validate the package with success, but when I tried to execute the package, I got the DTS_E_OLEDBERROR. Error code: 0x80004005. message.
I tried to validate the package with the servername and password variables set to sensitive, but in this case the validation failed as well.
After setting the environment variables back to non-sensitive again and inserting the environment variable values, I was able to validate and execute the package.
To me it seems like in some cases the metadata in the SSISDB gets corrupted, but unfortunately I've not been able to point down the source of this issue.
I hope this will help someone. I've went through a lot of debug scenarios before I ended up with this (rather unsatisfying) solution.
It looks like you have to resolve this issue, you must change the permissions for the Temp directory of the SQL Server Agent Service startup account. Grant the Read permission and the Write permission to the SQL Server Agent proxy account for this directory.
http://support.microsoft.com/kb/933835
I changed connection to Provider=SQLNCLI11.1 and executed
successfully with parameters.
DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005
This obscure error can also mean something as benign as the OLE provider cannot find the expected Excel Worksheet.
I recently came across this error in an SSIS project and after several hours trying to track down what I believed was some configuration issue, it turned out to be the end user had simply changed the name of a Worksheet in the Excel data source.
Microsoft Messaging FTW!

Cannot update Excel source properties in SSIS package

I have an SSIS package that imports an excel spreadsheet into an SQL Server 2008 database.
I have an Excel connection in the Connection Managers tab and it points to an Excel file on my local computer.
But when I open the Excel Source in Data Flow, if I try to view columns or change the "Name of Excel sheet:" I get this error.
Error at LoadMasterData [Connection manager "SourceConnectionExcel"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unspecified error".
Error at Data Flow Task 1 [Source - Sheet1$ [1]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "SourceConnectionExcel" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
The package was saved from SQL Server Management Studio using Import Data. When I run the package it works fine but I want to be able to specify the spreadsheet name as a variable. When I change the option to specify the sheet name as a variable, it won't let me close the window with the "OK" button, and just keeps giving me the same error as above.
Has anyone experienced this behaviour before that can help me get this working?
Thanks
Are you running on 32bit or 64bit? if you're on 64bit you need to know that there are no providers for Excel - you'll have to enforce the package to not use 64bit. Right click project, properties, debugging: Run64BitRuntime - set to false.

Resources