Hitachi

Hitachi Advanced Database Setup and Operation Guide


3.7.4 Granting privileges to the created HADB user

This subsection explains how to grant to the HADB user (ADBUSER02) the privileges necessary for creating and retrieving tables.

Organization of this subsection

(1) Executing the SQL statement for granting privileges

To grant privileges to an HADB user, you use the GRANT definition SQL statement. Here, the following two privileges are granted to the HADB user (ADBUSER02) as the privileges necessary for creating and retrieving tables:

Enter the SQL statement described below and press Enter.

Make sure that the last character you enter is a semicolon (;), or the SQL statement will not execute.

GRANT CONNECT,SCHEMA TO "ADBUSER02";

The CONNECT privilege and the schema definition privilege have now been granted to the HADB user (ADBUSER02).

(2) Confirming the results of granting privileges

The message shown below is output when privileges have been granted to the HADB user (ADBUSER02). An example of the output message follows.

■ Example of the output messages
KFAA96403-I SQL processing completed.

After you have confirmed that privileges have been granted, granting of privileges is complete.

(3) Terminating the connection to the HADB server

After you have created an HADB user and granted privileges, terminate the adbsql command. Enter the adbsql subcommand shown below and press Enter.

Make sure that the last character you enter is a semicolon (;), or the SQL statement will not execute.

#EXIT;

The adbsql command terminates and other commands can now be entered. An example of the execution result follows.

■ Execution result example
[adbmanager@localhost ~]$

(4) Related item

9.4 Creating an HADB user to define base tables