SQLServer-DBA.com Links

Subscribe to newsletter

Dba_db2_button

Powered by TypePad
DataFileType will be assumed to be widechar because the data file has a Unicode signature

19 March,2013 by Jack Vamvas

A SQL Server Agent Job started failing with the “DataFileType will be assumed to be widechar because the data file has a Unicode signature” error.  

 

LogfileI:\mypath\MSSQL$INST1\LOG\bulk.log [SQLSTATE 01000] (Message 0)  Bulk load: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature. [SQLSTATE 01000] (Message 4830)  Bulk load: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature. [SQLSTATE 01000] (Message 4830)   [SQLSTATE 42000] (Error 50000).  The step failed.

 

I fixed the problem by adding the DATAFILETYPE = ‘widechar’ to the BULK INSERT statement . According to SQL Server BOL :

 

DATAFILETYPE = { 'char' | 'native' | 'widechar' | 'widenative' }

Specifies that BULK INSERT performs the import operation using the specified data-file type value.

Widechar = Unicode characters

 

BULK INSERT #File From 'I:\mypath\MSSQL$INST1\LOG\bulk.log ' WITH(DATAFILETYPE = 'widechar',ROWTERMINATOR = '\n');

 Read More

SQL Server Agent Job Steps

SQL Server agent fixed roles




Author: Jack Vamvas (http://www.sqlserver-dba.com)

******** *******

Subscribe to SQLServer-DBA.com

Latest posts delivered to you daily

Delivered by FeedBurner

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer