Two-users configuration option
With the two-users option, a user ID must have all of the privileges for installing the external stored procedure. However, that user ID does not need to be used to run CDC Replication.
The CDC Replication user ID does not need any privileges for installing the external stored procedure. You can create a CDC Replication instance with the more-privileged user ID and then reconfigure with the less-privileged user ID.
Adding an instance
Create a CDC Replication instance with the more-privileged user ID. The following input fields have special values for the more-privileged user ID:
- Database Username: A user ID with both normal operation and configuration and upgrade privileges.
- Database Metadata Schema: The schema for creating the external stored procedure.
- SSH Port: This field is required.
- WLM Environment: This field is required.
- Load Library: The name of an APF-authorized library to which the user has write access unless this configuration option is combined with the staging option.
- CEE Prefix: This field is required.
- User Prefix: This field is required.
Edit the CDC Replication instance with the less-privileged user ID, keeping the same schema.
The following input fields have special values for the less-privileged user ID:
- Database Username: A user ID with privileges for normal operation
- Database Metadata Schema: The schema for executing the external stored procedure, which must remain the same as before
- SSH Port: This value is unused but leave it as is for easier configuration.
- WLM Environment: This value is unused but leave it as is for easier configuration.
- Load Library: This value is unused but leave it as is for easier configuration.
- CEE Prefix: This value is unused but leave it as is for easier configuration.
- User Prefix: This value is unused but leave it as is for easier configuration.
Upgrading an instance
After you upgrade CDC Replication to a new build, the instance tries to upgrade the stored procedure when it is restarted. The instance fails to start with the less-privileged user ID. Follow these steps:
- Edit the CDC Replication instance to switch to the more-privileged user ID.
- Start the instance to upgrade the stored procedure.
- When the instance starts listening on its port, shut down the instance.
- Edit the instance again to switch back to the less-privileged user ID.
- Start the instance and it skips the installation of the stored procedure because it is already installed.
Editing an instance
If you edit an instance and change the WLM environment or load library but not the schema, then CDC Replication skips the installation and therefore does not use the new WLM environment or write the load module to the new load library. In this case, to force a complete installation you must drop the CHCRLRSP procedure from Db2 before editing the instance.
If the Metadata Schema field is changed, then the stored procedure must be reinstalled and you must specify the more-privileged user ID.