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.


Issue a CREATE USER MAPPING statement.
For example:
CREATE USER MAPPING FOR local_userID SERVER server_definition_name
       OPTIONS (REMOTE_AUTHID 'remote_userID', REMOTE_PASSWORD 'remote_password');
Although REMOTE_AUTHID and REMOTE_PASSWORD are user mapping options in the CREATE USER MAPPING statement, these options are required to access ODBC data sources:
If the cac.ini file specifies USERID = MY_USERID and USERPASSWORD = MY_PASSWORD, then the options of the CREATE USER MAPPING statement must be specified as follows:

What to do next

After you complete this task, you can test the connection to the ODBC data source.