Giving users access to the Db2 Warehouse 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 Cloud Pak for Data users one of the following roles on a Db2 Warehouse database:

Role Description
Admin This role can:
  • Access all of the features in the database console
  • Give other users access to the database
User This role can:
  • Create tables
  • Use their own tables
  • Give other users access to their tables
Tip: You can use user groups in Cloud Pak for Data to conveniently manage and maintain user access and to minimize disruption. You only need to give user groups access to the database once. You can subsequently add additional users to the user groups in Cloud Pak for Data without needing to add users to the database directly.

Procedure

To give a user access to an integrated database, follow the steps below for your environment:

Giving users access to a database that is not part of an HADR configuration:
  1. Sign in to the Cloud Pak for Data web client.
  2. From the navigation menu, select the Databases tab.
  3. Open the actions menu for the database that you want to manage, and select Access management.
  4. Click Manage users.
  5. Select the user and specify the appropriate role for the user.
  6. Click OK.

Giving users access to an HADR database that has reads on standby enabled:

User access is managed separately for each Db2 Warehouse 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.

  1. Ensure that reads on standby is enabled. To learn more, see Enabling reads on standby for Db2 Warehouse databases.
  2. Sign in to the Cloud Pak for Data web client.
  3. From the navigation menu, select the Databases tab.
  4. Open the actions menu for the database that you want to manage, and select Access management.
  5. Click Manage users.
  6. Select the user and specify the appropriate role for the user.
  7. 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 Warehouse 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.

  1. Open the User groups tab and add users with the Manage access button for the current primary database.
  2. Run manage_hadr -takeover on the current standby database. See Manually initiating an HADR takeover in Db2 Warehouse for more information.
  3. Add the same User groups or users via Manage access on the new primary database.
  4. Run manage_hadr -takeover on the former primary database to return it to the original state.
  5. Repeat these steps for all standby databases in the HADR configuration.

What to do next

After a user has access to the database, they can work with the database. For more information, see Working with Db2 Warehouse.