2016-10-18 16 views
0

sysssislogテーブルのデータをメモ帳(.txt)ファイルに格納しており、SQL Serverデータベースにデータを転送する必要があります。テキストファイルからデータベースにデータを転送する方法

SQL Serverでテーブルを作成しました。 SSISパッケージを使用してデータをテーブルに転送する必要があります。作業中にこのエラーが表示されました。

誰でも解決方法を知っていますか?実際よりも多くのエラーがあるように見えるので、どうもありがとう

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

SSISメッセージが時々混乱することができます。この場合、最初のエラーはキーです:Violation of PRIMARY KEY constraint他のすべては、タスクの完了を妨げる少なくとも1つのエラーがあったことを知らせます。

マッピングを確認し、テーブルに設定した主キーに重複する値を入力していないことを確認します。

0

あなたは、SQL ServerデータベースにデータをインポートするBCPを使用することができます。ここでは

は、ファイルからデータをインポートするための簡単なコマンドです:

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

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

+0

は、私はこの問題を解決し、bassrekありがとうございます。確かに、私はBCPを試して使用します、ありがとう – RInfo

関連する問題