Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Check DB_NAME in altibase.properties
Code Block
themeDJango
languagebash
$ cat $ALTIBASE_HOME/conf/altibase.properties | grep DB_NAME
DB_NAME       =  mydb
  • If DB_NAME is not mydb (default), the server file must be changed. 
    (Change mydb in create database mydb command to DB_NAME)
Code Block
themeDJango
languagebash
$ vi $ALTIBASE_HOME/bin/server
...
startup process;
create database mydb INITSIZE=10M noarchivelog character set $2 national character set $3;
quit
EOF
...
  • Create a database.
    (server create 'database charset' 'national charset')
Code Block
themeDJango
languagebash
$ 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)
...
  • Or, the user can create a database as follows.
Code Block
themeDJango
languagebash
$ 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 archive log mode can be set at the control stage.
  • Therefore, in order to change from No Archive log mode to Archive log mode, the user must shut down Altibase and enter the control stage during the startup process.
  • In the archive log mode, the archive log file requires user management because Altibase only replicates the log file to the designated archive log file directory and does not delete it arbitrarily.
  • It is necessary to secure the archive log file directory space in consideration of the backup cycle and the number of log files created within that cycle.
Code Block
themeDJango
languagebash
$ 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

...

  • To check whether the database is dropped normally, check before dropping the data files and log files to be deleted.
Code Block
themeDJango
languagebash
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

...

  • After Altibase is shut down, the database is dropped in the process stage.
Code Block
themeDJango
languagebash
$ 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 

...