Steps to reproduce the problem
Note To reproduce the behavior, you must add the Japanese language
locale by using Regional and Language Options in Control Panel. You must then
create a database table in an instance of Microsoft SQL Server, and then you
must use the
bcp utility to import a text file.
For additional
information, click the following article number to view the article in the
Microsoft Knowledge Base:
177561�
How to add and enable additional languages in Windows
- Use Regional and Language Options in Control Panel to add
the Japanese language locale on the computer.
- Start SQL Query Analyzer.
- On the File menu, click
New. The New dialog box appears.
- Click Blank Query Window, and then click
OK.
- Paste the following code in the query window:
CREATE DATABASE BcpTestDB
COLLATE JAPANESE_CI_AS
go
USE BcpTestDB
go
CREATE TABLE [dbo].[BcpTestTable] (
col1 int NULL ,
col2 char(10) COLLATE Japanese_CI_AS NULL ,
col3 char(10) COLLATE Japanese_CI_AS NULL ,
col4 char(10) COLLATE Japanese_CI_AS NULL ,
col5 char(10) COLLATE Japanese_CI_AS NULL ,
col6 char(10) COLLATE Japanese_CI_AS NULL ,
col7 char(10) COLLATE Japanese_CI_AS NULL ,
col8 char(10) COLLATE Japanese_CI_AS NULL ,
col9 char(10) COLLATE Japanese_CI_AS NULL ,
col10 char(10) COLLATE Japanese_CI_AS NULL ,
col11 char(10) COLLATE Japanese_CI_AS NULL
) ON [PRIMARY]
GO
This code creates the BcpTestDB database and the BcpTestTable
table. - On the Query menu, click
Execute to run the query. The BcpTestDB database and the
BcpTestTable table are created.
- Create a text file that is larger than 32 MB and that
contains the information that uses the DBCS, and then save the file as
LargeFile.txt.
- Click Start, click Run,
type cmd, and then click OK.
- At the command prompt, type the following, and then press
ENTER:
bcp BcpTestDB.dbo.BcpTestTable in Source Folder\LargeFile.txt -T -c -S(local) -C932 -e Destination Folder\LargeFileError.txt
Notes- The C switch option in the bcp utility is the code page specifier.
- 932 is a code page for the Japanese
language.
- Destination Folder is a
placeholder for the folder where you create the LargeFileError.txt error
file.
You may notice that the data from the LargeFile.txt file is not
imported to the BcpTestTable table. You may also notice error text that is
generated in the LargeFileError.txt file in the
Destination
Folder folder.