Order of precedence for database user specification

Database user login can be specified with different methods, as shown in this table. Precedence order if defined from top to bottom:

Table 1. Database user login methods
Connection Instruction FGLPROFILE Effect
CONNECT TO "dbname"
 USER "user" USING "pswd"
or
DEFINE db STRING
LET db = "dbname+username='username',
   password='pswd'"
DATABASE db
N/A (ignored)
The user information in the
USER
/
USING
clause of the
 CONNECT
TO
instruction or in the connection string of the
 DATABASE
instruction are used to identify the actual user.
Connection string can also be used with
CONNECT
TO
.
DATABASE dbname
or
CONNECT TO "dbname"
No specific
dbi.*
entry
No user login and password is provided to the database server. Usually, the Operating System authentication takes place.
DATABASE dbname
or
CONNECT TO "dbname"
dbi.default.userauth.callback = "fx"
Callback function
fx
is called to get user name and password when connection instruction is executed.
DATABASE dbname
or
CONNECT TO "dbname"
dbi.database.dbname.username = ...
dbi.database.dbname.password = ...

The FGLPROFILE default user name and password are used to connect to the database server.

Important:

NOT RECOMMENDED IN PRODUCTION!