3

この質問が繰り返される可能性があることはわかっています。しかし、これで問題になるのは異なります。データのないテーブル「CRM_Doctor_Budget」を既に作成しています。

SQL Server 2008 で作成されたテーブル

Excelファイルからこのテーブルにデータを挿入したい。

インポートおよびエクスポート データ (32 ビット) を使用しています。

私が行う次のステップ:

最初の一歩

第二段階

三段目

5番目のステップ

6番目のステップ

7番目のステップ

8番目のステップ

私が得ているエラー:

- Validating (Error)
Messages
Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "Id".
 (SQL Server Import and Export Wizard)

Error 0xc0202045: Data Flow Task 1: Column metadata validation failed.
 (SQL Server Import and Export Wizard)

Error 0xc004706b: Data Flow Task 1: "component "Destination - CRM_Doctor_Budget" (59)" failed validation and returned validation status "VS_ISBROKEN".
 (SQL Server Import and Export Wizard)

Error 0xc004700c: Data Flow Task 1: One or more component failed validation.
 (SQL Server Import and Export Wizard)

Error 0xc0024107: Data Flow Task 1: There were errors during task validation.
 (SQL Server Import and Export Wizard)

varchar、int、smallint、bit データ型の変換でエラーが発生します。Excel ファイルには、すべてのデータの一般的なデータ型があるためです。そして、すでに作成されたテーブルには、varchar、int、float、smallint、および bit があります。

「ID挿入を有効にする」をチェックした後、エラーは少なくなりますが、エラーは次のとおりです。

Copying to [dbo].[CRM_Doctor_Budget] (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: 0x80004005  Description: "Unspecified error".
 (SQL Server Import and Export Wizard)

Error 0xc020901c: Data Flow Task 1: There was an error with input column "Id" (143) on input "Destination Input" (72). The column status returned was: "The value violated the integrity constraints for the column.".
 (SQL Server Import and Export Wizard)

Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "Destination Input" (72)" failed because error code 0xC020907D occurred, and the error row disposition on "input "Destination Input" (72)" 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.
 (SQL Server Import and Export Wizard)

Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Destination - CRM_Doctor_Budget" (59) failed with error code 0xC0209029 while processing input "Destination Input" (72). 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.
 (SQL Server Import and Export Wizard)
4

2 に答える 2

2

私は問題を解決しました。私は次のようないくつかの変更を加えました:

マッピングの編集:ID列としてIDがあり、自動生成された列であるため。

以前と同じように、Id列をマップしました。

今回はID列をマップせず、[ID挿入を有効にする]のチェックを外しました

それ以外の場合は、そのまま手順を実行します。この小さな変更を行ったところ、レコードが正常にインポートされました。:)助けてくれてありがとう。

于 2013-03-07T07:13:39.180 に答える
1

ID列はID列ですか?その場合、これを機能させるには、[ID挿入を有効にする]チェックボックスをクリックする必要があるためです。

于 2013-03-06T17:17:34.180 に答える