3.6.2 Creating a DB area
After you have edited the initialization option file, initialize the database and create DB areas.
- Note
-
This section explains how to create DB areas by initializing the database. To initialize the database, you use the DB area creation command adbinit command). Use this command when you first create DB areas after installing the HADB server.
You cannot use the DB area creation command (adbinit command) to add or modify DB areas after the database has been initialized. In this situation, you use the command for adding and changing DB areas (adbmodarea command). For details about the command for adding and changing DB areas (adbmodarea command), see adbmodarea (Add and Change DB Areas) in the manual HADB Command Reference.
- Organization of this subsection
(1) Executing the DB area creation command
As the HADB administrator (adbmanager), enter the HADB command below and press Enter. A DB area is automatically created.
adbinit -u ADBUSER01 -p '#HelloHADB_01' /home/adbmanager/server/conf/adbinit.opt /home/adbmanager/db
- Note
-
If the message bash: adbinit: command not found is output during execution of the adbinit command, the environment variables that have been set might be invalid. Verify that the environment variables are set correctly based on the explanation in (2) Verifying the environment variables that were set in the .bashrc file under 3.5.1 Setting environment variables.
The following describes the options that are specified for the adbinit command:
-
-u ADBUSER01
Specify the HADB user's user ID (authorization identifier). When a DB area is created, the HADB user specified in the -u option is also created. Here, specify ADBUSER01 as the HADB user's user ID (authorization identifier).
The HADB user (ADBUSER01) created here is used to create the HADB user necessary for creating and retrieving tables.
- Note
-
To explain how to create an HADB user, this chapter provides the steps for user ADBUSER01 to create a new HADB user (ADBUSER02) needed to create and retrieve tables. For details, see 3.7 Creating an HADB user for creating and retrieving tables.
-
-p '#HelloHADB_01'
Specify a password for the user ID (ADBUSER01) specified in the -u option. Here, specify #HelloHADB_01 as the password.
-
/home/adbmanager/server/conf/adbinit.opt
Specifies the absolute path to the location of the initialization option file.
-
/home/adbmanager/db
Specifies the absolute path to the DB directory in which the DB areas that are created will be stored. Note that the DB directory name specified here must be the same as the DB directory name specified in the adb_db_path operand of the server definition.
Messages are output when DB areas are created. The following shows an example of the output messages.
- ■ Example of the output messages
-
KFAA90000-I adbinit processing started. KFAA96201-I Database initialization started. KFAA96204-I The DB directory "/home/adbmanager/db" is initialized. KFAA96233-I Initialization of file "ADBUIDX01" is complete. (size = 5456 KB, information = 7fd0dc15-f7b8-45ca-a178-1a1292c80fcc) KFAA96233-I Initialization of file "ADBUTBL01" is complete. (size = 5440 KB, information = df7978f1-9f7a-4bcf-a477-61056297a71c) KFAA96202-I Database initialization ended. (return code = 0) KFAA90001-I adbinit processing ended. (return code = 0)
(2) Confirming the created DB areas
To verify that DB areas were created by the adbinit command, enter the following operating system command and press Enter:
ls /home/adbmanager/db
Executing the ls command, you can verify that the directories and files have been created under the specified directory. The following shows an example of the execution result.
- ■ Execution result example
-
ADBDIC ADBMST ADBSTBL ADBSYS ADBUIDX01 ADBUTBL01 ADBWORK ADBWRK SPOOL
Once you have confirmed that DB areas exist, creation of DB areas is complete.
(3) Related item
- ■ When creating DB areas by initializing the database
-
The related items when using the DB area creation command (adbinit command) are as follows:
-
adbinit (Initialize the Database) in the manual HADB Command Reference
-
- ■ When adding or modifying DB areas after initializing the database
-
The related items when using the command for adding and changing DB areas (adbmodarea command) are as follows:
-
adbmodarea (Add and Change DB Areas) in the manual HADB Command Reference
-