Hitachi

Hitachi Advanced Database Command Reference


1.1 List of commands

The following two tables list and describe the HADB commands.

For details about the types of nodes on which commands can be executed when the multi-node function is used, see 1.2 Nodes on which commands can be executed when the multi-node function is used.

Table 1‒1: List of commands (command execution environment)

No.

Function

Command name

Command execution environment

OS users who can execute the command

Privileges required for command execution#1

Computers that can execute the command

HADB server status

Connection to HADB server

1

Installation and environment setup

Install

adbinstall

HADB administrator and HADB client managing OS users

--

HADB server and HADB client (for Linux)

Inactive

No

2

Initialize the database

adbinit

HADB administrator

--

HADB server

Inactive

No

3

Add and change DB areas

adbmodarea

HADB administrator

--

HADB server

Active

Yes#2

4

Change buffer

adbmodbuff

HADB administrator

--

HADB server

Active

Yes#2

5

Start and terminate the HADB server

Start the HADB server

adbstart

HADB administrator

--

HADB server

Inactive

No

6

Terminate the HADB server

adbstop

HADB administrator

--

HADB server

Active

No

7

Database maintenance and backup

Change the HADB server operation mode

adbchgsrvmode

HADB administrator

--

HADB server

Active

No

8

Table data import and export

Import data to base tables

adbimport

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • IMPORT TABLE privilege for a table to be imported

HADB server

Active

Yes#2

9

Export table data

adbexport

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • EXPORT TABLE privilege for a table to be exported

HADB server

Active

Yes#2

10

Index maintenance

Rebuild indexes

adbidxrebuild

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • REBUILD INDEX privilege for a table for which indexes are defined

HADB server

Active

Yes#2

11

Chunk maintenance

Merge chunks

adbmergechunk

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • MERGE CHUNK privilege for a table for which chunks are defined

HADB server

Active

Yes#2

12

Archive chunks

adbarchivechunk

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • ARCHIVE CHUNK privilege for a table for which chunks are defined

HADB server

Active

Yes#2

13

Unarchive chunks

adbunarchivechunk

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • UNARCHIVE CHUNK privilege for a table for which chunks are defined

HADB server

Active

Yes#2

14

Change chunk status

adbchgchunkstatus

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • CHANGE CHUNK STATUS privilege for a table for which chunks are defined

HADB server

Active

Yes#2

15

Set, change, and delete comments for chunks

adbchgchunkcomment

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • CHANGE CHUNK COMMENT privilege for a table for which chunks are defined

HADB server

Active

Yes#2

16

System table (base table) maintenance

Reorganize the system table (base table)

adbreorgsystemdata

HADB administrator

--

HADB server

Active

Yes#2

17

HADB server status display

Display information on client groups and command groups

adbls -d cltgrp

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

18

Display the connection status

adbls -d cnct

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

19

Display global buffer information

adbls -d gbuf

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

20

Display local work table buffer information

adbls -d lbuf

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

21

Display the status of locked resources

adbls -d lock

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

22

Display the memory usage status

adbls -d mem

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

23

Display shared memory information

adbls -d shm

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

24

Display the HADB server status

adbls -d srv

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

Y

No

25

Display the thread status

adbls -d thd

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

26

Display version information

adbls -d ver

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

Y

No

27

Execution of SQL statements

Execute SQL statements from the standard input or a file

adbsql

No restriction

  • CONNECT privilege

  • Access privileges required for an SQL statement to be executed

HADB server and HADB client (for Linux)

Active

As client

28

Dictionary management

Perform operation such as registering and deleting a synonym dictionary

adbsyndict

HADB administrator

--

HADB server

Active

Yes#2

29

Information collection and analysis

Analyze the database status

adbdbstatus

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

Active

Yes#2

30

Collect cost information

adbgetcst

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • GET COSTINFO privilege for a table for which cost information is to be collected

HADB server

Active

Yes#2

31

Display the HADB server's operation information

adbstat

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

Active

No

32

Start or stop output of SQL trace information

adbchgsqltrc

HADB administrator

--

HADB server

Active

No

33

Troubleshooting

Forcibly terminate transactions or commands

adbcancel

HADB administrator

--

HADB server

Active

No

34

Collect troubleshooting information

adbinfoget

HADB administrator

--

HADB server

Y#4

No

35

Delete troubleshooting information

adbinfosweep

HADB administrator

--

HADB server

Inactive

No

36

Multi-node function

Display the HADB server status on each node

adbls -d node

HADB administrator and OS users who belong to the HADB administrators group

--

HADB server

C

No

37

Change the node type

adbchgnodetype

HADB administrator

--

HADB server

Active

No

38

Monitor the HADB server

adbmonitor

HADB administrator

--

HADB server

Active

No

39

Centralized management of client definitions

Centralized management of client definitions

adbclientdefmang

HADB administrator

  • DBA privilege

  • CONNECT privilege

HADB server

Active

Yes

40

Audit trail facility

Manage the audit trail facility

adbaudittrail

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • Audit admin privilege

  • Audit viewer privilege#3

HADB server

Active

Yes

41

Conversion of audit trail files

adbconvertaudittrailfile

HADB administrator and OS users who belong to the HADB administrators group

  • CONNECT privilege

  • Audit viewer privilege

HADB server

Active

Yes

42

Updated-row columnizing facility

Manage the updated-row columnizing facility

adbcolumnize

HADB administrator

--

HADB server

Active

No

Legend:

--: Not applicable.

Active: The command can be executed while the HADB server is running.

Inactive: The command can be executed while the HADB server is not running.

Y: The command can be executed regardless of whether the HADB server is running.

C: The command can be executed while the HADB server is running, or between the time the HADB server terminated abnormally and the time the HADB server is restarted or until troubleshooting information is deleted by the adbinfosweep command.

Yes: Establishes a connection to the HADB server during command execution.

As client: Establishes a connection to the HADB server as an HADB client.

No: Does not establish a connection to the HADB server.

#1

You specify the authorization identifier of an HADB user who has this privilege in each command's -u option.

#2

You must consider not only the number of HADB clients but also the number of commands that connect to the HADB server.

For details about the number of commands that can connect concurrently to the HADB server, see Points to consider when executing commands concurrently in Preparing Resources in the HADB Setup and Operation Guide.

#3

An HADB user with the audit viewer privilege and without the audit admin privilege can execute the adbaudittrail command with only the -d option specified. To execute the adbaudittrail command with any other option specified, the audit admin privilege is required.

#4

To execute the adbinfoget command with the -g option specified, make sure that the HADB server is running.

The following table describes database recovery by using a backup of system data only.

Table 1‒2: List of commands (database recovery by using a backup of system data only)

No.

Function

Command name

Database recovery by using a backup of system data only

1

Installation and environment setup

Install

adbinstall

Y

2

Initialize the database

adbinit

N

3

Add and change DB areas

adbmodarea

N

4

Change buffer

adbmodbuff

Y

5

Start and terminate the HADB server

Start the HADB server

adbstart

Y

6

Terminate the HADB server

adbstop

Y

7

Database maintenance and backup

Change the HADB server operation mode

adbchgsrvmode

Y

8

Table data import and export

Import data to base tables

adbimport

N

9

Export table data

adbexport

Y

10

Index maintenance

Rebuild indexes

adbidxrebuild

N

11

Chunk maintenance

Merge chunks

adbmergechunk

N

12

Archive chunks

adbarchivechunk

N

13

Unarchive chunks

adbunarchivechunk

N

14

Change chunk status

adbchgchunkstatus

N

15

Set, change, and delete comments for chunks

adbchgchunkcomment

N

16

System table (base table) maintenance

Reorganize the system table (base table)

adbreorgsystemdata

Y

17

HADB server status display

Display information on client groups and command groups

adbls -d cltgrp

Y

18

Display the connection status

adbls -d cnct

Y

19

Display global buffer information

adbls -d gbuf

Y

20

Display local work table buffer information

adbls -d lbuf

Y

21

Display the status of locked resources

adbls -d lock

Y

22

Display the memory usage status

adbls -d mem

Y

23

Display shared memory information

adbls -d shm

Y

24

Display the HADB server status

adbls -d srv

Y

25

Display the thread status

adbls -d thd

Y

26

Display version information

adbls -d ver

Y

27

Execution of SQL statements

Execute SQL statements from the standard input or a file

adbsql

C

28

Dictionary management

Perform operation such as registering and deleting a synonym dictionary

adbsyndict

N

29

Information collection and analysis

Analyze the database status

adbdbstatus

Y

30

Collect cost information

adbgetcst

N

31

Display the HADB server's operation information

adbstat

Y

32

Start or stop output of SQL trace information

adbchgsqltrc

Y

33

Troubleshooting

Forcibly terminate transactions or commands

adbcancel

Y

34

Collect troubleshooting information

adbinfoget

Y

35

Delete troubleshooting information

adbinfosweep

Y

36

Multi-node function

Display the HADB server status on each node

adbls -d node

Y

37

Change the node type

adbchgnodetype

Y

38

Monitor the HADB server

adbmonitor

Y

39

Centralized management of client definitions

Centralized management of client definitions

adbclientdefmang

Y

40

Audit trail facility

Manage the audit trail facility

adbaudittrail

Y

41

Conversion of audit trail files

adbconvertaudittrailfile

Y

42

Updated-row columnizing facility

Manage the updated-row columnizing facility

adbcolumnize

N

Legend:

Y: Even if this command is executed after upgrading of the HADB server, the HADB server can be returned to the old version by using a backup of system data only.

N: If this command is executed after upgrading of the HADB server, the HADB server cannot be returned to the old version from a backup of system data only. In this case, a full backup is required to return the HADB server to the old version.

C: If operation on only the following is performed, the HADB server can be returned to the old version by using a backup of system data only.

  • SQL statement (SELECT statement, COMMIT statement, or ROLLBACK statement)

  • All adbsql subcommands

A backup of system data only must be created before the version upgrade.

For details about backing up the system data only when upgrading the HADB server, see Steps to take before upgrading the server version in the HADB Setup and Operation Guide.