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.
DEFINE p_username VARCHAR(50)
SELECT USER INTO p_username FROM systables WHERE tabid=1ORACLE
Oracle® users can be authenticated in different ways: as database users, as operating system users or by delegating authentication to another service, like Kerberos or LDAP.
CREATE USER command, to create a
user authenticated by the database
server:CREATE USER username IDENTIFIED BY passwordIDENTIFIED EXTERNALLY
clause:CREATE USER username IDENTIFIED EXTERNALLYIn this case, Oracle trusts the
operating system to authenticate the user. See the Oracle documentation for OS user authentication configuration, especially
the OS_AUTHENT_PREFIX (empty string) and REMOTE_OS_AUTHENT (true)
server parameters. Note also that the Oracle user name needs to be specified in uppercase in the CREATE USER instruction, and gets
an additional prefix, depending on the operating system (domain name on Windows® platforms)
IDENTIFIED GLOBALLY
clause:CREATE USER username IDENTIFIED GLOBALLY AS 'distinguished_name'Global users are registered and managed by an external LDAP service, and are identified by the distinguished name (DN).
ALTER USER username GRANT CONNECT THROUGH proxy_userSolution
Based on the application logic, you must create one or several Oracle users. Use database or external authentication.
Identifying the current database user
DEFINE p_username VARCHAR(50)
SELECT USER INTO p_username FROM DUALSwitching to the application schema
dbi.database.mydb.ora.schema = "app_owner"Connecting as SYSDBA or SYSOPER
An Oracle connection can also be
established as SYSDBA or SYSOPER users. This is possible by
specifying the /SYSDBA or /SYSOPER strings after the user name in
the USER clause of the CONNECT TO instruction.
For example:
CONNECT TO "orc1fox+driver='dbmora'"
USER "orauser/SYSDBA" USING "fourjs"
Using proxy authentication
If Oracle proxy authentication is
required, specify the /PROXY_CLIENT:username string after the
user name in the USER clause of the CONNECT TO instruction.
For example:
CONNECT TO "orc1fox+driver='dbmora'"
USER "orauser/PROXY_CLIENT:appuser" USING "fourjs"
ALTER USER appuser GRANT CONNECT THROUGH orauser