Updated on 2024-03-14 GMT+08:00

Managing Roles

Creating a Role

  1. Log in to the GaussDB(DWS) management console. In the navigation pane, choose Clusters > Dedicated Clusters.
  2. In the cluster list, click the name of the target cluster. The Cluster Information page is displayed.
  3. In the navigation pane, choose User Management.
  4. Click the Roles tab and click Create Role. The role creation page is displayed.

  5. Complete the role information, confirm the information, and click Next.

    • Role Name: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.
    • Create Database: Whether the role has the permission to create databases.
    • Create Role: Whether the role has the permission to create users and roles.
    • Inherit Permissions: Whether a role inherits the permissions from its group. This function is enabled by default. You are advised to retain this setting.

  6. Configure the permissions of the role.

    Click Add to add a permission configuration. Select the database object type and the corresponding objects. Then, select permissions. For details about permission definitions, see "DCL Syntax > GRANT" in SQL Syntax Reference.

  7. After the authorization is complete, click Create. The role is created.

Modifying a Role

  1. Log in to the GaussDB(DWS) management console. In the navigation pane, choose Clusters > Dedicated Clusters.
  2. In the cluster list, click the name of the target cluster. The Cluster Information page is displayed.
  3. In the navigation pane, choose User Management.
  4. In the role list, select a user and click Modify. The page for modifying role details is displayed.

  5. Modify the role information, confirm the information, and click Next.

    • Role Name: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.
    • Create Database: Whether the role has the permission to create databases.
    • Create Role: Whether the role has the permission to create users and roles.
    • Inherit Permissions: Whether a role inherits the permissions from its group. This function is enabled by default. You are advised to retain this setting.

  6. Add or remove permissions as required.

  7. Confirm the permissions. Click lick Save.

Deleting a Role

  1. Log in to the GaussDB(DWS) management console. In the navigation pane, choose Clusters > Dedicated Clusters.
  2. In the cluster list, click the name of the target cluster. The Cluster Information page is displayed.
  3. In the navigation pane, choose User Management.
  4. Select a role from the role list and click Delete. A confirmation dialog box is displayed.

  5. Click OK to delete the role.

    If the role has dependencies, such as database objects, that have not been deleted, the role will fail to be deleted.