Installation

This chapter describes how to install Tibero.

Tibero can be installed using an installer or manually.

An installation file in the format of tibero7-bin-<fixset>_<platform>.tar.gz is used for all platforms.

Manual Installation

Tibero can be manually installed in all supported platforms. This is referred to as "manual installation".

UNIX

The following is the manual installation process of Tibero for Unix.

  1. Prepare the following two files.

  • Binary executable file (tar.gz)

  • License file (license.xml)

  1. Set the environment variables in the environment configuration files (.bashrc, .bash_profile, .profile, etc.) for each OS user account. The following are examples of environment variables and their values.

export TB_HOME=/home/tibero/Tibero/tibero7 
export TB_SID=tibero
export LD_LIBRARY_PATH=$TB_HOME/lib:$TB_HOME/client/lib 
export PATH=$PATH:$TB_HOME/bin:$TB_HOME/client/bin

The environment variable configuration method varies with different OSs. For more information, refer to the respective OS guide.

For more information about each environment variable, refer to “Applying and Verifying User Configuration File”.

  1. Extract the compressed binary executable file (tar.gz) to home/tibero/Tibero. Copy the issued license file (license.xml) to the license subdirectory in %TB_HOME%.

  2. Enter the following command from the $TB_HOME/config path.

gen_tip.sh

After executing the command, the configuration file (.tip), tbdsn.tbr, and psm_commands.bat are created.

tibero@Tibero:~/Tibero/tibero7/config$ gen_tip.sh
Using TB_SID "tibero"
/home/tibero/Tibero/tibero7/config/tibero.tip generated
/home/tibero/Tibero/tibero7/config/psm_commands generated
/home/tibero/Tibero/tibero7/client/config/tbdsn.tbr generated. 
Running client/config/gen_esql_cfg.sh
Done.

  1. Start the Tibero server in 'NOMOUNT Mode'.

tibero@Tibero:~/Tibero/tibero7/bin$ tbboot nomount 
Change core dump dir to /home/tibero7/tibero7/bin/prof. 
Listener port = 8629

Tibero7

TmaxData Corporation Copyright (c) 2008-. All rights reserved. 
Tibero instance started up (NOMOUNT mode).

  1. Connect to the database by using the tbSQL utility. In the following example, the 'sys' account is used to connect to the database.

tibero@Tibero:~/Tibero/tibero7/client/bin$ tbsql sys/tibero

tbSQL 7

TmaxData Corporation Copyright (c) 2008-. All rights reserved.

Connected to Tibero.

SQL>

  1. Create a database using the CREATE DATABASE statement. In the following example, a database named 'tibero' is created.

SQL> create database "tibero" 
    user sys identified by tibero 
    maxinstances 8
    maxdatafiles 100 
    character set MSWIN949
    national character set UTF16 
    logfile
        group 1 'log001.log' size 50M, 
        group 2 'log002.log' size 50M, 
        group 3 'log003.log' size 50M
    maxloggroups 255
    maxlogmembers 8 
    noarchivelog
        datafile 'system001.dtf' size 100M autoextend on next 10M maxsize unlimited 
        default temporary tablespace TEMP
            tempfile 'temp001.dtf' size 100M autoextend on next 10M maxsize unlimited 
            extent management local autoallocate
        undo tablespace UNDO
            datafile 'undo001.dtf' size 200M autoextend on next 10M maxsize unlimited 
            extent management local autoallocate
        SYSSUB
            datafile 'syssub001.dtf' size 10M autoextend on next 10M maxsize unlimited 
        default tablespace USR
            datafile 'usr001.dtf' size 100M autoextend on next 10M maxsize unlimited 
            extent management local autoallocate;
Database created.

SQL> quit 
Disconnected.

The following describes each setting item in the process.

Item
Description

maxdatafiles

Sets the maximum value of data files in the database. (Default value: 100)

character set

Sets the character set of the database.

maxloggroups

Sets the maximum value of log groups. (Default value: 255)

maxlogmembers

Sets the maximum value of log files in a log group. (Default value: 8)

Note

For more information about the CREATE DATABASE statement, refer to Tibero SQL Reference Guide.

  1. After the database is created, run the tbboot command to restart Tibero.

tibero@Tibero:~/Tibero/tibero7/bin$ tbboot
Change core dump dir to /home/tibero7/tibero7/bin/prof. 
Listener port = 25010

Tibero 7

TmaxData Corporation Copyright (c) 2008-. All rights reserved. 
Tibero instance started up (NORMAL mode).

  1. Enter the system.sh script from $TB_HOME/scripts directory to execute the SQL file in the current directory. The SQL file creates roles, system users, views, packages, etc. (The default passwords for the sys and syscat accounts are tibero and syscat, respectively.)

tibero@Tibero:~/Tibero/tibero7/scripts$ system.sh
Enter SYS password:

Enter SYSCAT password:

Creating the role DBA...
create default system users & roles?(Y/N):

Creating system users & roles... 
Creating virtual tables(1)...
Creating virtual tables(2)... 
Granting public access to _VT_DUAL...
Creating the system generated sequences... 
Creating internal dynamic performance views... 
Creating outline table...
Creating system package specifications:
    Running /home/tibero/Tibero/tibero7/scripts/pkg/pkg_standard.sql... 
    Running /home/tibero/Tibero/tibero7/scripts/pkg/pkg_dbms_output.sql... 
    Running /home/tibero/Tibero/tibero7/scripts/pkg/pkg_dbms_lob.sql...
    Running /home/tibero/Tibero/tibero7/scripts/pkg/pkg_dbms_utility.sql...
    ......omitted......
    
Creating spatial meta tables and views ...
Creating internal system jobs...
Creating internal system notice queue ...
Done.
For details, check /home/tibero7/tibero7/instance/tibero/log/system_init.log.

Note

For more information about options provided in system.sh(.vbs), refer to Appendix “system.sh”.

  1. After the Tibero installation is complete, the Tibero process starts. To check the process state, execute the following command.

tibero@Tibero:~/Tibero/tibero7/scripts$ ps -ef | grep tbsvr
tibero	19981	1	0	21:12	pts/2	00:00:00	tbsvr	        ...
tibero	19983	19981	0	21:12	pts/2	00:00:00	tbsvr_TBMP	...
tibero	19984	19981	0	21:12	pts/2	00:00:00	tbsvr_WP000	...
tibero	19985	19981	3	21:12	pts/2	00:00:00	tbsvr_WP001	...
tibero	19986	19981	1	21:12	pts/2	00:00:12	tbsvr_WP002	...
tibero	19987	19981	2	21:12	pts/2	00:00:12	tbsvr_PEP000	...
tibero	19988	19981	0	21:12	pts/2	00:00:00	tbsvr_AGNT	...
tibero	19989	19981	1	21:12	pts/2	00:00:00	tbsvr_DBWR	...
tibero	19999	19981	0	21:12	pts/2	00:00:00	tbsvr_RECO	...


Installation Verification

This section describes how to verify whether Tibero has been successfully installed.

Directory Structure

The following directory structure is created after installing Tibero.

$TB_HOME
    +- bin
    |	|
    |	+- update
    |
    +- client
    |   |
    |   +- bin
    |   +- config
    |   +- include
    |   +- lib
    |   |   |
    |   |   +- jar
    |   |   +- php
    |   +- ssl
    |   |   |
    |   |   +- misc
    |   +- epa
    |	|
    |	+- java
    |	|
    |	+- config
    |	+- lib
    |
    +- config
    |
    +- database
    |	+- $TB_SID
    |	|
    |	+- java
    |
    +- instance
    |	|
    |	+- $TB_SID
    |	|
    |	+- audit
    |	+- dump
    |	| |
    |	| +- act
    |	| +- diag
    |	| +- tracedump
    |	+- log
    |	| +- dlog
    |	| +- ilog
    |	| +- lsnr
    |	| +- slog
    |	| +- sqltrace
    |	+- path
    |
    +- lib
    |
    +- license
    | |
    | +- oss_licenses
    |
    +- nls
    | |
    | +- zoneinfo
    |
    +- scripts
        |
        +- pkg

Note

The $TB_SID in the above directory structure is replaced by the server SID according to each system environment.

The following are the default directories in Tibero.

bin

Contains Tibero executables and server management utilities. The tbsvr and tblistener files are executables for creating the Tibero, and tbboot and tbdown are used to start up and shut down the Tibero.

client

Contains the following subdirectories.

Subdirectories
Description

bin

Contains the following Tibero client executables (utilities).

  • tbSQL : Basic client program for executing SQL queries and checking their results.

  • T-Up : Utility for migrating data to and checking compatibility with Tibero from another database.

  • tbExport : Utility for writing data to an external file for data migration or logical backup.

  • tbImport : Utility for importing data from an external file.

  • tbLoader : Utility for loading a large amount of data into the database.

  • tbpc : Utility for converting embedded SQL in a C program to C so that the program can be compiled by a C compiler.

For further details on utilities, refer to Tibero Utilities Guide. For the tbpcutility however, refer to TiberotbESQL/C Guide.

config

Contains configuration file for executing a Tibero client program.

include

Contains the header files for creating a Tibero client program.

lib

Contains the library files for creating a Tibero client program. For more information, refer to Tibero Application Developer's Guide and

TiberotbESQL/C Guide.

ssl

Contains certificate and key files for server security.

epa

Contains configuration and log files related to external procedures. For more

information, refer to Tibero External Procedure Guide.

config

Contains the configuration files for Tibero. The $TB_SID.tip file in this directory contains the environment settings for Tibero.

database

Contains the following subdirectories.

  • $TB_SID Contains all database information unless it is configured separately. It includes the metadata and the following file types.

File
Description

Control File

Contains the location of all other files.

Data File

Contains the actual data.

Log File

Contains all data changes for use during data recovery.

  • $TB_SID/java Contains Java EPA class file unless JAVA_CLASS_PATH is defined.

instance

Contains the following subdirectories.

  • $TB_SID/audit Contains the audit files that records activities of database users using system privileges or schema object privileges.

  • $TB_SID/log Contains system log (slog), DBMS log (dlog), internal log (ilog), listener log (lsnr), and memlog files of Tibero.

File
Description

System log file (slog)

Used for debugging. This file logs all server activities in detail that can be used for troubleshooting performance issues or resolve bugs within Tibero.

DBMS log file (dlog)

Records more important server activities than the system log file. It records about server startup and mode, ddl executions, etc.

Internal log file (ilog)

Records system logs for events configured for each thread. Use tbiv to view the logs.

Listener log file (lsnr)

Used for debugging Listener objects. It records important activities in Listeners objects and the logs are used for debugging purposes.

System log, DBMS log, internal log, and listener log files are accumulated as the database operates. The maximum size of the log directory can be set, and Tibero deletes old files if the maximum size is reached.

The following are the initialization parameters for a DBMS log file.

Initialization Parameter
Description

DBMS_LOG_FILE_SIZE

Maximum DBMS log file size.

DBMS_LOG_TOTAL_SIZE_LIMIT

Maximum size of the directory where DBMS log files are saved.

SLOG_FILE_SIZE

Maximum system log file size.

SLOG_TOTAL_SIZE_LIMIT

Maximum size of the directory where system log files are saved.

ILOG_FILE_SIZE

Maximum internal log file size.

ILOG_TOTAL_SIZE_LIMIT

Maximum size of the directory where internal log files are saved.

LSNR_LOG_FILE_SIZE

Maximum listener log file size.

LSNR_LOG_TOTAL_SIZE_LIMIT

Maximum size of the directory where listener log files are saved.

  • $TB_SID/dump Contains dump files generated because of errors.

Subdirectory
Description

act

Contains information generated by thread activity monitoring.

diag

Contains log and dump files generated when the diag function is used in TAC.

tracedump

Contains information for SQL and PSM error debugging and dump files generated by a DDL command for dump.

  • $TB_SID/path Contains the socket files used for interprocess communication in Tibero. The files in this directory must not be read or updated while Tibero is running.

lib

Contains the spatial function library files for Tibero.

license

Contains the Tibero (license.xml). This XML file can be opened using a text editor to check its contents.

The following is the subdirectory.

Subdirectory
Description

oss_licenses

Contains the open license terms that must be complied with when using

Tibero.

nls

Contains the following subdirectory.

Subdirectory
Description

zoneinfo

Contains the time zone information file for Tibero.

scripts

Contains various SQL statements used when creating a database in Tibero. It also includes various view definitions that reflect the current state of Tibero.

The following is the subdirectory.

Subdirectory
Description

pkg

Contains the package creation statements for Tibero.

Applying and Verifying User Configuration File

After Tibero is installed, the following properties are added in the user configuration file.

Environment Variable
Description

TB_HOME

Installation path of Tibero. If you didn't specify the path, {user home directory}/Tibero/tibero7 is set as TB_HOME by default.

TB_SID

SID entered during installation. If not entered, it is set to tibero by default.

LD_LIBRARY_PATH

Path to the shared libraries required to use Tibero. All required libraries are located in $TB_HOME/lib and $TB_HOME/client/lib, and the environment variables vary by the OS type.

  • SunOS, Linux: LD_LIBRARY_PATH

  • AIX: LIBPATH

PATH

Directory paths to Tibero. It is set to $TB_HOME/bin and $TB_HOME/client/bin by default.

In Unix, when a process is abnormally terminated, virtual memory information remains on the disk. This process is called a core dump. It requires significant amounts of computing resources and temporarily lowers system performance during execution, and the dump files generated in the process take up a large part of disk space. Therefore, this process is not recommended for Tibero.

To disable the core dump feature, add the following command to the configuration file (.profile) of the user account.

ulimit -c 0

Because the user configuration file has been created as previously described does not mean it is actually applied. You need to perform the following to apply the configuration file.

  1. Run the following command to apply the configuration file. Valid only in Unix systems (including Linux).

sh .profile

  1. To verify whether the configuration file is properly applied, run the following commands.

echo $TB_HOME

Startup and Shutdown

Only database administrators (DBAs) are allowed to start up or shut down Tibero.

Startup

Executes the following tbboot command to start up Tibero.

tbboot [-h] [-v] [-l] [-C] [-c] [-t BOOTMODE]
Option
Description

-h

Displays help for the tbboot command.

-v

Displays the current version information of Tibero .

-l

Displays the license information of Tibero.

-C

Displays character sets supported by Tibero.

-c

Disables Replication mode when Tibero is set to the replication mode.

-t BOOTMODE

Starts Tibero in different modes. (Optional)

Tibero uses the tbboot command to choose one of the following booting modes.

  • NOMOUNT: Only starts up the Tibero process.

  • MOUNT: Supports database management functions such as media recovery.

  • RECOVERY: Runs a standby database when configuring a Tibero Standby Cluster.

  • NORMAL: Enables normal use of all database functions.

  • RESETLOGS: Initializes log files when the Tibero server is restarted after a media recovery.

  • READONLY: Only allows the database to be read. No updates are permitted.

  • FAILOVER: Uses Standby as Primary in Tibero Standby Cluster environments.

Shutdown

Tibero is shut down by the tbdown command.

You can run the tbdown command along with options as follows:

tbdown [-h] [-t DOWNMODE]
Option
Description

-h

Displays help for the tbdown command.

-t DOWNMODE

Shuts down the Tibero server in different modes. (Optional)

Tibero uses the tbdown command to choose one of the following shutdown modes.

  • NORMAL: Normally shuts down the database.

  • POST_TX: Shuts down the database after all transactions are complete.

  • IMMEDIATE: Shuts down the database after forcibly terminating all tasks and rolling back any running transactions.

  • ABORT: Forcibly terminates the Tibero processes.

  • SWITCHOVER: Terminates the primary database in the normal mode after synchronizing the primary database with the standby database.

  • ABNORMAL: Forcibly terminates the server process without accessing the Tibero server.

Connecting to the database with a tbSQL utility

Run the tbsql command.

You can enter user ID and password as follows:

tbsql sys/tibero

To connect to the database through a listener, enter @ after the user ID and password, and then the alias set specified in the tbdsn.tbr file.

tbsql sys/tibero@tibero

User Accounts

The following user accounts are automatically created upon the installation of Tibero.

User Account
Description

SYS

Manages database by creating and managing system packages, synonyms, users, roles, virtual tables, sequences, dynamic views, and so on.

SYSCAT

Creates and manages the static catalog views for database management.

SYSGIS

Creates and manages GIS (Geographic Information System)-related tables.

OUTLN

Stores SQL hints for an SQL query to be repeated always with the same query plan.

TIBERO, TIBERO1

Sample user accounts that have been granted CONNECT, RESOURCE and DBA roles.

Last updated