Chapter 30. Prepare the Derby Database for the Tigase Server

Table of Contents

Basic Setup
General Approach

Wojciech Kapcia <> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: :Date: 2012-06-21 13:28

This guide describes how to prepare the Derby database for connecting the Tigase server to it.

Basic Setup

Preparation of the Derby database is quite simple, but the following assumptions are made

  • DerbyDB - Derby database name
  • database/ directory contains all necessary schema files
  • jars/ and libs/ directories contains Tigase and Derby binaries

General Approach

From the main Tigase directory execute following commands (Linux and Windows accordingly)

java -Dij.protocol=jdbc:derby: -Dij.database="DerbyDB;create=true" -cp libs/derby.jar:libs/derbytools.jar:jars/tigase-server.jar database/derby-schema-5.1.sql
java -Dij.protocol=jdbc:derby: -Dij.database="DerbyDB;create=true" -cp libs\derby.jar;libs\derbytools.jar;jars\tigase-server.jar "database\derby-schema-5-1.sql"

This will create Derby database named DerbyDB in the main Tigase directory and load Tigase schema for the version 5.1.

If there is a need to create schema for any other Tigase version then please use schema relevant to the version that you intend to use:

If you run the Tigase server all versions below 4.0:


For the Tigase server version 4.x and later:


For the Tigase server version 5.0 and later:


For the Tigase server version 5.1 and later: