Printer FriendlyEmail Article Link

Informix: How do I give a user ability to connect to database and run queries?


You grant the user privileges.  The user you want to grant permissions must have a valid unix account on the server.  

To allow a user to connect to database.  As owner or dba of the database issue:

  • echo "grant connect to " | dbaccess
Note: Only the dba of the database can grant connect permission to the database. Use dbschema to see which user(s) have dba privilege.  Typically the informix user is dba of the metro database and smartsys is dba of the scout database.  

Where is the name of the database.  is the user who requires ability to connect.

To allow user to run queries on specific tables.  As owner of the table or as dba user issue:

  • echo "grant select on to '' as '' " | dbaccess  


    is the table.  is the user who requires select ability.  is the owner of the table. is the name of the database


    NOTE: If the table has PUBLIC privileges, the second step is not necessary.  (dbschema will show)
    NOTE: Other abilities such as insert, delete, update can be added in the same manner as the second step.  Substitute "select" with desired action.

    Dbschema format:

    dbschema -d -t -ss

Product : UNIX,Informix