Я пытаюсь импортировать данные из электронной таблицы Excel и загрузить их в базу данных SQL Server с помощью служб SSIS.
Это моя таблица SQL Server:
Таблица SQL Server
Я получил сообщение
Усечение может произойти из-за вставки данных из столбца потока данных "CIN" длиной 255 в столбец базы данных "CIN" длиной 50.
для каждого столбца, и после выполнения получился следующий вывод:
SSIS package "C:\Users\Faycal\source\repos\Integration test 2\Integration test 2\Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "CIN" with a length of 255 to database column "CIN" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "NomClient" with a length of 255 to database column "NomClient" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "DRA" with a length of 255 to database column "DRA" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "DPA" with a length of 255 to database column "DPA" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "TypeAgriculteur" with a length of 255 to database column "TypeAgriculteur" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "RaisonSociale" with a length of 255 to database column "RaisonSociale" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "TypeOrganisme" with a length of 255 to database column "TypeOrganisme" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "NomOrganisme" with a length of 255 to database column "NomOrganisme" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "RegistreCommerce/ODECO" with a length of 255 to database column "RegistreCommerce/ODECO" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "CT/CMV/CDA" with a length of 255 to database column "CT/CMV/CDA" with a length of 50.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "CIN" with a length of 255 to database column "CIN" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "NomClient" with a length of 255 to database column "NomClient" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "DRA" with a length of 255 to database column "DRA" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "DPA" with a length of 255 to database column "DPA" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "TypeAgriculteur" with a length of 255 to database column "TypeAgriculteur" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "RaisonSociale" with a length of 255 to database column "RaisonSociale" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "TypeOrganisme" with a length of 255 to database column "TypeOrganisme" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "NomOrganisme" with a length of 255 to database column "NomOrganisme" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "RegistreCommerce/ODECO" with a length of 255 to database column "RegistreCommerce/ODECO" with a length of 50.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [79]: Truncation may occur due to inserting data from data flow column "CT/CMV/CDA" with a length of 255 to database column "CT/CMV/CDA" with a length of 50.
Warning: 0x80049304 at Data Flow Task, SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available. To resolve, run this package as an administrator, or on the system's console.
Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is beginning.
Information: 0x4004300C at Data Flow Task, SSIS.Pipeline: Execute phase is beginning.
Error: 0xC0202009 at Data Flow Task, OLE DB Destination [79]: 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: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Cannot insert the value NULL into column 'ClientID', table 'DW.dbo.Client'; column does not allow nulls. INSERT fails.".
Error: 0xC0209029 at Data Flow Task, OLE DB Destination [79]: 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.
Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (79) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (92). 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.
Error: 0xC0209017 at Data Flow Task, Excel Source [2]: Setting the end of rowset for the buffer failed with error code 0xC0047020.
Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Excel Source returned error code 0xC0209017. 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.
Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning.
Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "OLE DB Destination" wrote 2032 rows.
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Data Flow Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "C:\Users\Faycal\source\repos\Integration test 2\Integration test 2\Package.dtsx" finished: Failure.
The program '[16900] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
Я установил флажок в расширенном редакторе, и столбцы вывода источника Excel и столбцы ввода назначения OLE DB имеют длину 255, но длина столбцов источника и назначения OLE DB внешнего составляет 50, поэтому я попытался изменить типы данных в SSMS от nvarchar (50) до nvarchar (255) и получил этот вывод:
SSIS package "C:\Users\Faycal\source\repos\Integration test 2\Integration test 2\Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Warning: 0x80049304 at Data Flow Task, SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available. To resolve, run this package as an administrator, or on the system's console.
Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is beginning.
Information: 0x4004300C at Data Flow Task, SSIS.Pipeline: Execute phase is beginning.
Error: 0xC0202009 at Data Flow Task, OLE DB Destination [79]: 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: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Cannot insert the value NULL into column 'ClientID', table 'DW.dbo.Client'; column does not allow nulls. INSERT fails.".
Error: 0xC0209029 at Data Flow Task, OLE DB Destination [79]: 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.
Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (79) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (92). 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.
Error: 0xC02020C4 at Data Flow Task, Excel Source [2]: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Excel 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.
Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning.
Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "OLE DB Destination" wrote 2032 rows.
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Data Flow Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "C:\Users\Faycal\source\repos\Integration test 2\Integration test 2\Package.dtsx" finished: Failure.
The program '[11676] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
Почему это происходит? Что мне делать?
П.С .: Я полный нуб во всем этом