Database users

Informix®

Until version 11.70.xC2, Informix database users must be created at the operating system level and must be members of the 'informix' group.

Starting with 11.70.xC2, Informix supports database-only users with the CREATE USER instruction, as in most other db servers.

Any database user must have sufficient privileges to connect and use resources of the database; user rights are defined with the GRANT command.

To get the database user associated to the current SQL connection with Informix, execute the following SQL statement:
DEFINE p_username VARCHAR(50)
SELECT USER INTO p_username FROM systables WHERE tabid=1

SAP HANA®

SAP HANA users are created for each database tenant with the CREATE USER instruction. Users can be authenticated with a password that must be provided at each connection (CREATE USER name PASSWORD password), or can be identified with an external authentication mechanism (CREATE USER name IDENTIFIED EXTERNALLY AS ...).

For each database user a schema with the user's name is automacally created, owned by this user and becomes the default schema.

Solution

Create your database users with the CREATE USER SQL instruction.

To get the database user associated to the current SQL connection with SAP HANA, execute the following SQL statement:
DEFINE p_username VARCHAR(50)
SELECT CURRENT_USER INTO p_username FROM DUMMY