0
votes

I have data from sysssislog table in notepad (.txt) file, and I need to transfer data into the SQL server database.

I made table in sql server. Data should be to transfer in table using SSIS packages. During the work appeared to me this error.

Does anyone know how to solve it? Thanks a lot

SSIS packages scheme

[OLE DB Destination [113]] 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: "Violation of PRIMARY KEY constraint 'PK__sysssisl__3213E83F530E2571'. Cannot insert duplicate key in object 'dbo.sysssislog'. The duplicate key value is (0).".

[OLE DB Destination [113]] 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" (113) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (126). 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.

[Flat File Source [56]] 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 Flat File Source which returns 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.

2

2 Answers

2
votes

SSIS messages can be confusing at times because it looks like there are more errors than there really are. In this case, the first error is key: Violation of PRIMARY KEY constraint All of the others after it are letting you know there was at least one error preventing the task from completing.

Check your mapping and ensure that you're not entering duplicate values into whatever Primary Key you've set for the table.

0
votes

You can Use BCP to Import your data into SQL Server database:

Here is a simple command for importing data from file:

C:\example.txt into table dbo.example.

bcp dbo.example in 'C:\example.txt' -T -SserverName\instanceName