Giving users access to the Db2 database
By default, only the user who creates the database has access to the database. This user is an Administrator and must give other users access to the database.
About this task
You can give existing IBM Software Hub users one of the following roles on an integrated Db2 database:
- Admin
- Users with the Admin role can perform the following tasks:
- Access all of the features in the database console
- Give other users access to the database
- User
- Users with the User role can perform the following tasks:
- Create tables
- Use their own tables
- Give other users access to their tables
Tip: You can use user groups in IBM Software Hub to manage and maintain user access and to minimize disruption. You can give user groups access to
the database. Then, you can add more users to the user groups in IBM Software Hub without adding users to the database
directly.
Procedure
To give a user access to an integrated database, run the following steps according to
your environment:
- Giving users access to a database that is not part of an HADR configuration:
-
- Sign in to the IBM Software Hub web client.
- From the navigation menu, select the Databases tab.
- Open the actions menu for the database that you want to manage, and select Access management.
- Click Manage users.
- Select the user and specify the appropriate role for the user.
- Click OK.
- Giving users access to an HADR database that has reads on standby enabled:
-
User access is managed separately for each Db2 database with HADR configured. To ensure that users have access to data regardless of which database is designated as the HADR primary, users must be given access to each database instance.
- Sign in to the IBM Software Hub web client.
- Ensure that
reads on standbyis enabled. To learn more, see Enabling reads on standby for Db2. - From the navigation menu, select the Databases tab.
- Open the actions menu for the database that you want to manage, and select Access management.
- Click Manage users.
- Select the user and specify the appropriate role for the user.
- Click OK.
- Giving users access to an HADR database that does not have reads on standby enabled:
-
User access is managed separately for each Db2 database with HADR configured. To ensure that users have access to data regardless of which database is designated as the HADR primary, users must be given access to each database instance.
- Open the User groups tab and click Manage access to add users for the current primary database.
- Run
manage_hadr -takeoveron the current standby database. See Manually initiating an HADR takeover in Db2 for more information. - Add the same User groups or users by clicking Manage access on the new primary database.
- Run
manage_hadr -takeoveron the former primary database to return it to the original state. - Repeat these steps for all standby databases in the HADR configuration.