CREATE USER MAPPING statement - Examples for the Informix wrapper
Use the CREATE USER MAPPING statement to map a federated server user ID to an Informix® server user ID and password. This topic includes a complete example with the required parameters, and an example that shows you how to use the Db2® special register USER with the CREATE USER MAPPING statement.
Complete example
CREATE USER MAPPING FOR VINCENT SERVER asia
OPTIONS (REMOTE_AUTHID 'vinnie', REMOTE_PASSWORD 'close2call');- VINCENT
- Specifies the local user ID that you are mapping to a user ID that is defined at the Informix server.
- SERVER asia
- Specifies the server definition name that you registered in the CREATE SERVER statement for the Informix server.
- REMOTE_AUTHID 'vinnie'
- Specifies the user ID at the Informix database server to which you
are mapping VINCENT. The value is case-sensitive, unless
you set the FOLD_ID server option to 'U' or 'L' in the CREATE SERVER statement.
Although the remote user ID is specified as an option in the CREATE USER MAPPING statement, it is required for Informix data sources.
- REMOTE_PASSWORD 'close2call'
- Specifies the password that is associated with 'vinnie'.
The value is case-sensitive, unless you set the FOLD_PW server option to 'U'
or 'L' in the CREATE SERVER statement.
Although the remote password is specified as an option in the CREATE USER MAPPING statement, it is required for Informix data sources.
Special register example
You can use the Db2 special register USER to map the authorization ID of the person who is issuing the CREATE USER MAPPING statement to the data source authorization ID that is specified in the REMOTE_AUTHID user option.
CREATE USER MAPPING FOR USER SERVER asia
OPTIONS (REMOTE_AUTHID 'vinnie', REMOTE_PASSWORD 'close2call');