Warning: DB_LOCALE environment variable does not match locale of the database
Posted in 2006
Topics: Server Administration, Platform-Specific Issues, Internationalization & Character Sets, Versions, Editions & End-of-Life
Hi!
When executing sql statements against a database in an informix
9.40.fc7 database server running on AIX 5.3 this warning message is
generated:
Warning: DB_LOCALE environment variable does not match locale of the
database
The client process environment is:
SERVER_LOCALE not set
CLIENT_LOCALE not set
DB_LOCALE not set
The server process environment is:
onstat -g env SERVER_LOCALE
....
SERVER_LOCALE en_US.819
onstat -g env CLIENT_LOCALE
....
CLIENT_LOCALE <NULL>
onstat -g env DB_LOCALE
.....
DB_LOCALE <NULL>
Database locale is:
echo "select tabname,site from systables where tabid=90" | dbaccess
atgsys 2>/dev/null
.....
tabname GL_COLLATE
site sv_SE.819
echo "select tabname,site from systables where tabid=91" | dbaccess
atgsys 2>/dev/null
.....
tabname GL_CTYPE
site sv_SE.819
Why do we get the warning message? I wonder because we didn't get it
running IDS 7.31.UC3 on AIX 4.3.2 with the same client and server
process environments and the same database locale. We also don't get it
(in the IDS 9.40.fc7 AIX 5.3 case) if the server process environment
is:
onstat -g env SERVER_LOCALE
....
SERVER_LOCALE sv_SE.8859-1
onstat -g env CLIENT_LOCALE
....
CLIENT_LOCALE sv_SE.8859-1
onstat -g env DB_LOCALE
....
DB_LOCALE sv_SE.8859-1
Regards Christian Eriksson
We also don't get it
> (in the IDS 9.40.fc7 AIX 5.3 case) if the server process environment
> is:
>
> onstat -g env SERVER_LOCALE
> ....
> SERVER_LOCALE sv_SE.8859-1>
> onstat -g env CLIENT_LOCALE
> ....
> CLIENT_LOCALE sv_SE.8859-1>
> onstat -g env DB_LOCALE
> ....
> DB_LOCALE sv_SE.8859-1>
>
You don't get the warning with these settings because you are using a
Swedish locale which matches what database was created with.
When you use the default locale its an english/american locale
"en_us", not swedish as per what your database was created with so you
get the warning.
as to why you didn't get it on 7.31, that would depend what the locale
of the database was set to when it was created.
scottishpoet skrev:
> We also don't get it
> > (in the IDS 9.40.fc7 AIX 5.3 case) if the server process environment
> > is:
> >
> > onstat -g env SERVER_LOCALE
> > ....
> > SERVER_LOCALE sv_SE.8859-1> >
> > onstat -g env CLIENT_LOCALE
> > ....
> > CLIENT_LOCALE sv_SE.8859-1> >
> > onstat -g env DB_LOCALE
> > ....
> > DB_LOCALE sv_SE.8859-1> >
> >
>
> You don't get the warning with these settings because you are using a
> Swedish locale which matches what database was created with.
>
> When you use the default locale its an english/american locale
> "en_us", not swedish as per what your database was created with so you
> get the warning.
>
> as to why you didn't get it on 7.31, that would depend what the locale
> of the database was set to when it was created.
I agree about the logic of getting the error message. The strange thing
is we haven't got it in the 7.31UC3 case despite the database being
created with the same db locale:
GL_COLLATE sv_SE.819
GL_CTYPE sv_SE.819
About the current 9.40.FC7 case:
What database locale is used in the client server data interchange?
Does the database locale (as stored in the database (GL_COLLATE and
GL_CTYPE)) take precedence over the not set DB_LOCALE environment
variable? Should I worry about "losing" swedish characters?
Regards Christian
7.31.UC3 is very very old it might have been a bug that it wasn't received there or a new feature they added after that version its really up to you how worried you on the potential for "losing" characters or not sorting in the order you expect to sort in
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g