3

It seems that previous versions of SQL Server's Import / Export wizard would allow you to ignore errors or truncation issues.

However, the 2014 version has no such option. I am trying to import a flat file of around 6 million records, and it choking around 400k records saying there is a truncation error.

How can I do this in SQL Server 2014?

HEre is the error report from the import attempt:

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)

  • Saving (Success)

  • Prepare for Execute (Success)

  • Pre-execute (Success) Messages Information 0x402090dc: Data Flow Task 1: The processing of file "C:\temp\allvoters_take3\allvoters_take3.csv" has started. (SQL Server Import and Export Wizard)

  • Executing (Success)

  • Copying to [dbo].[vf] (Stopped) Messages Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "PrimaryAddress1" 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 - allvoters_take3_csv.Outputs[Flat File Source Output].Columns[PrimaryAddress1]" failed because truncation occurred, and the truncation row disposition on "Source - allvoters_take3_csv.Outputs[Flat File Source Output].Columns[PrimaryAddress1]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component. (SQL Server Import and Export Wizard)

Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "C:\temp\allvoters_take3\allvoters_take3.csv" on data row 493508. (SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - allvoters_take3_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)

  • Post-execute (Success) Messages Information 0x402090dd: Data Flow Task 1: The processing of file "C:\temp\allvoters_take3\allvoters_take3.csv" has ended. (SQL Server Import and Export Wizard)

Information 0x4004300b: Data Flow Task 1: "Destination - vf" wrote 489440 rows. (SQL Server Import and Export Wizard)

Matt Braynard
  • 31
  • 1
  • 3
  • see bottom of http://msdn.microsoft.com/en-us/library/bb895363.aspx why do you think it cannot do it? – Daniel E. Jul 30 '14 at 00:10
  • 1
    Because the 'Review Data Type Mapping' screen does not exist and that documentation page does not apply to 2014. I have already read it; that screen does not exist. – Matt Braynard Jul 30 '14 at 00:33
  • can you use SSIS proper? – Daniel E. Jul 30 '14 at 01:09
  • How would I use that? How would I find that? Right now, I open the 'SQL Server IMport and Export Wizard' and work from there. – Matt Braynard Jul 30 '14 at 01:24
  • visual studio integration services project. – Daniel E. Jul 30 '14 at 01:47
  • I'm afraid that you just telling me that doesn't actually help me in any way. I don't know what those words mean. I have a flat file that keeps chocking on import due to a truncation error. It seems like there should be an easy fix.... – Matt Braynard Jul 30 '14 at 01:53
  • I just tried to purposefully make a record fail due to truncation, there was no error, but it just imported the truncated strings. However I also didn't see any way to specify that behaviour... – Daniel E. Jul 30 '14 at 03:14
  • Check out http://stackoverflow.com/questions/18600040/errors-in-sql-server-while-importing-csv-file-despite-varcharmax-being-used-fo the accepted answer there might help you get past the errors – Daniel E. Jul 30 '14 at 03:23

0 Answers0