Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bcp command failure due to UTF8 default charset

832 views
Skip to first unread message

siong-shiumchoong

unread,
Sep 9, 2008, 11:01:43 PM9/9/08
to
Hi,

I have come across bcp error. The error is as follows:
"BCP insert operation is disabled when LONGCHAR capability
is turned on and data size is changing between client and
server character sets since BCP does not support LONGCHAR
yet."

I have tried adding the option -Jutf8 and still does not
work. The charset in both the source and destination
database are using utf8 as 'default character set id' (from
sp_configure).

bcp talks to Sybase ASE through Sybase Open Client. So is
this related to charset set up (locale.dat and etc) in
Sybase Open Client?

Thanks in advance.

Siong Choong

Michael Peppler

unread,
Sep 10, 2008, 1:21:32 AM9/10/08
to

What does "echo $LANG" and "echo $LC_ALL" show?
What does sp_helpsort show?

Thanks,

Michael

siong-shiumchoong

unread,
Sep 10, 2008, 2:58:08 AM9/10/08
to
Thanks Michael. Both LC_ALL and LANG shows up as nothing.
bcp and open client version is rather old (details as
follows). We are using ASE 12.5.4.

Sybase CTBCP Utility/11.1.1/P/sun_svr4/SPARC Solaris
2.5.1/1/OPT/Fri Aug 29 13:57:25 1997

sp_helpsort output is as follows:

Collation Name Collation ID
defaultml 20
thaidict 21
iso14651 22
utf8bin 24
binary 25
gbpinyinnocs_eucgb 26
gbpinyinnocs_cp936 26
gbpinyinnocs_gb18030 26
gbpinyinnocs 26
altnoacc 39
altdict 45
altnocsp 46
scandict 47
scannocp 48
dict 51
nocase_eucjis 52
nocase_sjis 52
nocase_deckanji 52
nocase_eucgb 52
nocase_cp936 52
nocase_gb18030 52
nocase 52
nocasep 53
noaccent 54
espdict 55
espnocs 56
espnoac 57
rusnocs 59
cyrnocs 64
elldict 65
hundict 69
hunnoac 70
hunnocs 71
turknoac 73
turknocs 74
gbpinyin_eucgb 163
gbpinyin_cp936 163
gbpinyin_gb18030 163
gbpinyin 163

Loadable Sort Table Name Collation ID
cp932bin 129
dynix 130
gb2312bn 137
cyrdict 140
turdict 155
euckscbn 161
rusdict 165
sjisbin 179
eucjisbn 192
big5bin 194


Character Set = 190, utf8
Unicode 3.1 UTF-8 Character Set
Class 2 Character Set
Sort Order = 25, binary
Binary ordering for UTF-16

Cory Sane

unread,
Sep 10, 2008, 10:57:45 PM9/10/08
to
Can you use a newer version?


--
Cory Sane
[TeamSybase]
Certified Sybase Associate DBA for ASE 15.0
"Siong-Shium Choong" wrote in message
news:48c77000.177...@sybase.com...

siong-shiumchoong

unread,
Sep 10, 2008, 11:45:14 PM9/10/08
to
I have latest Sybase Open Client installed in my PC and
tried the same command. It failed with the same error
message. The older version of Open Client is installed in
sun unix box.

Thanks.

SybaseNeal

unread,
Sep 11, 2008, 10:06:54 AM9/11/08
to
Hello,

That is a known limitation of old versions of bcp:
http://www.sybase.com/detail?id=1009185

A new parameter "-Y" was added to bcp 12.5 ESD#9 and higher that
forces bcp to do client side character set conversion rather than
letting ASE do the character conversion.

Thanks,
Neal

siong-shiumchoong

unread,
Sep 11, 2008, 9:25:34 PM9/11/08
to
Thanks. It works finally with -Y option on bcp 12.5 ESD#12!!
0 new messages