Problem with UTF8 and Default Roles
Posted in 2007
Topics: Stored Procedures & SPL, Server Administration, Security, Permissions & Auditing, Platform-Specific Issues, Internationalization & Character Sets
Can anyone else replicate this? I get a -23103 error when trying to use
dbschema on a UTF8 database that contains default roles. If the
database is not UTF8, everything works fine.
I've replicated it on 10.00.UC6, FC5, FC6, FC7 on Solaris, AIX, and
Linux. I have a PMR open, but the engineer working the case has so far
been UNABLE to replicate it.
Here's what you need to do:
$ export DB_LOCALE=en_US.utf8
$ dbaccess -a sysmaster << EOF
> CREATE DATABASE testdb WITH BUFFERED LOG;
> GRANT CONNECT TO "tgirsch"; > CREATE ROLE "ifmxdba";
> EOF
Database selected.
Database closed.
Database created.
Permission granted.
Role created.
Database closed.
$ dbschema -d testdb -ss
DBSCHEMA Schema Utility INFORMIX-SQL Version 10.00.FC6
Copyright IBM Corporation 1996, 2006 All rights reserved
Software Serial Number AAA#B000000
grant dba to "informix";
grant connect to "tgirsch";
create role "ifmxdba" ;
revoke usage on language SPL from public ;
grant usage on language SPL to public ;
$ dbaccess testdb << EOF
> GRANT DEFAULT ROLE "ifmxdba" TO "tgirsch"; > EOF
Database selected.
Permission granted.
Database closed.
$ dbschema -d testdb -ss
DBSCHEMA Schema Utility INFORMIX-SQL Version 10.00.FC6
Copyright IBM Corporation 1996, 2006 All rights reserved
Software Serial Number AAA#B000000
grant dba to "informix";
grant connect to "tgirsch";
create role "ifmxdba" ;
grant "ifmxdba" to "tgirsch" ;
-23103 - Code-set conversion function failed due to illegal sequence or
invalid value.
A repeat test with DB_LOCALE unset shows that everything works fine, then:
$ dbaccess sysmaster << EOF
> DROP DATABASE testdb; > EOF
Database selected.
Database dropped.
Database closed.
$ unset DB_LOCALE
$ dbaccess sysmaster << EOF
> CREATE DATABASE testdb WITH BUFFERED LOG;
> GRANT CONNECT TO "tgirsch"; > CREATE ROLE "ifmxdba";
> EOF
Database selected.
Database closed.
Database created.
Permission granted.
Role created.
Database closed.
$ dbschema -d testdb -ss
DBSCHEMA Schema Utility INFORMIX-SQL Version 10.00.FC6
Copyright IBM Corporation 1996, 2006 All rights reserved
Software Serial Number AAA#B000000
grant dba to "informix";
grant connect to "tgirsch";
create role "ifmxdba" ;
revoke usage on language SPL from public ;
grant usage on language SPL to public ;
$ dbaccess testdb << EOF
> GRANT DEFAULT ROLE "ifmxdba" TO "tgirsch"; > EOF
Database selected.
Permission granted.
Database closed.
$ dbschema -d testdb -ss
DBSCHEMA Schema Utility INFORMIX-SQL Version 10.00.FC6
Copyright IBM Corporation 1996, 2006 All rights reserved
Software Serial Number AAA#B000000
grant dba to "informix";
grant connect to "tgirsch";
create role "ifmxdba" ;
grant "ifmxdba" to "tgirsch" ;
grant default role "ifmxdba" to "tgirsch" ;
revoke usage on language SPL from public ;
grant usage on language SPL to public ;
$
Thomas J. Girsch wrote:
> Can anyone else replicate this? I get a -23103 error when trying to use
> dbschema on a UTF8 database that contains default roles. If the
> database is not UTF8, everything works fine.
>
> I've replicated it on 10.00.UC6, FC5, FC6, FC7 on Solaris, AIX, and
> Linux. I have a PMR open, but the engineer working the case has so far
> been UNABLE to replicate it.
Yes... I could do it... I just had to change the LANG variable to en_US.8859-1
Repeat your test with LANG=en_US.UTF-8 or set your CLIENT_LOCALE to utf8
Apparently it's related to field defrole from the sysusers table, but to be
honest it's too late for me...
Please make some tests, tell the engineer about it and eventually give us some
feedback.
Regards,
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
On Nov 1, 3:57 pm, Thomas J. Girsch wrote:
> Can anyone else replicate this? I get a -23103 error when trying to use
> dbschema on a UTF8 database that contains default roles. If the
> database is not UTF8, everything works fine.
>
> I've replicated it on 10.00.UC6, FC5, FC6, FC7 on Solaris, AIX, and
> Linux. I have a PMR open, but the engineer working the case has so far
> been UNABLE to replicate it.
I can reproduce it with IDS 10.00.UC5 on Solaris 10.
I cannot reproduce it with IDS 11.10.FC1 on Solaris 10.
That suggests an obvious workaround. :)
Suggest to your support engineer that they contact me.
-=JL=-
Related threads
- Innovator-C on Windows (code page)
- DIRECT_IO and flags
- dbimport error 23103
- Unfamiliar SQLCODE values using JDBC with Informix