Source Type 200 in SQL Server Import and Export Wizard?

后端 未结 8 832
南笙
南笙 2021-01-03 23:06

I am trying to import data from one database in a server to a new table in a different server, using SQL Server import and Export Wizard. (SQL Server Management Studio 2012)

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-03 23:44

    A long-term solution (besides Microsoft fixing it) (or have they already?) is also a few links deep from the answers posted.

    On the affected machine, there is an xml file that defines a code-to-value mapping for each transform type.
    What is seen with the "200" & "201" causing a failure, is a missing mapping
    ....well, it shouldn't have come through as "200/201", but as it did, we wish it were mapped

    It can be inserted manually, if you are willing to play with such configurations.

    Here is where I got the answer, quite a ways down the page: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/97ff1f01-c02a-4c9a-b867-8eaecc464cfb/2012-sp1-no-longer-recognizes-common-data-types?forum=sqlintegrationservices

    The mapping files are in C:\Program Files (x86)\Microsoft SQL Server\110\DTS\MappingFiles\
    (or equivalent)

    There is one for each type of source-to-destination transform.

    For going between SQL Servers, look at ones such as
    MSSQLToSSIS10.XML
    MSSql9ToMSSql8.xml
    MSSql10ToMSSql9.xml

    Where you see

    
    
        
            varchar
        
        
            
                DT_STR
                
            
        
    
    

    Add the "200" mapping to match such that you end up with

    
    
        
            varchar
        
        
            
                DT_STR
                
            
        
    
    
        
            200
        
        
            
                DT_STR
                
            
        
      
    

    Fix nvarchar and any others in the same way!

提交回复
热议问题