Tibero Environment

It describes management tools, directories, environment variables, and configuration files for a Tibero environment.

Management Tools

This section describes management tools for a Tibero environment.

tbSQL

tbSQL is an interactive utility provided by Tibero®(hereafter Tibero) to process SQL statements. This utility can process SQL queries, Data Definition Language (DDL), and transactional SQL statements. It can also be used to create and execute PSM programs, and DBAs can execute commands to manage Tibero systems.

In addition, tbSQL provides many other functions, such as auto commit setting, OS command execution, output save, and script creation. The script function allows the user to conveniently create SQL statements, PSM programs, and tbSQL utility commands into a single script file.

tbSQL is one of the most frequently used utility in Tibero. It provides the following functions in addition to executing SQL statements.

  • Input, edit, save, and execute general SQL statements and PSM programs

  • Configure and terminate of a transaction

  • Batch processing using a script

  • Management of database by a DBA

  • Start and terminate a database

  • Execute external utilities and programs

  • Configure the tbSQL utility

T-Up

T-Up is a utility provided by Tibero DB. This utility provides function for checking compatibility before migration and migrating all or partial database schema objects to Tibero.

The following are the features provided by T-Up.

Compatibility Analysis

Compatibility analysis determines if the source database's schema objects, SQL statements, and database related APIs can be supported in Tibero and analyzes causes for any unsupported items.

  • – Evaluates compatibility of source database's schema objects, SQL statements, and application APIs.

  • – Provides analysis result report in HTML.

Migration

The migration function migrates schema objects, such as tables, indexes, and views, PSM programs, etc. from the source database to Tibero DB so that they can be used as before.

  • – Migrates user-selected data to Tibero.

  • – Migrates schema objects, such as tables, indexes, views, and synonyms, and various constraints defined on the tables.

  • – Migrates privileges and roles.

  • – Provides information about the target database for migration.

  • – Provides various migration methods with the [Option] button.

  • – Displays migration progress through the Progress screen.

T-Up is implemented in Java, and requires Java 6 or later. Before starting T-Up, the target database's JDBC driver file path must be set to the classpath setting in the execution script.

T-Up functions described in this chapter include those described in Tibero 6 FS06.

tbExport

tbExport is the export utility provided by Tibero.

This utility helps to export all or some part of a schema object saved in a Tibero When you export one schema object using tbExport utility, the related schema objects will also be exported automatically. For example, if you export one table, the constraints and indexes that are created with the table will also be exported. If necessary, it is possible to stop some of the related schema objects from being exported.

tbExport has three modes: full data mode, user mode, and table mode.

Those modes can only be used by a DBA. If DBA privilege cannot be granted, it is recommended to grant the SELECT ANY DICTIONARY privilege.

The files created through the tbExport utility are OS files. Therefore, unlike Tibero Specify the log created while exporting by using the LOG parameter.

The following describes the Complete, Alert, and Error messages created as a result of executing the tbExport utility.

Item
Description

Complete Message

Displayed when the export has been successfully processed.

Alert Message

Displayed when the export has finished, but something is wrong.

It occurs when users try to export a table that does not exist. In this case, the tbExport displays an Alert message, skips the corresponding table, and then continues with exporting the next object.

Error Message

Displayed when an error occurs during export and the export cannot continue.

It occurs when the export cannot be processed anymore because of, for example, a shortage of system memory or failure of creating a necessary view for the export. After this error message is displayed, the export session will be terminated.

tbExport utility has the following features.

Logical Backup

– Extracts the data and internal schema of Tibero.

Data with Different Point of Time

When exporting many tables at once, data in the tables will not be exported all at the same time. The data will be exported in order.

Saving the Table Definition

– Saves the table definition (DDL script of a table) regardless of the data existence.

Reorganizing the Table

After creating a table, it removes all the fragmentations and migrated rows caused by a lot of DML work.

tbImport

tbImport is the import utility provided by Tibero.

It can import the schema object saved in an external file into the Tibero database. Along with tbExport utility, this utility is useful when processing a database backup and transmitting a database between different machines. The tbImportutility has functions similar or symmetrical to the tbExport utility.

When you import one schema object using the tbImport utility, related schema objects will also be imported automatically. If necessary, it is possible to block some of the related schema objects from being imported.

tbImport has three modes like the tbExport utility: full database mode, user mode, and table mode.

Those modes only be used by a DBA. If DBA privilege cannot be granted, it is recommended to grant the SELECT ANY DICTIONARY privilege.

Logs created while importing by using the LOG parameter should be specified.

The following describes the Complete, Alert, and Error messages created as a result of executing tbImport.

Item
Description

Complete Message

Displayed when the import has been successfully processed.

Alert Message

Displayed when the import has been finished, but something is wrong.

Error Message

Displayed when an error occurs during import and the import cannot continue.

tbLoader

tbLoader is a utility designed to load a large amount of data into a Tibero database at once. With tbLoader, the user does not need to create SQL statements to insert data into the database. Instead, column data can be converted into a general text file and loaded into the database. tbLoader is useful when loading a lot of data into Tibero database.

tbLoader enables the user to easily create data files and reduce the data loading time.


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

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

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

The following are about 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 tbpc utility, 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

Config contains the configuration files for Tibero.

The $TB_SID.tip file in this directory determines Tibero's environment settings.

database

The following are about subdirectories.

$TB_SID

$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

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

Instance

The following are about subdirectories.

$TB_SID/audit

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

$TB_SID/log

$TB_SID/log saves 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

$TB_SID/dump contains dump files generated because of DDL or errors in Tibero.

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

$TB_SID/path contains the socket files used for interprocess communication in Tibero.

lib

lib contains the spatial function library files for Tibero.

license

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

The following is about the subdirectory.

Subdirectory
Description

oss_licenses

Contains the open license terms that must be complied when using Tibero.

nls

The following is about the subdirectory.

Subdirectory
Description

zoneinfo

Contains the time zone information file for Tibero.

scripts

Scripts contain 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 about the subdirectory.

Subdirectory
Description

pkg

Contains the package creation statements for Tibero


Installation Environment

If Tibero is installed normally the system needs to specify the following environment variables:

Environment Variable
Description

$TB_HOME

Home directory where Tibero is installed.

It contains the Tibero server, client libraries, and other files for additional features.

$TB_SID

Service ID used when a machine runs multiple instances of Tibero

$PATH

Paths to certain files

If environment variables are not properly specified, Tibero cannot be used. Therefore, it is recommended to check the environment variables in advance.

This guide follows the syntax of GNU Bash for the execution of UNIX shell commands. Depending on the shell type, the syntax may differ.

For more details on this, check the operating system's guide.

The environment variables can be checked in a UNIX shell prompt as follows.

$TB_HOME

This directory contains the Tibero server, client libraries, and other files for additional features.

$ echo $TB_HOME 
/home/tibero/tibero7

$TB_SID

It is recommended to specify the service ID as the database name.

$ echo $TB_SID 
Tb7

$PATH

$ echo $PATH
...:/home/tibero/tibero7/bin:/home/tibero/tibero7/client/bin:...

$PATH must include the following directories:

Directory
Description

$TB_HOME/bin

Contains Tibero's executable files and utilities for server management

$TB_HOME/client/bin

Contains Tibero's client executable file


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

TInstallation 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.

when a process is abnormally terminated On Unix, 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

Even if a user's configuration file has been created as above, it is not actually applied.

To apply the configuration file, proceed the following steps.

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

sh .profile

  1. Run the following command to check the configuration file is properly applied.

Linux

echo $TB_HOME

Windows

echo %TB_HOME%

Last updated