Configuring access to the user mapping plug-in (Java programming language)
Set the DB2_UM_PLUGIN option to configure the federated server to use a Java™ plug-in to retrieve user mappings.
Before you begin
Before you begin
Before you configure the federated server to access the user mappings in an external repository, you must perform these tasks:- Develop a user mapping plug-in
- Deploy the plug-in on the federated server
- Update the database manager configuration:
db2 update dbm cfg using JDK_PATH your_jdk_path db2 terminate db2stop db2start
About this task
'package.classname'.
If you use the LDAP sample plug-in, specify the value 'UserMappingRepositoryLDAP' in
the DB2_UM_PLUGIN option. The sample plug-in is not developed as a package.To configure the federated server to access the external repository:
Procedure
Choose how you want to implement the user mapping plug-in:
| Method | SQL statement |
|---|---|
| Specify the user mapping plug-in when you create a wrapper | |
| Alter an existing wrapper to specify the user mapping plug-in | |
| Specify the user mapping plug-in when you create a server definition | |
| Alter an existing server definition to specify the user mapping plug-in | |
What to do next
After you set the DB2_UM_PLUGIN option, the federated server uses the connection information that you specify in the UserMappingRepositoryXXXX.cfg file to retrieve user mappings from the external repository. XXXX is the name of the plug-in.
- To alter the wrapper to use a different plug-in
ALTER WRAPPER wrapper-name ( SET DB2_UM_PLUGIN 'com.package_name.um.UserMappingRepositoryXXXX' );- To alter a server definition to use a different plug-in
ALTER SERVER server_name OPTIONS ( SET DB2_UM_PLUGIN 'UserMappingRepositoryXXXX' );