Creating a user mapping for an ODBC data source
When you attempt to access an ODBC server, the federated server establishes a connection to the ODBC server by using a user ID and password that are valid for that data source. For data sources that require a user mapping, you must define an association (a user mapping) between each federated server user ID and password and the corresponding data source user ID and password.
About this task
Create a user mapping for each user ID that will access the federated system to send distributed requests to the ODBC data source.
Procedure
Issue a CREATE USER MAPPING statement.
For example:
CREATE USER MAPPING FOR <db2inst1>
SERVER server_name
OPTIONS (
REMOTE_AUTHID ‘admin’,
REMOTE_PASSWORD ‘password’);where- db2inst1 specifies the local authorization ID in the Db2 instance. Use the keyword USER or PUBLIC. Alternatively, use the Db2 instance name. USER is for current Db2 user, PUBLIC is for all Db2 users.
- server_name specifies the server definition name that you defined in the CREATE SERVER statement for the JDBC data source. The user mapping is paired with the server statement.
- admin specifies the remote user ID for the remote data source. The value is case-sensitive unless you set the FOLD_ID server parameter to "U" or "L" in the CREATE SERVER statement.
- password specifies the remote password for the remote data source. The value is case-sensitive, unless you set the FOLD_PW server option to "U" or "L" in the CREATE SERVER statement.