DOSTATS in UTF8 Databases created with GLUSE_GLU=1 / Mix UTF8 and ISO Databases in one Instance?
Posted in 2023
Andreas Weis found dostats fails with error -23101 when GL_USEGLU=1 for UTF-8 databases. Andreas Legner said UTF-8 databases with and without GLU cannot be accessed together and non-UTF databases are unaffected. Art Kagel suggested the -S flag, which changed only the message. Andreas worked around it by setting GL_USEGLU=0 in the dostats cron jobs.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Internationalization & Character Sets
Hello all We have a Instance with UTF-8 Databases. The Databases were created with GLUSE_GLU=1. It seems that everything runs well, like it should do. The Parameter was set bevore the Instance starts. One thing is, that the dostats tool will not start. When GLUSE_GLU=1 is set it. If we set GLUSE_GLU=0 before it starts working: informix@ARDB202V0S0D00-utf8devil_in02:/tmp/sqli%dostats -d database1 FAILED: Cannot connect to SMI DATABASE (@utf8devil_in02_soc); error=-23101, isam=0 informix@ARDB202V0S0D00-utf8devil_in02:/tmp/sqli%GL_USEGLU=0 informix@ARDB202V0S0D00-utf8devil_in02:/tmp/sqli%dostats -d database1 Warning! Optimized servers produce statistics fastest with PSORT_NPROCS set. Warning! Optimized servers produce statistics fastest with PSORT_DBTEMP set. Warning! Optimized servers produce statistics fastest with DBUPSPACE set. Working on database: database1. ... I firstly thought that it is a Problem when mix Standard ISO Database (GLUSE_GLU not set when creating the database, bevore server start) and UTF8 Databases (GLUSE_GLU was set bevor server start) on one instance. But it also does not work, when the Instance holds only proper utf8 Databases created wird gluse_glu=1. Anyone on idea where the Problem could be? Unsetting the parameter bevor starting dostats is off course no big deal, but perhaps there is a bigger Problem behind it? By the way... Regarding GL_USEGLU environment variable help page it should be possible to mix non UTF8 Databases created without GLUSE_GLU and UTF8 Databases with GLUSE_GLU in one Instance. Do I get it right? Or refers to the restriction mentioned in the site above: Within a database instance, all UTF-8 databases must be created with GL_USEGLU set, or they must all be created without GL_USEGLU set. Do not create some UTF-8 databases with GL_USEGLU set and others without it set. to all databases of an instance regardless of whether UTF8 or ISO? Thank You very much in Advance for you help ------------------------------ Andreas Weis ------------------------------
Afaik, you can have both non-USEGLU and USEGLU UTF databases in same instance, BUT you only every could access one set of them: if server got started with GL_USEGLU on you'd be able to access the USEGLU UTF databases and vice versa. (ISAM error -103 - "illegal key descriptor" - for a system catalog table is a typical error you'd get when trying to open a UTF8 database with the wrong, or missing, GL_USEGLU setting.) So, when using UTF8 databases in an instance, make up your mind early and then stick with this decision. As for clients, esp. statically linked ESQL/C ones which your dostats might be, -23101 can be a consequence of the ICU libs in your runtime environment not matching those of the utility's build enviroment. HTH, Andreas ------------------------------ Andreas Legner ------------------------------
Hallo Andreas Thank You for your answer. Just one little question about it. You write "BUT you only every could access one set of them". This is only related to UTF8 Databases, or? Accessing non utf8 Datbases is possible wheter GL_USEGLU is set or unset? It is clear for me, that all utf8 Databases in an Instance should be with or without gluse. So, if we have an older Instances which only holds Databases with DB_LOCALE=en_US.819 und GL_USEGLU not set. It would be fine to add one or more UTF8 Databases with GL_USEGLU=1. Is this right? Beause auf dostats I also thought that it could be a Problem while building it, Perhaps Art is reading it here, and give me a hint how to solve it :) Thank You very much in advance for all your help ------------------------------ Andreas Weis ------------------------------
Yes, that's my understanding, non-UTF databases should be unaffected from GL_USEGLU, so adding new UTF databases with GL_USEGLU should have no effect on their accessibility. ------------------------------ Andreas Legner ------------------------------
Andreas: So, the problem with the -23101 error when GLUSE_GLU is not set is that dostats wants to connect, separately, to both the database it is working on and the sysmaster database in order to gather a list of databases to process if you do not specify one with the -d flag. By default, however, dostats connects to sysmaster even if you do pass in -d. Your environment is set up with a DB_LOCALE that matches your UTF8 databases, however, the sysmaster database was created with a different locale (likely just the default C locale) and so the locale of dostats does not match the sysmaster locale. If you add the -S flag and specify a single database with -d then dostats will not attempt to connect to sysmaster at all, so that resolves the -23101 error. On the issue with it not starting when you have GLUSE_GLU set, that one I have no idea. Perhaps you will have to set GLUSE_GLU at compile time to enable some library. Dunno. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
Hello Art Thank you for your fast responce. I have tested your two suggestions. There were no changes when using a binary which was build wir GLUSE_GLU=1. Adding the -S Parameter changes only the Errormassage from: dostats -d database1 FAILED: Cannot connect to SMI DATABASE (@instance); error=-23101, isam=0 to dostats -d database1 -S FAILED: Cannot connect to WORK DATABASE (@instance); error=-23101, isam=0 As workaround I have added GLUSE_GLU=0 to our dostat cron jobs. With this it is possible to execute your great tool without any problems on a instance which was started with GLUSE_GLU=1 set :) ------------------------------ Andreas Weis ------------------------------
Andreas: Yea, in my head I had you setting GLUSE_GLU=0 in the dostats environment along with the -S flag. I guess that didn't make it into my response. I'm glad you worked that out. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------