简体   繁体   中英

Postgresql to Sql Server 2008 Table Transfer

I'm using postgresql (Pgadmin Version 1.18.0), i export three(I need only 3 tables) table(Contains Online Transaction information) data's into csv format using the query

copy to 'D:\orders\new\users.csv' DELIMITER ';' CSV HEADER

I got perfect result using the query. Now i open the ssms(Sql Server 2008) and using the Import and Export data option i import the users.csv file to sql server 2012 by using "Flat File Service Data Source". at last while i click the Finish Button it throws the following error Messages

--Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for 
column "address" returned status value 4 and status text "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 - users_csv.Outputs[Flat File Source 
Output].Columns[address]" failed because truncation occurred, and the truncation row 
disposition on "Source - users_csv.Outputs[Flat File Source Output].Columns[address]" 
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 - users_csv returned error code 0xC0202092.  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)

Please help me out. Sorry if it's vague.

Thanks in Anticipation.

Regards, Keerthi

Your data's size exceeds the field size. Extend the size of your address field in the target table. If you still get the error, check the "Advanced" Option in the Import and Export Wizard. You can set the OutputColumnWidth for each column there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM