Database connections / Database user authentication |
Database user login can be specified with different methods, as show in this table. Precedence order if defined from top to bottom:
Connection Instruction | FGLPROFILE | Effect |
---|---|---|
CONNECT TO "dbname" USER "user" USING "pswd" orDEFINE db VARCHAR(200) 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. are used to identify the actual user. Connection string can also be used with CONNECT TO. |
DATABASE dbname orCONNECT 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 orCONNECT 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 orCONNECT 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!
|