SSIS ERROR: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020 - sql

I have problems with SSIS process(acctually the same problem occurs for two different processes). So, we are doing some ETL work using SSIS. We have Business Intelligence project that executes without errors from Visual Studio. However when its deployed on the server and scheduled as a job it fails with errors like:
INTRASTAT_Towar:Error: SSIS Error Code
DTS_E_PROCESSINPUTFAILED. The ProcessInput
method on component "Union All 3" (876) failed with error
code 0xC0047020 while processing input "Union All Input
2" (916). 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.
INTRASTAT_Towar:Error: SSIS Error Code
DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput
method on istat_dekl_wynik_poz SELECT 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.
INTRASTAT_Towar:Error: The attempt to add a row to the
Data Flow task buffer failed with error code 0xC0047020.**
The other returned errors are similar, sometimes instead of 0xC0047020, there is unspecified error. Errors occur only on this one table, that has a lot of different stuff inside data flow task(unions, multicasts, conditional split). Most other data flows have just source, dest and transformation, and they are not causing any problems. I've been suggested to try manipulating DefaultBufferMaxRows and DefaultBufferSize properties values for the data flow task, but after doing some research I dont belive that it will solve the issue, as they are currently put on default values. Any suggestions?

Well, I managed to work the issue with my packages. I was using 2012 SSIS version, but I executed packages in 32 bit environment in BIDS. The server acctually executed in 64 bit and for some projects that was the problem. One checkbox in step properties to make it execute in 32 bit env and I solved the problem we have been fighting for weeks.

I was also facing the same issue, I just did below step.
Open Data Flow tab>>Click anywhere except any task and then Right Click>>Properties>>Change **ForceExecutionValueType** to **Int64**
You can follow my screenshot:

Watch out for indexes on the destination tables - especially unique ones because this will throw an error that's doesn't pinpoint the problem.

For people who stumbled here for the same error. If you are trying to copy data from one Azure SQL database to another using SQL Server Import and Export Wizard. Use the 64-bit version.
From your windows search for SQL Server 2019 Import and Export Data (64-bit).

Related

Capture Data State on Error at runtime - SQL Server

I have a question regarding error handling practices within SQL Server.
What I would like to accomplish is easy error re-creation. I have a very active SQL Server installation with constantly changing data in the tables I am interested in. It is modeling an active warehouse environment.
I've already built a generic error handler for all the stored procedures on this installation in order to track errors and log specifics about the cause of the error such as:
calling line (this gives the EXEC statement of the stored procedure as well as input variables)
error_message
error_state
error_number
error_line
etc.
What I am missing is reproducibility. Even if I were to run the same statement just a few minutes after being notified that an error occurred, I cannot be sure that my results would be the same due to the underlying data changing.
I would like to capture the state of the data on the database when the error occurred.
This could be something like a database image that I could then import into a clean SQL Server installation and execute the erring line in order to perfectly capture what was happening on the database the moment the error occurred.
Due to the nature of needing to capture this at runtime, I would prefer a light-weight solution. Perhaps only capturing the tables relevant to the failing statement.
Does anyone know if this is possible or has been done before? It is really only critical to try and suss out logical errors. It wouldn't be necessary for something like a deadlock.
I would ultimately turn these data subsets into XML or JSON and include them in the error log when appropriate.

Talend tCreateTable error: NullPointerException

Trying to create a table in a local instance of SQL Server Mgmt Studio using Talend with the ultimate goal of setting up a direct Salesforce-SSMS connection for ETL.
I've managed to load the data from SFDC into SSMS, but only by first manually creating the tables, manually mapping the schema in a tMap, and then running my job.
I'd like to now create the tables in SSMS with a tCreateTable component, and then use the AutoMap feature to map fields.
However, I'm getting a Null Pointer Exception error that makes no sense to me. Debugging line 370 shows that my dbSchema_tCreateTable_1 object is null, but I don't understand why. I've defined it from repository. Below are some pics of my setup:
Sample Schema
Error Message and Job Design
Line 370 and suspect in Red
I know my db connection is good because I've already pushed data to existing tables, but for the life of me (and 2 of my java engineers) I can't figure this out. I've got 5 days of experience with Talend so apologies if I'm making a dumb mistake. Any help would be appreciated!
edit: Component view of tCreateTable
edit 2: Component view of tFixedFlowInput
edit 3: Component view of tMSSqlOutput
edit 4: tMSSqlConnection
On first job (provided on Error Message and Job Design) NPE occur because of connection still not created (is null) when tCreateTable tried to call null.executeStatement()
You can modify your first job put tMsSQLConnection -> OnSubjobOK -> tCreateTable
OR remove connection element at all and set connection parameters to tCreateTable.
If it doesn't help, answer please on following questions:
Share please exception stacktrace and error message occurs when you use second job (connection -> tFixedFlowInput - tMSSQLOutput)
What version of studio (Open Studio or enterprise and version) have you used?
If it is not the latest (6.5.1) could you upgrade it?
If it is, could you export your job and share it? (i.e. on talend bug tracker)
P.S. You can try to debug job by yourself, select Run Job -> Debug Run -> Java Debug
Using eclipse debug view you can find out why the NPE occur.

Rethrow an error from within SSIS package

Ive got a 2010 SSIS package which in turn runs other packages. Each package is independent so if one fails the others can still progress. My logic states the next one run on completion of the previous one wether it failed or not
My proble is that when one does error i get a very standard error message which doesn't tell me which one crashed or give me any other clues.
The Integrated Services Dashboard does assist but still lacking basic information. But what i would like is that the package rethrow the error so i can add some more ifnormation to it.
How is this done?
Do i create a script task in the Onerror event for the individual package and add some information of my own before rethrowing the error ?
Any examples that show you what needs to be done ? I still want the other packets to continue to execute.
First thing is that there is no 2010 version of SSIS. You are using Visual Studio 2010 against either 2008 R2 or 2012 but this does not affect the question in any way.
The best way to capture this error information is to log the error information in the child packages. This can be implemented using an SSIS frameworks such as
Free - http://ssisetlframework.codeplex.com/
Commercial product - http://pragmaticworks.com/Products/BI-xPress
Using these frameworks you could easily get the detailed error information that you need without having to modify the control package.

SSIS ADO Net Destination Errors

I'm having a great deal of trouble converting errors into warning in my package. The package reads from a csv file and inserts the data into a table. If there are any issues with the data i want an email sent to the owners. I don't want an error message for myself but i do want the package to finish execution.
I've tried hanging a script component off the ADO Net destination error stream. When the error (Can't insert dbnull into table) occurs the scrip component is never called. I want to kill certain errors and convert them to warning with meaningfull messages and send that to the users. I have been using the OnWarning and OnError events to do this
Issues that i have come across are that i have a number of steps in the dataflow and if a warning/error does occur there is now way to determine which task caused it.
In addition the Error output on the ADO NET called "Set this value to selected cells" always reverts back to "Fail Component" no matter what i change it to.
Why doesn't the Error stream run ? How do i prevent the error event ?

Error: Retrieving the file name for a component failed with error code 0x03B98F74

I have simple SSIS ActiveX Script task that is returning with the above error when executing:
I've cut all the code down to just an empty function:
function main
end function
And have ensured the EntryMethod property of the component is main
Any suggestions?
I came across this same error and found that a connection in the activex script was referencing a dsn name that didn't exist. I added the DSN through control panel -> administrative tools -> Data sources (ODBC) and the issue was resolved.
This useful error will be thrown for ANY error in an ActiveX script task (although the error code will vary). In my particular circumstance it only occurred when running under the 64 bit DTEXEC process which made it convoluted to track down. Hopefully of some use to anyone supporting ancient tech.