Unicode Native Format bcp

The -N parameter (or widenative value for the DATAFILETYPE clause of the BULK INSERT statement) uses native (database) data types for all noncharacter data, and Unicode character data format for all character (char, nchar, varchar, nvarchar, text, and ntext) data.

Storing information in Unicode native format is useful when information is to be copied from one Microsoft® SQL Server™ installation to another. Using native format for noncharacter data saves time, preventing unnecessary conversion of data types to and from character format. Using Unicode character format for all character data prevents loss of any extended characters when bulk loading data between servers using different code pages. However, a data file in Unicode native format can be read only by the bcp utility and the BULK INSERT statement.

For example, the command to bulk copy the sales table in the pubs database to the Sales.dat data file using Unicode native data format is:

bcp pubs..sales out Sales.dat -N -Sservername -Usa -Ppassword

  

See Also

ServerBCPDataFileType Property

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.