DB2 UDB Access Requirements
The DB2 CLI interface is used by the gateway. To access DB2 UDB, the following conditions must be met:
• User logins must be defined to DB2 UDB.
• Permission must be granted to access each DB2 UDB database.
• Each user ID (or the group that contains the user ID) in the database must be granted the following permissions:
– Create Table
– Create View
– Create Stored Procedure
• The Ingres user can optionally be made the DBA of the database.
• A DB2 CLI Data Source Name (DSN) must be defined for the database. The gateway uses the DB2 CLI DSN to access the DB2 UDB database on the local or remote system.
• If collation sequences need to be the same as for Ingres, the DB2 UDB database must be created with "CODESET IBM-1252 TERRITORY US COLLATE USING SYSTEM."
Note: During the installation of DB2 UDB, system administration (SYSADM) permissions are granted by default to any user that is a member of the administrators group. A security recommendation is to modify the default permissions granted to users of the administrators group. For more information, see the Administrator Guide for DB2 UDB.
Grant User Permissions (DB2 UDB)
The following example grants permissions to a user 'INGRES' and a non-privileged user 'FRED'. It does not explicitly grant permissions to execute stored procedures, because DB2 UDB users are granted IMPLICIT_SCHEMA authority by default and can therefore create stored procedures. The example grant statements need to be executed by the database administrator of the DB2 UDB database:
To grant permissions
1. Connect as a database administrator to the DB2 UDB instance.
2. Assign the permissions as follows:
GRANT DBADM, CREATETAB, CONNECT ON DATABASE TO USER INGRES;
GRANT CREATETAB, CONNECT ON DATABASE TO USER FRED;