To expand on the other responses, use roles. Revoke all but CONNECT from PUBLIC, then create two roles: a read role and a dba role. Then:
- Grant access to the DBA_ROLE role to all users except the ODBC user.
- Grant access to the READ_ONLY role to the ODBC user.
- Revoke all table and column level privileges except SELECT from PUBLIC for all tables.
- GRANT ALL ON <tablename> TO DBA_ROLE; -- for every table.
- In the sysdbopen() function owned by the ODBC user id set that user's role to the READ_ONLY role.
- In the global sysdbopen() function owned by the database owner (presumably that's user informix) grant the DBA role to whatever user is connected.
Now the ODBC user does not have privileges to do anything except connect to the database and perform SELECTs.
You can automate creating the REVOKE and GRANT statements either using my dbscript utility from my utils2_ak package or using Lester's method to generate the SQL (ie: UNLOAD TO 'revoke.sql' DELIMITER ';' SELECT "REVOKE ALL ON "||trim(tabname)||" FROM PUBLIC" FROM systables where tabtype = 'T' and tabid > 99; )
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com------------------------------