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:
|
User | This role can:
|
Procedure
Giving users access to a database that is not part of an HADR configuration:
- Sign in to the Cloud Pak for Data 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 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.
- Ensure that
reads on standby
is enabled. To learn more, see Enabling reads on standby for Db2 Warehouse databases. - Sign in to the Cloud Pak for Data 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 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.
- Open the User groups tab and add users with the Manage access button for the current primary database.
- Run
manage_hadr -takeover
on the current standby database. See Manually initiating an HADR takeover in Db2 Warehouse for more information. - Add the same User groups or users via Manage access on the new primary database.
- Run
manage_hadr -takeover
on the former primary database to return it to the original state. - Repeat these steps for all standby databases in the HADR configuration.