Jive Forums stores all data in a back-end database that you must setup and manage. This document provides setup instructions for all of the currently supported databases.

JDBC 2.0 drivers are required for Jive Forums to communicate with your database. Suggested drivers for particular databases are noted below where applicable. However,the JDBC-ODBC bridge will not work with Jive under any circumstances.

For a full list of available JDBC drivers, please see: http://industry.java.sun.com/products/jdbc/drivers.

All database schema files can be found in the database directory of the Jive Forums installation.

Note that additional databases besides the ones in this list may be supported. Please check the distribution for a database schema for your database or consider creating a schema yourself if one isn't provided.

Choose your database from the list below for setup details:



MySQL

JDBC Drivers

The JDBC driver for MySQL can be found at:

http://www.mysql.com/downloads/api-jdbc.html

If you still have the older mm.mysql JDBC drivers, you are encouraged to upgrade to the newest Connector/J drivers (3.0.2 or later).

In the Jive Forums setup tool, use the following values:

where [YOUR_HOST] and [DATABASE_NAME] are the actual values for you server. In many cases localhost is a suitable value for [YOUR_HOST] when your database is running on the same server as your webserver.

Setup Instructions

  1. Make sure that you are using MySQL 3.23.2 or later and the MyISAM table type (default).
  2. Create a database for the Jive Forums tables:

    mysqladmin create [databaseName]

    (note: "databaseName" can be something like 'jiveforums4')
  3. Import the schema file from the database directory of the installation:

    Unix/Linux: cat jive_forums_mysql.sql | mysql [databaseName];

    Windows: type jive_forums_mysql.sql | mysql [databaseName];
  4. Start the Jive Forums setup tool, and use the appropriate JDBC connection settings.

Character Encoding Issues

MySQL does not have proper Unicode support, which makes supporting postings in non-Western languages difficult. However, the MySQL JDBC driver has a workaround which can be enabled by adding <mysql><useUnicode>true</useUnicode></mysql> to the <database> section of your jive_startup.xml file. When using this setting, you should also set the Jive character encoding to utf-8 in the admin tool. (Related KB Docs: 491 501)

Creating your Database in MySQL 4.1 or Above

MySQL 4.1 introduces better support for character encodings than previous versions. This new functionality will assign a default character encoding to the database and its tables and columns. It is best to set the default character encoding for your database before installing the Jive schema so that you can be sure that you will not have encoding problems in the future. After creating your database, execute the following line in the MySQL console:

ALTER DATABASE <database name> DEFAULT CHARACTER SET <character set>;

For example, if you plan on using UTF-8 in Jive, you should enable the JDBC driver workaround mentioned above and then execute this line in the MySQL console:

ALTER DATABASE <database name> DEFAULT CHARACTER SET utf8;

Further Help

If you need help setting up MySQL, refer to the following sites:

http://dev.mysql.com/doc

Oracle

JDBC Drivers

For most users, the best drivers for Oracle are the ones written by Oracle (which come with the database or can be downloaded from Oracle's website). Jive Software recommends using the "thin" drivers because the "thick" (or OCI drivers) are not stable for use. Please consult the Oracle documentation to decide which version of the JDBC thin driver is best for you. Typically, the drivers are in "classes12.zip" or "classes12.jar". If you use the zip file you may wish to rename the classes12.zip file to classes12.jar or oracle.ar since some application servers will not work correctly with zip files.

Note: Do not use the classes11.zip JDBC driver.

In the Jive Forums setup tool, use the following values:

where [YOUR_HOST] and [ORACLE_SID] are the actual values for you server. In many cases localhost is a suitable value for [YOUR_HOST] when your database is running on the same server as your webserver.

Setup Instructions

First, create a "Jive" user or some other user that will "own" the Jive Forums tables. This isn't necessary, but doing so will allow your tables to exist in a separate tablespace.

A typical SQL command for this is the following:

CREATE USER jive

IDENTIFIED BY jive;

GRANT CONNECT, RESOURCE TO jive;

If you're connecting to the Oracle database via the commandline using SQLPLUS you can connect to the database to execute the commands above by doing the following:

sqlplus system/XXXX

Where XXXX is the 'system' user's password.

Next import the schema from the database directory of the Jive Forums installation using sqlplus (or your favorite Oracle tool such as Toad or DbVisualizer). If you have sqlplus in your PATH, you can execute the following command in the directory containing the Oracle schema (this assumes you've set up a user account called 'jive' with password 'jive'):

sqlplus jive/jive @ jive_forums_oracle.sql

Once the script is run the schema will be created and the database will be set up.

SQL Server

JDBC Driver

Jive Software recommends using the free jTDS JDBC driver with Microsoft SQL Server. After downloading and extracting the driver, place the jtds-X.X.jar (where X.X is the jTDS version number) in the classpath of your application server or the WEB-INF/lib directory of your Jive Forums web application. Use the following values in the Jive Forums setup tool:

where [HOST_NAME] is the host name or IP address of your database server, and [PORT_NUMBER] is the port that SQLServer is listening on (normally 1433) and [DB_NAME] is the name of the database.

Setup Instructions

  1. Create a new database using Enterprise Manager if you do not already have a database you want to use. You may wish to name the database "jive".
  2. Create a user to access the database if you do not already have one you'd like to use. Consider making the default database for the user be the one you created in step 1.
  3. Open the Query Analyser and connect to the server.
  4. Select the database you want to use for Jive Forums from the DB drop down (the one you created in step 1 if you're using a new database).
  5. Open the [jive_forums_installation]/database/jive_forums_sqlserver2000.sql file.
  6. Press F5 to run the script. The script will run and create the necessary tables.
  7. Proceed to the Jive Forums setup tool and use the appropriate JDBC settings when prompted.

PostgreSQL

JDBC Drivers

JDBC Drivers for PostgreSQL can be found in various distribution packages at PostgreSQL's Home Page. Refer to the JDBC documentation at that site for the latest driver and for more information. A couple of notes, however:

Setup Instructions

  1. Create a new database user using the PostgreSQL createuser utility:

    createuser -W
  2. Create the database using the "createdb" utility:

    createdb --encoding=UNICODE [dbname]

    Note, the --encoding switch is optional, but is a good idea so your database will support Unicode content.
  3. Grant the user permission to the newly created database. You'll need to locate the Postgres data directory - it might be something like /var/lib/postgresql. Consult your Postgres installation or administrator, as this value might be different between installations. Once you locate the directory it should contain a file called pg_hba.conf. Open the file and go to the bottom of it - you should see an access control section. You'll need to edit access permissions for this database. Below is a sample entry:
    local   all         all                                             trust 
    host    all         all         127.0.0.1         255.255.255.255   trust 
    host    all         all         [your ip]         255.255.255.255   trust
    
    Note, this is a pretty open configuration. Please consult your system administrator for the best access configuration.
  4. Login to the psql application using the user you made above:

    psql -U [user_you_created] -W -d [dbname]
  5. Once in there, run the following command to import the Jive Forums database schema from the database directory of the installation:

    \i /path/to/jive/schema/file.sql
  6. Proceed to Jive Forums setup and use the appropriate JDBC settings when prompted.

IBM DB2 7

JDBC Drivers

Use the JDBC 1.2 compliant driver, db2java.zip (1293KB), located in the "%DB2PATH%\java2" directory.

Values for the admin tool are:

Setup Instructions

You have to create a new database (e.g. JIVE) or use an existing one. Connect to the database using any valid username allowed to create tables and indexes. Keep in mind that DB2 UDB applies the user name as the table schema. Use the same user when you configure Jive with the administration interface. Commands are as follows:

DB2 CREATE DB JIVE ALIAS JIVE

DB2 CONNECT TO JIVE USER [DBUSER] USING [DBPASSWORD]


(or you can use the Command Center GUI)

Start the DB2 command window (in Windows), or the user's shell in Unix and import the schema (found in the database directory of the installation) with:

db2 -tvf jive_forums_db2.sql

Or, use the DB2 Command Center and run the script through the "Replication Sources" folder in the Database tree.

The database is now setup.

HSQL 1.7.1 (Hypersonic)

Special Note

Jive Forums bundles HSQL as its embedded database. If you choose to use the embedded database, it can be configured via the Jive Forums setup tool. If you have a stand-alone installation of HSQL, follow the instructions below to connect to it.

JDBC Drivers

Because HSQL db is embedded in Jive Forums, so there is no need to download the JDBC driver separately. Values for the admin tool are:

For example, the server URL might be jdbc:hsqldb:../database/defaultdb

Setup Instructions

Create a database for the Jive Forums tables. This assumes you have HSQL installed in its own directory and working correctly.

  1. Run the HSQL Database Manager by navigating to the folder where hsqldb.jar is located and type the following

    java -cp hsqldb.jar org.hsqldb.util.DatabaseManager

    then hit enter. You will now see a GUI application. Note, you will not see a hsqldb.jar in the Jive Forums distribution - this is referring to the hsqldb.jar from the HSQL distribution.
  2. When prompted with the connect window, enter org.hsqldb.jdbcDriver as the Driver, and specify the URL of your database in the URL field. The default password is already entered.
  3. Now copy and paste the contents of jive_forums_hsql.sql from the database directory of the isntallation into the command window, and hit execute. If no errors are reported, then your database is setup properly.
  4. Finally, you should change the username and password login for your database: just open the .script file in your database folder and change the appropriate values. Make sure that you don't use a blank password, as the Jive Forums setup tool will not accept one.