Sign inSign up

tiberoofficial/tibero

By tiberoofficial

•Updated about 2 months ago

Tibero is a enterprise relational database management system (RDBMS).

Image
Databases & storage
3

2.5K

tiberoofficial/tibero repository overview

⁠What is Tibero?

Tibero is a high-performance, highly secure, highly scalable relational database management system (RDBMS) for enterprises that want to fully leverage their mission-critical data. In a world where data is at the core of everything, Tibero provides an enhanced view of processing, managing and securing large-scale databases.

For more information and related to Tibero and other Tibero products, please visit website⁠


⁠How to use this image

⁠Prerequiste

Tibero's licensing policy supports only a one-month demo license or a paid license. Therefore, if you intend to use the Tibero Docker image without a paid license, please obtain a demo license from the following website⁠ and proceed with the steps below.

⁠Start a Tibero Instance

Tibero only runs when the hostname specified in the license file matches the hostname of the running environment. For this reason, you must provide the same hostname used when issuing the license file as a docker run argument in order for Tibero to recognize the license properly.

$ docker run --name tibero -h <license-hostname> -e TB_ROOT_PASSWORD=your-secret-pw -v path/of/your/license.xml:/opt/tibero7/license/license.xml -d tibero:tag

⁠Connecting to Tibero Database Server Container

⁠Connecting from within the container

You can connect to Tibero Database server by executing a tbsql2 command from within the container using one of the following commands:

$ docker exec -it <tibero-db> tbsql2 sys/<tb_root_password>
$ docker exec -it <tibero-db> tbsql2 <tb_user>/<password>
$ docker exec -it <tibero-db> tbsql2 <tb_user>/<password>@<your_SID>

⁠Connection from outside of container

By default, Tibero Database server exposes port 8629 for Tibero client connections*. tbsql2* or any Tibero Java Database Connectivity (JDBC) client can be used to connect to the database server from outside of the container.

To connect from outside of the container, start the container with -poption.

To connect from outside of the container using tbsql2, execute the following:

$ tbsql2 sys/<your_password>@((INSTANCE=(HOST=localhost)(PORT=<exposed_port>)(DB_NAME=<your_sid>)))

More information about the tbsql be found in the documentation⁠

⁠Container shell access and viewing Tibero logs

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your tibero container:

$ docker exec -it some-tibero bash

The log is available through Docker's container log:

$ docker logs some-tibero

⁠Configuration

The default configuration of this image is designed for an environment with 2 CPU cores and 4GB of memory. See the Tibero Manual⁠ for information on using and configuring Tibero

⁠Requirements

  • At least 4GB of RAM. Make sure to assign enough memory to the Docker VM.

  • Requires the following environment flags

    "TB_ROOT_PASSWORD=<your_strong_password>"

⁠Using a custom Tibero configuration file

The default configuration for Tibero can be found in /opt/tibero7/config/<tb_sid>.tip. Please inspect the relevant files and directories within the tibero image itself for more details.

If /my/custom/config-file.tip is the path and name of your custom configuration file, you can start your tibero container like this :

$ docker run --name some-tibero -v /your/custom/config:/opt/tibero7/config/<tb_sid>.tip -v path/to/local/license.xml:/opt/tibero7/license/license.xml -h <license-hostname> -e TB_ROOT_PASSWORD=your-secret-pw -d tibero:tag

This will start a new container some-tibero where the Tibero instance uses the combined startup settings from /opt/tibero7/config/<tb_sid>.tip.

⁠Environment Variables

The Tibero image uses several environment variables which are easy to miss. The only variable required is TIBERO_ROOT_PASSWORD, the rest are optional.

Warning: the Docker specific variables will only have an effect if you start the container with a data directory that is empty; any pre-existing database will be left untouched on container startup.

  • TB_ROOT_PASSWORD: (Required) Sets the password for the SYS user (equivalent to root in other DBs). Must be specified.
  • BOOT_POLICY: (Optional) Defines whether the container should automatically install and boot Tibero (auto) or just stay alive without installing or starting it (manual). Default is auto.
  • TB_USER, TB_PASSWORD: (Optional) These variables are used in conjunction to create a new user and to set that user's password. This user will be granted dba permissions. Both variables are required for a user to be created.
  • TB_SID: (Optional) Sets the system identifier (SID) of the Tibero database instance. Default is TIBERO.
  • CHAR_SET: (Optional) Sets the default character set for text data. Default is UTF8.
  • NCHAR_SET: (Optional) Sets the national character set for NCHAR and NVARCHAR types. Default is UTF16.
  • MAX_DATAFILE: (Optional) Maximum number of data files allowed. Default is 100.
  • MAX_LOGGROUP: (Optional) Maximum number of redo log groups. Default is 255.
  • MAX_LOGMEMBER: (Optional) Maximum number of log files per log group. Default is 8.
  • LOG_SIZE: (Optional) Size of each redo log file. Default is 50M.
  • LOG_GROUP: (Optional) Number of redo log groups to create. Default is 3.
  • LOG_FILE: (Optional) Number of log files per group. Default is 1.
  • LOG_DIR: (Optional) Directory where redo logs are stored. Default is /opt/tibero7/database/tibero.
  • SYSTEM_SIZE: (Optional) Initial size of the SYSTEM tablespace. Default is 100M.
  • SYSTEM_DIR: (Optional) Directory for the SYSTEM tablespace datafile. Default is /opt/tibero7/database/tibero.
  • SYSTEM_AUTOEXTEND: (Optional) Enables auto-extension for SYSTEM tablespace. Use y or n. Default is y.
  • SYSTEM_NEXT_SIZE: (Optional) Size increment for SYSTEM auto-extend. Default is 10M.
  • SYSTEM_MAXSIZE: (Optional) Maximum size for SYSTEM tablespace. Default is unlimited.
  • TEMP_SIZE: (Optional) Initial size of the TEMP tablespace. Default is 100M.
  • TEMP_DIR: (Optional) Directory for the TEMP tablespace datafile. Default is /opt/tibero7/database/tibero.
  • TEMP_AUTOEXTEND: (Optional) Enables auto-extension for TEMP tablespace. Use y or n. Default is y.
  • TEMP_NEXT_SIZE: (Optional) Size increment for TEMP auto-extend. Default is 10M.
  • TEMP_MAXSIZE: (Optional) Maximum size for TEMP tablespace. Default is unlimited.
  • UNDO_SIZE: (Optional) Initial size of the UNDO tablespace. Default is 200M.
  • UNDO_DIR: (Optional) Directory for the UNDO tablespace datafile. Default is /opt/tibero7/database/tibero.
  • UNDO_AUTOEXTEND: (Optional) Enables auto-extension for UNDO tablespace. Use y or n. Default is y.
  • UNDO_NEXT_SIZE: (Optional) Size increment for UNDO auto-extend. Default is 10M.
  • UNDO_MAXSIZE: (Optional) Maximum size for UNDO tablespace. Default is unlimited.
  • USR_SIZE: (Optional) Initial size of the USR tablespace. Default is 100M.
  • USR_DIR: (Optional) Directory for the USR tablespace datafile. Default is /opt/tibero7/database/tibero.
  • USR_AUTOEXTEND: (Optional) Enables auto-extension for USR tablespace. Use y or n. Default is y.
  • USR_NEXT_SIZE: (Optional) Size increment for USR auto-extend. Default is 10M.
  • USR_MAXSIZE: (Optional) Maximum size for USR tablespace. Default is unlimited.
  • SYSSUB_SIZE: (Optional) Initial size of the SYSSUB tablespace. Default is 10M.
  • SYSSUB_DIR: (Optional) Directory for the SYSSUB tablespace datafile. Default is /opt/tibero7/database/tibero.
  • SYSSUB_AUTOEXTEND: (Optional) Enables auto-extension for SYSSUB tablespace. Use y or n. Default is y.
  • SYSSUB_NEXT_SIZE: (Optional) Size increment for SYSSUB auto-extend. Default is 10M.
  • SYSSUB_MAXSIZE: (Optional) Maximum size for SYSSUB tablespace. Default is unlimited.
  • ARCHIVE_LOG_MODE: (Optional) Activate archive log mode. Use y or n. Default is n
  • LOG_ARCHIVE_DEST: (Optional) Directory where archive logs are stored. This option is ignored if a custom tip file is used. Default is /opt/tibero7/database/tibero/archive.

⁠Docker Secrets

As an alternative to passing sensitive information via environment variables, _FILE may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. For example:

$ docker service create --name secret-tibero --hostname <license-hostname> --secret tb_root_password -e TB_ROOT_PASSWORD_FILE=/run/secrets/tb_root_password --mount type=bind,source=/your/own/license/path,target=/opt/tibero7/license/license.xml tibero:tag 

Currently, this is only supported for TB_ROOT_PASSWORD_FILE, TB_USER_FILE and TB_PASSWORD_FILE.


⁠Caveats

⁠Where to Store Data

Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the tibero images to familiarize themselves with the options available, including:

  • Let Docker manage the storage of your database data by writing the database files to disk on the host system using its own internal volume management⁠⁠. This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers.
  • Create a data directory on the host system (outside the container) and mount this to a directory visible from inside the container⁠⁠. This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly.

The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:

  1. Create a data directory on a suitable volume on your host system, e.g. /my/own/datadir.
  2. Start your tibero container like this:
    $ docker run --name some-tibero -v /your/own/datadir:/opt/tibero7/database -v /your/own/license-file:/opt/tibero7/license/license.xml -h license-hostname -e TB_ROOT_PASSWORD=my-secret-pw -d tibero:tag
    

The -v /my/own/datadir:/opt/tibero7/database part of the command mounts the /my/own/datadir directory from the underlying host system as /opt/tibero7/database inside the container, where Tibero by default will write its data files.

⁠Creating database dumps

For backup data. You can use docker exec command, similar to the following:

$ docker exec <tibero-db> /opt/tibero7/client/bin/tbexportv2 username=sys password=<TB_ROOT_PASSWORD> sid=<TIBERO_SID>  full=y

For more information and related to tbexport , please visit docs⁠

Tag summary

Content type

Image

Digest

sha256:9132b7e39…

Size

1.1 GB

Last updated

about 2 months ago

docker pull tiberoofficial/tibero