Overview


This document provides a guide on how to create an Altibase database.

For errors and improvements related to this document, please contact the technical support portal or technical support center.

 

How to create a database


This section describes how to create a database of versions supported according to Altibase's End of Service (EOS) policy. As for this document, the latest Altibase version is 'Altibase ver. 7' and 'Altibase ver 6 or below' are for EOS. Altibase cannot be operated until the database is created, so the database must be created as follows before starting the Altibase.

$ cat $ALTIBASE_HOME/conf/altibase.properties | grep DB_NAME
DB_NAME       =  mydb
$ vi $ALTIBASE_HOME/bin/server
...
startup process;
create database mydb INITSIZE=10M noarchivelog character set $2 national character set $3;
quit
EOF
...
$ server create MS949 UTF16
-----------------------------------------------------------------
Altibase Client Query utility.
Release Version 6.1.1.3.1
Copyright 2000, ALTIBASE Corporation or its subsidiaries.
All Rights Reserved.
-----------------------------------------------------------------
ISQL_CONNECTION = UNIX, SERVER = localhost, PORT_NO = 20300
[ERR-910FB : Connected to idle instance]
Connecting to the DB server.... Connected.

TRANSITION TO PHASE : PROCESS
Command executed successfully.
DB Info (Page Size = 32768)
(Page Count = 257)
(Total DB Size = 8421376)
(DB File Size = 1073741824)
...
$ isql -u sys -p manager -sysdba...
iSQL(sysdba)> startup process
...
iSQL(sysdba)> create database mydb INITSIZE=10M noarchivelog character set MS949 national character set UTF16;
...
iSQL(sysdba)> exit

The meaning of each character set is as follows.

Item
Description
Database character set

This means a character set stored in the database.

(US7ASCII, KO16KSC5601, MS949, BIG5, GB231280, UTF8, SHIFTJIS, EUCJP)

National character set

This means a Unicode-based character set stored in NVARCHAR and NVARCHAR2.

(UTF8, UTF16)

Considerations when creating a database


Things to be considered when creating a database are as follows.

Archive log mode


$ server stop 
$ isql -u sys -p manager -sysdba
...
iSQL(sysdba)> startup control;
...
iSQL(sysdba)> alter database archivelog;
Alter success.
iSQL(sysdba)> startup service;
...
Command executed successfully.
iSQL(sysdba)> exit

DB_NAME


How to drop a database


The user can drop the database by deleting all Altiabse configuration files.

Check the files to be dropped


iSQL> select name, checkpoint_path from v$tablespaces a, v$mem_tablespace_checkpoint_paths b where a.id = b.space_id; 
iSQL> select a.name, b.name from v$tablespaces a, v$datafiles b where a.id = b.spaceid;
 
$ cat $ALTIBASE_HOME/conf/altibase.properties | grep ^LOG | grep DIR

Dropping a database


$ isql -u sys -p manager -sysdba...
iSQL(sysdba)> startup process;
Connecting to the DB server.... Connected.
 
TRANSITION TO PHASE : PROCESS
Command executed successfully.
 
 
iSQL(sysdba)> drop database mydb;
Checking Log Anchor files
[Ok] /home/altibase/altibase_home/logs/loganchor0 Exist.
[Ok] /home/altibase/altibase_home/logs/loganchor1 Exist.
[Ok] /home/altibase/altibase_home/logs/loganchor2 Exist.
Removing DB files
Removing Log files
Removing Log Anchor files
Drop success.
 
iSQL(sysdba)> exit