Skip to Content

Getting error while running the charset utility in sybase ase

May 18, 2017 at 03:08 PM


avatar image
Former Member

I am trying to change the default charset to utf8 from iso_1 by executing the charset utility, but while running the utility I am getting below error.

Please advice !!

CT-LIBRARY error: ct_connect(): user api layer: external error: The connection failed because of invalid or missing external configuration data.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Mark A Parsons May 18, 2017 at 03:46 PM

Did you make sure your SYBASE environment variable was set?

Did you try sourcing the SYBASE.{sh|csh|bat} script before running charset?

What does charset -v show?

What's the actual/complete charset command you're running?

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

yes environment variable is set properly and I am using this command to execute this utility.

$SYBASE/$SYBASE_ASE/bin/charset -S Servername -U sa utf8

charset -v is showing the sybase copyright information along with this

Charset/15.7/EBF 23413 SMP SP130 /P/x86_64 Enterprise Linux/ase157sp13x/3819/64-bit/OPT/Fri Aug 22 22:47:39 2014

Mark A Parsons May 19, 2017 at 01:36 PM

My charset -v: Charset/15.7/EBF 26397 SMP SP138 /P/x86_64/Enterprise Linux/ase157sp138x/4002/64-bit/OPT/Mon Aug 29 06:13:15 2016

When I run your command (typed exactly as you've provided) I get:

$ charset -S ASE200 -U sa utf8
Please enter SA Password:

Error.  Unable to open file '/opt/sybase/ASE_157_SP138/charsets/-U/ASE200'.

The issue here is that charset doesn't like spaces between the option flags and the associated values. So when I remove the spaces from between the -S/ASE200 and -U/sa pairs I get:

$ charset -SASE200 -Usa utf8
Please enter SA Password:
Loading file ''.

Found a [sortorder] section.

This is Class-1 sort order.

Finished loading the Character Set Definition.

Finished loading file ''.

1 sort order loaded successfully

The reason I show this example is that I'm surprised you don't get a similar error message when you run your command with spaces between the option flags and the associated values ... ?


I do recall in the past seeing various issues with OCS-based programs that had something to do with various configurations under the ${SYBASE_OCS} sub-directory.

As an example, my installation does not includes an OCS-15_0/config/ocs.cfg file (this is normally created by the end user/DBA for specific purposes - I don't have any such purposes so the file does not exist). If I create/touch the ocs.cfg file (ie, file now exists but has nothing in it) and re-run the charset program I get:

$ charset -SASE200 -Usa utf8
Please enter sa's Password:
Error return 0 from "ct_init()"; line 603.

And if I remove the ocs.cfg file then charset program works as expected.

While my error message isn't the same as yours, it does show that the charset program does use the ocs.cfg file (if it exists) so I'm wondering if you have an ocs.cfg file under the OCS-15_0/config subdirectory and if so, what's in the file?


Alternatively ...

Have you tried opening a case with tech support?

Have you turned up anything useful from a quick google search, eg:
10 |10000 characters needed characters left characters exceeded