Setting preferences for SQL database connections
In the workbench, you use database connections in two ways:
- When you are developing your programs. For example, you need this connection when you use the EGL SQL retrieve feature; see Setting preferences for SQL retrieve.
- When you are running or debugging your programs.
To create a new connection using the New Connection wizard, see Creating an SQL database connection, or use the following steps to set up or edit the connections:
- Click .
- When a list of preferences is displayed, expand EGL, then click SQL Database Connections.
- The currently selected connection in the Connection list is the default database for EGL in the workbench. You can switch between database connections, edit or delete the connections, and test the connections from this window.
- To create a new connection, click New. For an explanation of the preference fields, see Fields in the New Connection wizard.
- If you are using DB2® you might need to set the Secondary Authentication ID field. See "Secondary Authentication ID" in this topic.
You can clear or apply preference settings:
- To restore default values, click Restore Defaults.
- To apply preference settings without exiting the preferences dialog, click Apply.
- If you are finished setting preferences, click OK.
Secondary Authentication ID
The secondary authentication ID is more commonly known as the secondary authorization ID.
The meaning and use of the secondary authorization ID depends on the
following conditions:
- The DB2® platform you are using.
- In some cases, the way that platform is configured.
Here are common examples of the secondary authorization ID:
- For DB2® UDB, if you specify a secondary authorization ID, that ID is used as the default schema name for all SQL statements.
- For DB2® on zOS, a secondary authorization ID is often mapped to a RACF® group. Access rights to DB2® objects are granted to the RACF® group and individual user IDs are added to the RACF® group. This technique minimizes work when your authorization requirements change. For example, if a new DB2® table is created, the system administrator can grant access to a RACF® group; all individuals belonging to that group then get read access, as long as they are using the secondary authorization ID.