Creating a user mapping for the document store data source

When you attempt to access a document store data source server, the federated server establishes a connection to the document store data source server by using the user ID and password that are valid for that data source.

About this task

You can create a user mapping for every user ID that accesses the federated system to send distributed requests to the document store data source.

Procedure

Issue the 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', REMOTE_AUTHDB 'remote_authdb')

Although the remote_userID and remote_password variables are specified as options in the CREATE USER MAPPING statement, these options are required to access document store data sources.

The REMOTE_AUTHDB parameter is optional and only valid when the server type is MONGODRIVER. If the REMOTE_AUTHDB parameter is not specified, the value of the DBNAME parameter in CREATE SERVER statement is used.