mssql exporting stops in validating step - sql-server

I am using microsoft sql server and i am trying to export my database but i get an error in the last step. Here is the full report:
Operation stopped...
- Initializing Data Flow Task (Success)
- Initializing Connections (Success)
- Setting SQL Command (Success)
- Setting Source Connection (Success)
- Setting Destination Connection (Success)
- Validating (Error)
Messages
Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "BookId".
(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: "Destination - BookTable" 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)
- Prepare for Execute (Stopped)
- Pre-execute (Stopped)
- Executing (Success)
- Copying to [dbo].[BookTable] (Stopped)
- Copying to [dbo].[ChartTable] (Stopped)
- Copying to [dbo].[UserTable] (Stopped)
- Post-execute (Stopped)
It seems like there is an error in Validating step.

I am assuming that your Bookid is an AutoIncrement field and you are trying to populate data into that table from another source. You have to use Enable Identity Insert in your mapping to allow the Bookid to be updated.
Also, be sure that your seed is above the last value you inserted in the data exchange or you could run into errors down the road because you turned off safety checks when you overrode the Identity Insert behavior.

Related

SQL Server import and export wizard - change concurrent setting

I am trying to export several (~40) tables using the SQL Server import and export wizard (Right click database -> Task -> Export Wizard).
The wizard allows me to export all tables from database, 1 by 1, without error.
However, when I want to export all tables together, there is an error. I guess it is due to a concurrency issue (because the screen shows 2 tables are exporting together).
Can I change concurrency settings of the wizard? (set maxconcurrentexecutables to 1 in SQL Server). Or, do I need to use SSIS?
The error message is below:
Pre-execute (Error) Messages Error 0xc0202009: Data Flow Task 2: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error
code: 0x80040E37. (SQL Server Import and Export Wizard)
Error 0xc02020e8: Data Flow Task 2: Opening a rowset for "Table16" failed. Check that the object exists in the database. (SQL Server
Import and Export Wizard)
Error 0xc004701a: Data Flow Task 2: Destination 7 - Table16 failed the pre-execute phase and returned error code 0xC02020E8. (SQL Server
Import and Export Wizard)

Import excel to sql server Executing Error (SSIS)

I was trying to import excel file to sql server for the first time and I get this error. Could you please help me? No idea what's going on :|
Operation stopped...
Initializing Data Flow Task (Success)
Initializing Connections (Success)
Setting SQL Command (Success)
Setting Source Connection (Success)
Setting Destination Connection (Success)
Validating (Success)
Prepare for Execute (Success)
Pre-execute (Success)
Executing (Error) Messages
Messages
Error 0xc020901c: Data Flow Task 1: There was an error with Source - Sheet1$.Outputs[Excel Source
Output].Columns[Threat] on Source - Sheet1$.Outputs[Excel Source
Output]. The column status returned was: "Text was truncated or one or
more characters had no match in the target code page.". (SQL Server
Import and Export Wizard)
Error 0xc020902a: Data Flow Task 1: The
"Source - Sheet1$.Outputs[Excel Source Output].Columns[Threat]" failed
because truncation occurred, and the truncation row disposition on
"Source - Sheet1$.Outputs[Excel Source Output].Columns[Threat]"
specifies failure on truncation. A truncation error occurred on the
specified object of the specified component. (SQL Server Import and
Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code
DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - Sheet1$
returned error code 0xC020902A. 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. (SQL Server
Import and Export Wizard)
Copying to [dbo].[Sheet1$] (Stopped)
Post-execute (Success) Messages Information 0x4004300b: Data Flow Task 1: "Destination - Sheet1$" wrote 0 rows. (SQL Server Import and
Export Wizard)
The data which you are importing might be having text bigger than columns size of table.
Maximize the size of the table column and then try.
Check the length for the column Threat on source and destination. Please adjust that according to the length on excel, bascally increase it.
Alternatively, In the Excel source editor and click on error output tab.
Select the column Threat and in Truncation column set the value as Ignore failure.
This should help.
Check out the ideas in this Stackoverflow link enter link description here, then. It might be trying to import some extra blank rows, which you can either allow (by changing the ALLOW NULLS option), or pipe the failed rows into a different dataset in SSIS, to handle the failing rows separately
Are you creating a DFT manually? If so:
1) Create New Excel Connection Manager - Link your excel file
2) Create New OLE DB Connection Manager - Choose your Database and Table.
3) Excel Source
4) Data Conversion - Convert the EXCEL column to DT_STR which makes it Varchar instead of NVARCHAR.
5) OLE DB Destination which is your SQL server table.
Alternatively you could set the column to NVARCHAR and it would match the EXCEL But if it's a VARCHAR column the data needs to be converted to DT_STR in the data conversion. Let me know if you need more help.

SQL Server import from Access

I am trying to copy Access (2013) database tables to SQL Server 2014. Access Database Engine Reports conflict between 64 bit SQL and 32 bit Access. Table > Tasks > Import gives attached Report. There are no relationships and No Indexes.
Can any one help ??
Operation stopped...
Initializing Data Flow Task (Success)
Initializing Connections (Success)
Setting SQL Command (Success)
Setting Source Connection (Success)
Setting Destination Connection (Success)
Validating (Success)
Messages
Warning 0x80049304: Data Flow Task 1: 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.
(SQL Server Import and Export Wizard)
Prepare for Execute (Success)
Pre-execute (Success)
Executing (Success)
Copying to Actions (Error)
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E2F.
An OLE DB record is available. Source: "Microsoft Office Access Database Engine" Hresult: 0x80040E2F Description: "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Actions.Inputs[Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "Destination - Actions.Inputs[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.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Actions" (121) failed with error code 0xC0209029 while processing input "Destination Input" (134). 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)
Post-execute (Success)
Messages
Information 0x4004300b: Data Flow Task 1: "Destination - Actions" wrote 0 rows.
(SQL Server Import and Export Wizard)
It is too clear that there are duplicated rows or null value in MS access.
For the second error, you may need to visit this link or information
https://connect.microsoft.com/SQLServer/feedback/details/573638/ssis-package-failes-with-ole-db-error-when-using-transaction-support-on-sequence-container
The third one results from you may fail the whole package transformation when you encounter an error

Importing xsl into SQL Server table

I'm trying to import an xsl spreadsheet file into a SQL server table using the SQL Server export and import wizard. However, it failed to import and returned following messages:
Validation:
Validating (Warning)
Messages
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to inserting data from data flow column "ObjectName" with a length of 255 to database column "ObjectName" with a length of 31.
(SQL Server Import and Export Wizard)
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to inserting data from data flow column "ShortDescription" with a length of 255 to database column "ShortDescription" with a length of 75.
(SQL Server Import and Export Wizard)
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to inserting data from data flow column "ObjectName" with a length of 255 to database column "ObjectName" with a length of 31.
(SQL Server Import and Export Wizard)
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to inserting data from data flow column "ShortDescription" with a length of 255 to database column "ShortDescription" with a length of 75.
(SQL Server Import and Export Wizard)
Warning 0x80049304: Data Flow Task 1: 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.
(SQL Server Import and Export Wizard)
While copying:
Copying to [dbo].[tblReports] (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 11.0" Hresult: 0x80004005 Description: "Cannot insert duplicate key row in object 'dbo.tblReports' with unique index 'tblReports$SheetName'. The duplicate key value is ().".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - tblReports.Inputs[Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "Destination - tblReports.Inputs[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.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - tblReports" (56) failed with error code 0xC0209029 while processing input "Destination Input" (69). 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)
How can I get this working?
For these two warnings:
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to
inserting data from data flow column "ShortDescription" with a length
of 255 to database column "ShortDescription" with a length of 75. (SQL
Server Import and Export Wizard)
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to
inserting data from data flow column "ObjectName" with a length of 255
to database column "ObjectName" with a length of 31. (SQL Server
Import and Export Wizard)
You should increase the column size because it looks like you have data that isn't falling within the constraints of the column.

Failed importing file in SQL Server Managment studio

In SQL Server Management Studio I exported a table from one database to an .xslx file, then imported it to another database on a different server. It failed to import and gave the following details:
Validating (Error)
Messages
• Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "QuestionID".
(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 - HJFast_Track" (47)" 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)
My best guess is that QuestionID is an auto-incrementing identity field. In order to insert values into that column you'll need to specify.
SET IDENTITY_INSERT YourTable ON
Your other option if that field is an auto-increment identity is leave it out of the import/export and let the sql engine generate keys like it would for any other insert.
Without having the schema of your table in front of me a guess is as good as I can offer.
If you update your question with the structure of the table your trying to insert that might give other clues. For example, if QuestionID is a guid or something.

Resources