Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

2.2.2 Granting the CONNECT privilege, schema definition privilege, and RDAREA usage privilege to users who create tables

Executor: HiRDB administrator or user who manages user privileges (user with DBA privilege)

The GRANT statement, which is a definition SQL statement, is used to grant the following privileges to users who will creates tables:

#: This privilege is required in order to create tables in private RDAREAs; it is not required in order to create tables in public RDAREAs.

Example
Grant the CONNECT, schema definition, and RDAREA usage privileges (RDAREA name: RDAREA01) to a table creator (authorization identifier: USER002, password: HIRDB002):
  GRANT CONNECT TO USER002 IDENTIFIED BY HIRDB002
  GRANT SCHEMA TO USER002
  GRANT RDAREA RDAREA01 TO USER002
Organization of this subsection
(1) Granting a schema definition privilege without using the GRANT statement
(2) Granting an RDAREA usage privilege without using the GRANT statement
(3) Changing a private RDAREA to a public RDAREA

(1) Granting a schema definition privilege without using the GRANT statement

A schema can be defined for a user to whom the schema definition privilege is to be granted. The schema definition privilege is then granted to the user that defined the schema.

(2) Granting an RDAREA usage privilege without using the GRANT statement

When defining a private RDAREA,# the HiRDB administrator can grant the RDAREA usage privilege to that private RDAREA.

#: The following utilities and control statements are used:

(3) Changing a private RDAREA to a public RDAREA

After revoking RDAREA usage privileges to a private RDAREA, use the GRANT statement, which is a definition SQL statement, to change the RDAREA. For details about revoking RDAREA usage privileges, see 2.3(4) Revoking RDAREA usage privileges.

Example
Redefine the private RDAREA named RDAREA02 as a public RDAREA:
  GRANT RDAREA RDAREA02 TO PUBLIC