The DB_LOCALE needs to be the same as the one the database was created with.
Check in sysmaster database. There is a table of databases with the locale identifier sydbslocale . The id in the table is a sortiert of internal identifier which might not be equal to the environment setting, but it will give you a hint.
Marcus
Original Message:
Sent: 4/9/2023 10:24:00 PM
From: nasiha zailan
Subject: RE: How to compile dbdelete utility for utils2_ak file
Hi, i stil got the same error, Below is my locale setup;
What did i do wrong?
------------------------------
nasiha zailan
------------------------------
Original Message:
Sent: Thu March 30, 2023 08:39 AM
From: Art Kagel
Subject: How to compile dbdelete utility for utils2_ak file
Nasiha:
The error, -23101, is a locale error. Your current locale does not match the locale of the database:
$ finderr 23101
-23101 Unable to load locale categories.
An invalid locale name was supplied for the locale initialization.
The environment variable specifying the locale category has a wrong
value.
Check the value of the corresponding environment variable,
CLIENT_LOCALE or DB_LOCALE. If this error was encountered when using
the "SET COLLATION" statement, check that the value passed to the
statement is a valid locale. If this error was encountered when using
the "SET NO COLLATION" statement, check that the session's default
locale file is still available. Also check if INFORMIXDIR points to
a valid directory where IBM Informix products are installed.
If a client application receives this error when it requests a database
server connection, check that the client and database locales are
compatible. They are compatible if a valid locale exists on the server
computer with the name lg_tr.codeset@mod, where lg_tr (language and
territory) and mod (locale modifier) are from the CLIENT_LOCALE and
codeset is from the database locale (from the DB_LOCALE, if it is set,
or as stored in the database).
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Thu March 30, 2023 12:39 AM
From: nasiha zailan
Subject: How to compile dbdelete utility for utils2_ak file
Hello Art, anyway do you have any idea why my execution got error? Did i missed something?
Thanks.
------------------------------
nasiha zailan
Original Message:
Sent: Wed March 29, 2023 11:37 AM
From: Art Kagel
Subject: How to compile dbdelete utility for utils2_ak file
Thanks. Making things more Windows friendly. This is the first time anyone has told be about trying to build any utils2_ak utilities on Windows. Always wondered.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Wed March 29, 2023 10:31 AM
From: Andreas Legner
Subject: How to compile dbdelete utility for utils2_ak file
You're welcome!
And yes, that was the most obvious 'modification' required, yes ;-)
Others:
- remove #include <unistd.h>
- dbdelete.ec: extern char *optarg; - shouldn't this be required on non-Windows too, or are you relying on native getopt there?
- dbdelete.ec: replaced nanosleep loop by Sleep(ms)
- getopt.c: changed an #include <strings.h> into #include <string.h>
- getopt.c: malloc instead of __alloca
I also compiled with -static, so no CSDK should be required for running (increases size from 38kB to nearly 2MB).
Andreas
------------------------------
Andreas Legner
Original Message:
Sent: Wed March 29, 2023 10:14 AM
From: Art Kagel
Subject: How to compile dbdelete utility for utils2_ak file
Oops, that compile line should be:
esql -o dbdelete dbdelete.ec getopt.c
Not getopt.ec.
Thanks Andreas.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Wed March 29, 2023 06:37 AM
From: Art Kagel
Subject: How to compile dbdelete utility for utils2_ak file
Arg! Yes, I did miss that. Thanks Doug.
OK, compiling on Windows is not covered in the BUILDING file.
Nasiha: OK, this presents a couple of problems. First, I do not know how to expand the shell archive that contains the source code. So, please email me directly (art.kagel@gmail.com) and I will get you a standard zip file that you can unpack on Windows. The makefile it contains is not compatible with the Microsoft make utility which is non-standard (of course it is). So, here's the compile line. You can compile dbdelete like this:
esql -o dbdelete dbdelete.ec getopt.ec
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Wed March 29, 2023 03:13 AM
From: Doug Lawry
Subject: How to compile dbdelete utility for utils2_ak file
Hi Nasiha.
I think Art may have missed that you are on Windows where compiling dbdelete might be very challenging! You could use stored procedure sp_dbdelete which is named in deference to Art and provides the basics:
https://www.oninitgroup.com/faq-items/informix-stored-procedure-for-mass-delete
------------------------------
Doug Lawry
Oninit Consulting
Original Message:
Sent: Tue March 28, 2023 10:04 PM
From: nasiha zailan
Subject: How to compile dbdelete utility for utils2_ak file
Hello, Anyone knows how to implement or compile dbdelete utility for utils2_ak file? My computer environment is windows and i have no idea how to compile and apply it into the informix.
------------------------------
nasiha zailan
------------------------------