11.8.3 Revoking access privileges that were granted to HADB users
To revoke access privileges that were granted to HADB users, execute the REVOKE statement.
- Important
-
Only the HADB users to which access privileges are granted can revoke those access privileges.
The following examples explain how to revoke access privileges that were granted to HADB users.
- Example 1:
-
In this example, the SELECT privilege for table A.T1 that was granted to HADB user ADBUSER01 is revoked.
REVOKE SELECT ON "A"."T1" FROM "ADBUSER01"
- Example 2:
-
In this example, all types of access privileges for table A.T1 that were granted to HADB user ADBUSER01 are revoked.
REVOKE ALL PRIVILEGES ON "A"."T1" FROM "ADBUSER01" RESTRICT
Because RESTRICT is specified in the preceding example, the REVOKE statement returns an error if one of the following conditions is met:
-
ADBUSER01 has defined a viewed table that depends on the underlying table A.T1.
-
ADBUSER01 has granted an access privilege for table A.T1 to another HADB user (the access privilege for table A.T1 that was granted to ADBUSER01 has a dependent privilege).
-
There is a referential constraint that was defined by ADBUSER01 by using table A.T1 as the referenced table.
-
- Example 3:
-
In this example, the SELECT privilege for table A.T1 that was granted to all HADB users by specifying PUBLIC in the GRANT statement is revoked.
REVOKE SELECT ON "A"."T1" FROM PUBLIC
For details about the REVOKE statement, see REVOKE (revoke privileges) in Definition SQL in the manual HADB SQL Reference.
- Important
-
-
If the access privileges that were revoked have dependent privileges, those dependent privileges are also revoked. For details, see (4) Revoking access privileges in 2.7.5 Access privileges.
-
If the SELECT privilege for the underlying table for a viewed table is revoked, all viewed tables that depend on that underlying table are invalidated. If the SELECT privilege with the grant option is revoked, the SELECT privilege that was granted by using the grant option is also revoked. This might cause the relevant viewed tables to be invalidated. For details, see 2.7.6 Access privileges for viewed tables.
-
If the REFERENCES privilege for a table is revoked, the referential constraint that was defined by using that REFERENCES privilege is deleted.
-