Creating a DB2 UDB User and Granting Permissions

Create a DB2 UDB user and grant the necessary permissions.

Replication Agent requires a DB2 UDB login that has permission to access data and create new objects in the primary database. The DB2 UDB login must have SYSADM or DBADM authority to access the primary database transaction log.

Note: You can also use these steps to create a maintenance user.
  1. Create a new operating system user named ra_user using commands appropriate for your operating system.
    For example, to create a user named ra_user on the UNIX and Linux operating systems, use:
    useradd -gusers -Gmgmt -s/bin/shell -psybase 
    -d/home/ra_user -m ra_user
    where sybase is the password corresponding to the ra_user user name.
  2. Start the DB2 UDB command-line processor:
    %>bash
    %>source /db2home/db2inst1/sqllib/db2profile
    %>db2
  3. Connect to the primary DB2 UDB database:
    db2=>connect to pdb user db2_admin_user using db2_admin_password
    
    where db2_admin_user and db2_admin_password are the administrative user ID and password for the primary database.
  4. Grant all necessary authorities to ra_user:
    db2=>grant DBADM on database to user ra_user