I had a task yo import data from Excel spreadsheet to SQL Server table.
Last time I tried to use SQL Server Management Studio import option, but it gave me some not clear errors, that I didn't understand.
So I've created SSIS project in VS and was able to narrow down the errors and import the data.
This time for similar spreadsheet I had some errors again. The output contained the warnings about length of the string column, that usually can be ignored, e.g.:
Warning: 0x802092A7 at First Task, Destination - CompanyCountries : Truncation may occur due to inserting data from data flow column "CountryCode" with a length of 255 to database column "CountryCode" with a length of 50.
Ideally they should be shown only when the data string actually truncated.
After a lot of information traces the errors similar the following were shown:
Error: 0xC0202009 at First Task, Destination 2 - SIPPs : SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unspecified error".
Error: 0xC020901C at First Task, Destination 2 - SIPPs : There was an error with input column "HireCompanyCode" (174) on input "Destination Input" (157). The column status returned was: "The value violated the integrity constraints for the column.".
Error: 0xC0209029 at First Task, Destination 2 - SIPPs : SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Destination Input" (157)" failed because error code 0xC020907D occurred, and the error row disposition on "input "Destination Input" (157)" 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 First Task, DTS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination 2 - SIPPs" (144) failed with error code 0xC0209029. 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: 0xC0047021 at First Task, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0209029. There may be error messages posted before this with more information on why the thread has exited.
Task failed: First Task
SSIS package "ExcelImport.dtsx" finished: Failure.
I wasn't able to find what  and (157) mean- I thought, that it's lines in the data input, but I didn't find issues with particular rows.
I had to remove all constraints and "not null" restrictions from the target SQL table before the import was successful.
When I analyzed imorted data, I understood, that Excel had empty rows at the end, that were tried to import as null values.
By the way, when I included SSIS solution to TFS source control, the file Integration Services Project1.database was included. Previously I renamed the solution and project to the meaningful name, but this file wasn't renamed. Do I need it at all? Can I rename it?