SQL Server2012 when using the Import and Export Wizard, the data source type becomes 202 or 203 when the SQL statement is used as the data source

Source: Internet
Author: User
Tags microsoft sql server ssis

When using MS SqlServer2012 for data export, the query statement used was exported, but an error occurred:

"An unknown column type conversion was found for XX
You can only save this package "

When you click the column to see the detailed error message, you can see:

[Source information]
SOURCE Location: 192.168.1.97
SOURCE provider: SQLNCLI11
Table: [Query]
Column: ItemSize
Column type: 203
SSIS type: (Type unknown ...)
Mapping file (to SSIS type): C:\Program files (x86) \microsoft SQL Server\110\dts\mappingfiles\mssqltossis10.xml

[Target Information]
Target location: C:\Users\Administrator\Desktop\ Mars Company _ test _ _201705181134.xls
Target provider: microsoft.jet.oledb.4.0
Table: ' Query '
Column: ItemSize
Column type: VarChar
SSIS type: Unicode string [DT_WSTR]
Mapping file (to SSIS type): C:\Program files (x86) \microsoft SQL Server\110\dts\mappingfiles\jettossis.xml

[Conversion Steps]
Convert unknown ...
SSIS transform files: C:\Program files (x86) \microsoft SQL Server\110\dts\binn\dtwtypeconversion.xml

In a post in csdn, we found some information:

This is a bug that explains the cause and solution
https://connect.microsoft.com/SQLServer/feedback/details/775897/ Sql-server-import-and-export-wizard-does-not-recognise-varchar-and-nvarchar

The above link describes:

Describe
When the input is retrieved through a query using SQL Server Import and Export Wizard data in SQL Server 2012, the varchar type is recognized as "200" and the nvarchar type "202". This causes the wizard to display a warning/error for the data type of "review" similar to the following: 14 unknown column type conversion (S) You can only save packagethis means that the data transfer cannot be performed and the wizard can only save issues that are transferred to the SSIS package. Appears to appear only in the SQL Server Import and Export Wizard section of the data source query-Specifying table replication or query in query specified data transfer. Selecting the "Copy data from one or more tables or views" option specifies that the table copy or query section seems to recognize that the varchar and nvarchar data types are correct.

It has been pointed out in the product theory that you can create a view of your query statements, and then export them with a view as normal, I haven't tried.

Microsoft staff said the above feedback was duplicated, so another link was sent:
https://connect.microsoft.com/sqlserver/feedback/details/772761/ Dtswizard-in-sql-2012-sp1-no-longer-recognizes-nvarchar-varchar-data-types-when-source-is-a-query
In the above link, it seems that Microsoft has fixed the bug;
But I didn't see how to fix it, and I still have the problem.

It has been pointed out that you can look at this link:
https://social.msdn.microsoft.com/forums/sqlserver/en-us/97ff1f01-c02a-4c9a-b867-8eaecc464cfb/2012- Sp1-no-longer-recognizes-common-data-types?forum=sqlintegrationservices

I can't see it.


Fortunately I installed two client, finally I use my sqlserver2008 solved the problem, but the solution is not thorough ah.

SQL Server2012 when using the Import and Export Wizard, the data source type becomes 202 or 203 when the SQL statement is used as the data source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.