Granting privileges on a view

You can grant the following privileges on a view for specific users or public: select, insert, and delete a table, column reference, and column update.

Procedure

  1. Log on to the NonStop SQL/MX Database Manager.
  2. In the navigation tree, navigate to the Schemas folder by expanding Database > My Systems > Catalogs > Schemas.
  3. Expand the Views folder and select the view for which you want to grant privileges.
  4. Right-click and select Grant/Revoke Privileges.

    The grant/revoke privileges options appear in the right pane. The Grant option is selected by default.

    Grant/Revoke Privileges on a view
  5. In the Grantees section, select Public to grant privileges to all users.

    Or, select Specified Users to grant privileges to specific users.

    If the Specified Users option is selected, the user grid is enabled. Press Ctrl and click on the desired user names to select users.

  6. Optional. Select By User and select the user name in the corresponding drop-down menu to grant privileges on behalf of another user.
  7. Optional. Select With Grant Option to grant privileges and allow the grantees to grant the selected privileges to other users.
  8. Optional. In the Operation section, select the All Privileges check box to grant all privileges.

    If the All Privileges check box is selected, then the options in the View Privileges, Column Reference Privileges, and Column Update Privileges sections are disabled.

  9. Select the desired options in the View Privileges section.

    The available options are Select, Insert, and Delete.

  10. In the Column Reference Privileges section:
    • Select All Column to grant reference privilege on all columns.

    • Select Specified Columns to grant reference privilege on specific columns.

      If the Specified Columns option is selected, the list of columns is enabled.

    • Press Ctrl and click on the desired column names to select columns.

    • Selecting the No Columns option does not grant reference privileges.

  11. In the Column Update Privileges box:
    • Select All Column to grant update privilege on all columns.

    • Select Specified Columns to grant update privilege on specific columns.

      If Specified Columns is selected, then the list of columns is enabled.

    • Press Ctrl and click on the desired column names to select columns.

    • Select No Columns to not grant any update privileges.

  12. Click Grant.