Re: Unable to Drop database
Posted in 2004
KalpanaPai wrote:
> We have informix 9.21 UC2 running on solaris.
So it would be a good idea to upgrade.
> We want to change the database code set from default (ISO8859-1)
> to UTF-8 . I have few questions reg this.
>
> 1. Do i need to set both CLIENT_LOCALE and DB_LOCALE in the server
> before
> dbimport? Developer is telling he will set the code set to UTF-8 in
> appln and browser , do i still need to set CLIENT_LOCALE ?
The server does not need CLIENT_LOCALE. If you set DB_LOCALE for the
server, then when a client with DB_LOCALE set creates a database, the
client setting wins, but if a client creates a database with no value
for DB_LOCALE, then the server DB_LOCALE controls the locale of the
database. Once the database is created, the value of DB_LOCALE is
largely, if not completely, irrelevant.
You probably need to set CLIENT_LOCALE in the application and/or
browser if they access the Informix database.
> 2. Do i need to set at the client application aslo as UTF-8?
I'm not sure exactly what you're asking, but it would be sensible to
make the client work in UTF-8 if you're going to tell the server that
the application works in UTF-8.
> 3. Is there any effect if i don't change SERVER_LOCALE?
Barely - it means that error messages will be generated in the default
locale - en_us.8859-1 - and since the error messages are all in UTF-8
anyway, that's effectively the same thing. You might get some mildly
eccentric results with a table name or similar items where the table
name uses non-ASCII Unicode characters.
> 4. I am just trying on testing box ,
> i have updated the systables
> Update systables set site ='en_US.UTF-8' where tabid in(90,91);
That wasn't a good idea, was it.
> and did import the database.
How? DB-Import creates the database, so you can't dink with that easily.
> Now neither i can drop the database nor i can use it .. ..
So it really wasn't a good idea to go dinking with the system catalog,
was it?
> Later i gone through the GLS directoryand i found that instead of
> en_US.UTF-8 it is en_us.utf8 i changed to same . Even after that same
> problem..
So, it was a really and truly awfully bad idea to go dinking with the
system catalog, wasn't it? The trouble is, the information is stored
in a number of places, not all of them visible, and having
inconsistent information in different places leads to all sorts of
problems, as you have so kindly demonstrated.
> But in the sysdbslocale it shows en_US.819 and systables shows
> en_US.57372.
So, you've screwed things up, haven't you?
> Please suggest how to drop such database as i do not more disk space.
> It is highly appreciated.
Well, it might be simplest to reinitialize the server. I'm not sure
you can usefully contact IBM Technical Support except on a T&M basis
since the product is so old.
> 5. I have created another database with utf8 it is working fine
Good.
> ...but if i give command env in unix it does not show DB_LOCALE..
Where did you give the command? How did you give it? What made you
think it would show up?
> Do i need to set this as permanent env variable ? Please advise me
> your help is highly appreciated.
Once your database is created, I don't think DB_LOCALE is very
significant.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/