> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/install/legacy-redirects/archive-installation-of-pentaho-legacy-pages/archive-installation-process.md).

# Archive installation process

{% hint style="info" %}
This content is now part of [Archive installation of Pentaho](/install/pentaho-installation-overview-cp/archive-installation.md) under **Archive installation process**.
{% endhint %}

Use this guide to install Pentaho Server using the archive (ZIP) distribution.

Archive installation includes a bundled Tomcat web application server.

If you need to deploy on an existing application server, see [Manual installation](/install/pentaho-installation-overview-cp/manual-installation.md).

{% stepper %}
{% step %}

### Step 1: Prepare your environment

Set up prerequisites on Windows or Linux.
{% endstep %}

{% step %}

### Step 2: Set up the Pentaho Repository

Initialize and configure the repository database (PostgreSQL, MySQL/MariaDB, Oracle, or MS SQL Server).
{% endstep %}

{% step %}

### Step 3: Start Pentaho Server and install licenses

Start the Pentaho-provided Tomcat instance, then sign in to the Pentaho User Console.
{% endstep %}
{% endstepper %}

### Step 1: Prepare your environment

{% tabs %}
{% tab title="Windows" %}
This procedure helps you prepare a Windows environment for an archive installation.

### Process overview

1. [Create Windows directory structure](#create-windows-directory-structure)
2. [Install Java](#install-java)
3. [Install the Pentaho Repository host database](#install-the-pentaho-repository-host-database)
4. [Download and unpack installation files](#download-and-unpack-installation-files)
5. [Set environment variables](#set-environment-variables)
6. [Prepare the Pentaho Repository](#prepare-the-pentaho-repository)

### Create Windows directory structure

Choose an installation path for installing Pentaho on a Windows system.

Pentaho recommends this directory structure:

1. Sign in to the machine where you will run the Pentaho Server.
2. Create the `pentaho\\server` directory (for example, `C:\\pentaho\\server`).
3. Verify you have read, write, and execute permissions for the directories you created.
4. Verify users can write to the directory where you install Pentaho.

### Install Java

Pentaho requires a supported Java version.

1. Check [Components Reference](/install/components-reference.md) for supported Java versions.
2. Download and install the supported JRE or JDK from the [Oracle website](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
3. Set `JAVA_HOME` to your Java installation directory.

Example:

```
set JAVA_HOME="C:\\Program Files\\Java\\<JDK_FOLDER>"
```

### Install the Pentaho Repository host database

The Pentaho Repository stores data used for scheduling and security.

It also stores metadata and models for reports.

1. Choose and install a database to host the Pentaho Repository.

Pentaho supports:

* PostgreSQL
* MySQL
* MariaDB
* Oracle
* MS SQL Server

2. Check [Components Reference](/install/components-reference.md) for supported database versions.
3. Install the database you selected.
4. Verify the database is installed correctly.

### Download and unpack installation files

Pentaho Server and Operations Mart are delivered as compressed files.

Download them, unpack them, then move their contents to the correct directories.

#### Download files

1. Sign in to the [Support Portal](https://support.pentaho.com/hc/en-us) using the credentials from your Pentaho Welcome Packet.
2. In the **Pentaho** card, select **Download**.
3. In the **11.x** list, select **Pentaho 11.0 GA Release**.

{% hint style="info" %}
You might need to select **See all \<number> articles** to see the full list of 11.x downloads.
{% endhint %}

4. Scroll to the bottom of the **Pentaho 11.0 GA Release** page.
5. In the file component section, go to `Pentaho Server\\Archive Build (Suggested Installation Method)`.
6. Download `pentaho-server-ee-11.0.0.0-<build number>.zip`.
7. In the file component section, go back to `11.0.0.0-GA`.
8. Open the `Operations Mart` folder.
9. Download `pentaho-operations-mart-11.0.0.0-<build number>.zip`.

#### Unpack installation files

1. Locate the two files you downloaded:
   * `pentaho-server-ee-11.0.0.0-<build number>.zip`
   * `pentaho-operations-mart-11.0.0.0-<build number>.zip`
2. Unpack `pentaho-server-ee-11.0.0.0-<build number>.zip` into the `\\pentaho\\server` directory.
3. Unpack `pentaho-operations-mart-11.0.0.0-<build number>.zip` into the `\\pentaho\\server` directory.
4. Move the directory for your database into `pentaho\\server\\pentaho-server\\data\\<database name>`. Delete the others.

Use these directory names:

* PostgreSQL → `postgresql`
* MySQL or MariaDB → `mysql5`
* Oracle → `oracle10g`
* MS SQL Server → `sqlserver`

5. Complete the steps for installing Data Integration Operations Mart in the **Administer Pentaho Data Integration and Analytics** document before installing your database.

#### Verify directory structure

Verify the files are placed correctly.

Your `pentaho` directory should include:

* `pentaho\\server\\pentaho-server\\`
* `pentaho\\server\\pentaho-server\\data\\<database name>`

### Set environment variables

If you do not set the required `*_HOME` environment variables, Pentaho might not start correctly.

1. Set `PENTAHO_JAVA_HOME` to your Java installation directory:

```
set PENTAHO_JAVA_HOME="C:\\Program Files\\Java\\<JDK_FOLDER>"
```

2. (Optional) If you are using a JRE, also set `JRE_HOME`.
3. Sign out and sign back in, then verify the variables are set.

Example:

```
echo %PENTAHO_JAVA_HOME%
```

### Prepare the Pentaho Repository

After you finish preparing your environment, go to [Step 2: Set up the Pentaho Repository](#step-2-set-up-the-pentaho-repository).
{% endtab %}

{% tab title="Linux" %}
This procedure helps you prepare a Linux environment for an archive installation.

### Process overview

1. [Create the Pentaho user](#create-the-pentaho-user)
2. [Create Linux directory structure](#create-linux-directory-structure)
3. [Install Java](#install-java)
4. [Install the Pentaho Repository host database](#install-the-pentaho-repository-host-database)
5. [Download and unpack installation files](#download-and-unpack-installation-files)
6. [Set environment variables](#set-environment-variables)
7. [Advanced Linux considerations](#advanced-linux-considerations)
8. [Prepare the Pentaho Repository](#prepare-the-pentaho-repository)

### Create the Pentaho user

Create a user account with administrative privileges.

You will use this account for the remaining steps.

1. Create an administrative user on the server and name it `pentaho`.
2. Verify the `pentaho` user can read, write, and run commands in its home directory.
3. Verify users can write to the directory where you install Pentaho.

### Create Linux directory structure

Choose an installation path.

Pentaho recommends this directory structure under the `pentaho` user’s home directory:

1. Sign in to the machine where you will run the Pentaho Server.
2. Make sure you are signed in as the `pentaho` user.
3. Create these directories:

```
<your home directory>/pentaho/server
<your home directory>/.pentaho
```

4. Verify you have read, write, and execute permissions for the directories you created.

### Install Java

Pentaho requires a supported Java version.

1. Check [Components Reference](/install/components-reference.md) for supported Java versions.
2. Download and install the supported JRE or JDK from the [Oracle website](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
3. Set `JAVA_HOME` to your Java installation directory.

Example:

```
export JAVA_HOME=/usr/lib/jvm/jdk11.x.x.x
```

### Install the Pentaho Repository host database

The Pentaho Repository stores data used for scheduling and security.

It also stores metadata and models for reports.

1. Choose and install a database to host the Pentaho Repository.

Pentaho supports:

* PostgreSQL
* MySQL
* MariaDB
* Oracle
* MS SQL Server

2. Check [Components Reference](/install/components-reference.md) for supported database versions.
3. Install the database you selected.
4. Verify the database is installed correctly.

### Download and unpack installation files

Pentaho Server and Operations Mart are delivered as compressed files.

Download them, unpack them, then move their contents to the correct directories.

#### Download files

1. Sign in to the [Support Portal](https://support.pentaho.com/hc/en-us) using the credentials from your Pentaho Welcome Packet.
2. In the **Pentaho** card, select **Download**.
3. In the **11.x** list, select **Pentaho 11.0 GA Release**.

{% hint style="info" %}
You might need to select **See all \<number> articles** to see the full list of 11.x downloads.
{% endhint %}

4. Scroll to the bottom of the **Pentaho 11.0 GA Release** page.
5. In the file component section, go to `Pentaho Server/Archive Build (Suggested Installation Method)`.
6. Download `pentaho-server-ee-11.0.0.0-<build number>.zip`.
7. In the file component section, go back to `11.0.0.0-GA`.
8. Open the `Operations Mart` folder.
9. Download `pentaho-operations-mart-11.0.0.0-<build number>.zip`.

#### Unpack installation files

1. Locate the two files you downloaded:
   * `pentaho-server-ee-11.0.0.0-<build number>.zip`
   * `pentaho-operations-mart-11.0.0.0-<build number>.zip`
2. Unpack `pentaho-server-ee-11.0.0.0-<build number>.zip` into the `/pentaho/server` directory.
3. Unpack `pentaho-operations-mart-11.0.0.0-<build number>.zip` into the `/pentaho/server` directory.
4. Move the directory for your database into `pentaho/server/pentaho-server/data/<database name>`. Delete the others.

Use these directory names:

* PostgreSQL → `postgresql`
* MySQL → `mysql5`
* Oracle → `oracle10g`
* MS SQL Server → `sqlserver`

5. Complete the steps for installing Data Integration Operations Mart in the **Administer Pentaho Data Integration and Analytics** document before installing your database.

#### Verify directory structure

Verify the files are placed correctly.

Your `pentaho` directory should include:

* `pentaho/server/pentaho-server/`
* `pentaho/server/pentaho-server/data/<database name>`

### Set environment variables

If you do not set the required `*_HOME` environment variables, Pentaho might not start correctly.

1. Set `PENTAHO_JAVA_HOME` to your Java installation directory:

```
export PENTAHO_JAVA_HOME=/usr/lib/jvm/java-11-oracle
```

2. (Optional) If you are using a JRE, also set `JRE_HOME`.
3. Sign out and sign back in, then verify the variables are set.

### Advanced Linux considerations

Some headless server scenarios need extra configuration:

* A system with no video card
* A system with a video card but no X server installed

In some environments (especially without a video card), you might need both procedures to generate reports.

#### Systems without video cards

Add `-Djava.awt.headless=true` to `CATALINA_OPTS` in your application server startup scripts.

Do this before you start Pentaho Server the first time.

{% hint style="warning" %}
Startup can fail if any environment variable value is invalid. Double-check settings after edits.
{% endhint %}

Example:

```
export CATALINA_OPTS="-Djava.awt.headless=true -Xms4096m -Xmx6144m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
```

If you create a service control script, add the same parameter to its `CATALINA_OPTS`.

#### Systems without X11

Chart generation requires X11 functions.

If you cannot install an X server, install `Xvfb` instead.

Xvfb emulates X11 in memory.

Install Xvfb using your operating system’s package manager.

### Prepare the Pentaho Repository

After you finish preparing your environment, go to [Step 2: Set up the Pentaho Repository](#step-2-set-up-the-pentaho-repository).
{% endtab %}
{% endtabs %}

### Step 2: Set up the Pentaho Repository

The Pentaho Repository resides on the database you installed during environment preparation.

It includes these components:

* **Jackrabbit**\
  Contains the solution repository, examples, security data, and report content.
* **Quartz**\
  Holds data related to scheduling reports and jobs.
* **Hibernate**\
  Holds data related to audit logging.
* **(Optional) Pentaho Operations Mart**\
  Reports on system usage and performance.

Select the database you are using.

{% tabs %}
{% tab title="PostgreSQL" %}
Use this procedure to install PostgreSQL as the host database for the Pentaho Repository in an archive installation.

* [Before you begin](#before-you-begin)
* [Initialize the PostgreSQL Pentaho Repository database](#initialize-the-postgresql-pentaho-repository-database)
* [Configure the PostgreSQL Pentaho Repository database](#configure-the-postgresql-pentaho-repository-database)
* [Perform Tomcat-specific connection tasks](#perform-tomcat-specific-connection-tasks)
* [Start your server](#start-your-server)

### Before you begin

#### Prerequisite

Before you prepare your Pentaho Repository, complete [Step 1: Prepare your environment](#step-1-prepare-your-environment).

#### Components

The Pentaho Repository resides on the database that you installed during the environment preparation step.

It consists of these components:

* **Jackrabbit**

  Contains the solution repository, examples, security data, and content data from reports that you use Pentaho software to create.
* **Quartz**

  Holds data related to scheduling reports and jobs.
* **Hibernate**

  Holds data related to audit logging.
* **(Optional) Pentaho Operations Mart**

  Reports on system usage and performance.

### Initialize the PostgreSQL Pentaho Repository database

To initialize PostgreSQL so it serves as the Pentaho Repository, run SQL scripts to create these components:

* Hibernate
* Quartz
* Jackrabbit (JCR)
* (Optional) Pentaho Operations Mart

**CAUTION:**

Use the ASCII character set when you run these scripts.

Do not use UTF-8.

Text string length limitations might cause the scripts to fail.

**CAUTION:**

If you use a different password or user, update the examples to match.

**CAUTION:**

Pentaho 10.2.0.0 and earlier use Quartz 1.x.

Quartz 1.x uses a `QRTZ5_` prefix in the database.

Pentaho 10.2.0.1 and later use Quartz 2.x.

Quartz 2.x uses a `QRTZ6_` prefix in the database.

When upgrading from an earlier version to Pentaho 10.2.0.1 and later, create the `QRTZ6_` tables by repeating the Quartz database creation procedure.

You can optionally migrate existing Quartz schedules using the migration script.

During this upgrade procedure, executing the SQL create script resets the corresponding Quartz database without loss of the original data.

However, the other associated repository databases in 10.2.0.1 will be reset by SQL scripts if run, and data might be deleted.

Always back up your data before proceeding.

**Important:** If you do not complete the Quartz upgrade, Pentaho Server fails at startup.

You will also see this exception message in `catalina.log`:

```
Missing Quartz library database error
```

#### Step 1: Change default passwords

For production, follow best practices and change the default passwords in the SQL script files.

**Note:** If you are evaluating Pentaho, you might want to skip this step.

1. Browse to the `<your pentaho directory>/pentaho-server/data/postgresql` folder.
2. Use a text editor to modify these create scripts as needed for your user, password, database, and other values:
   * `create_jcr_postgresql.sql`
   * `create_quartz_postgresql.sql`
   * `create_repository_postgresql.sql`
   * `pentaho_mart_postgresql.sql`
3. Save and close the files.

#### Step 2: Run SQL scripts

To use PostgreSQL as the database for your Pentaho Repository, you must initialize the Jackrabbit, Quartz, Hibernate, and Operations Mart components.

You can run SQL scripts developed by Pentaho to create and initialize these components.

When upgrading from earlier Pentaho versions, including 10.2.0.0 GA to 10.2.0.1 and later, you must manually initialize a new Quartz database.

This creates a new Quartz library in the repository database.

Back up your data before proceeding.

If you want to keep your existing Quartz library data, you can migrate the current tables to the new tables.

**Note:** You may need administrator permissions to run these scripts on the host OS server.

1. Back up your data. See [Back up your existing Pentaho products and install Pentaho 10.3](/install/legacy-redirects/back-up-your-pentaho-products-and-install-pentaho-9.1-pentaho-upgrade.md).
2. If Pentaho Server is running, stop it.

   See [Stop and start the Pentaho Server and repository](/install/legacy-redirects/tasks-to-be-performed-by-an-it-administrator-legacy-redirects/configure-the-pentaho-server-legacy-pages/stop-and-start-the-pentaho-server-and-repository.md).
3. Ensure your PostgreSQL instance is running.
4. Open a PSQL console window and run these SQL creation scripts in this order:

   1. `<your pentaho directory>/pentaho-server/data/postgresql/create_quartz_postgresql.sql`
   2. `<your pentaho directory>/pentaho-server/data/postgresql/create_jcr_postgresql.sql`
   3. `<your pentaho directory>/pentaho-server/data/postgresql/create_repository_postgresql.sql` (initializes Hibernate)
   4. `<your pentaho directory>/pentaho-server/data/postgresql/pentaho_mart_postgresql.sql`

   The Quartz database, Jackrabbit and PostgreSQL repositories, and Pentaho Operations Mart are created.

   The new Quartz scheduler tables prefixed with `QRTZ6_` are created.

   Any existing `QRTZ5_` scheduler database is retained.

   Starting the Pentaho Server at this point results in an empty schedule.
5. If you want to retain your existing scheduler database, open `migrate_old_quartz_data_postgresql.sql` in a text editor.
6. Update the migration script as needed for your user, password, database, and other values.
7. Run the migration script:

   `<your pentaho directory>/pentaho-server/data/postgresql/migrate_old_quartz_data_postgresql.sql`

The original Quartz scheduler database is migrated to the new Quartz database.

**Note:** The original `QRTZ5_` data is retained.

You can delete it after you confirm the migration completed successfully.

**Note:** You unpacked the Pentaho Operations Mart SQL file while preparing your environment for archive installation.

#### Step 3: Verify PostgreSQL initialization

**Note:** Unless you changed it in Step 1, the default password for each username is `password`.

After you run the scripts, verify the databases and user roles were created correctly:

1. Open pgAdminIII or a similar client tool.
2. Log in as `hibuser`.
3. Verify that you can see the tables under **hibernate**.
4. If you installed Pentaho Operations Mart, verify that you can see the tables under **pentaho\_operations\_mart**.
5. Log in as `jcr_user`.
6. Verify that you can see the tables under **jackrabbit**.

   The Jackrabbit tables might not appear until you start Pentaho for the first time.
7. Log in as `pentaho_user`.
8. Verify that you can see the tables under **quartz**.
9. Exit from the tool.

You have initialized the PostgreSQL Pentaho Repository database.

### Configure the PostgreSQL Pentaho Repository database

After you initialize your repository database, configure Quartz, Hibernate, Jackrabbit, and Pentaho Operations Mart for PostgreSQL.

**Note:** PostgreSQL is configured by default.

If you kept the default passwords and port, you can skip to [Perform Tomcat-specific connection tasks](#perform-tomcat-specific-connection-tasks).

By default, the examples in this section use a PostgreSQL database running on port 5432 with the default password.

**CAUTION:**

If you use a different port or password, update the examples to match.

#### Step 1: Set up Quartz on PostgreSQL

Event information, such as scheduled reports, is stored in the Quartz JobStore.

During installation, specify where the JobStore is located by modifying `quartz.properties`.

1. Open `pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties` in a text editor.
2. In the `#_replace_jobstore_properties` section, set `org.quartz.jobStore.driverDelegateClass`:

   ```
   org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
   ```
3. Save and close the file.

#### Step 2: Set Hibernate settings for PostgreSQL

Modify the Hibernate settings file to specify where Pentaho should find the Pentaho Repository’s Hibernate configuration file.

The Hibernate configuration file specifies driver and connection information, dialects, and connection close and timeout behavior.

**Note:** Pentaho Server also stores audit logs in the Hibernate database.

The files in this section are located in `pentaho/server/pentaho-server/pentaho-solutions/system/hibernate`.

1. Open `hibernate-settings.xml` in a text editor.
2. Find the `<config-file>` tags and confirm this value is set for PostgreSQL:

   ```xml
   <config-file>system/hibernate/postgresql.hibernate.cfg.xml</config-file>
   ```
3. Save and close the file if you made changes.

#### Step 3: Modify Jackrabbit repository information for PostgreSQL

Edit `repository.xml` to use PostgreSQL for the default Jackrabbit repository.

1. Go to `pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit`.
2. Open `repository.xml` in a text editor.
3. Ensure the PostgreSQL lines are not commented out.
4. Ensure the MySQL, Oracle, and MS SQL Server lines are commented out.

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Item</td><td>Code Section</td></tr><tr><td>Repository</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
    &#x3C;param name="driver" value="javax.naming.InitialContext"/>
    &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
    &#x3C;param name="schema" value="postgresql"/>
    &#x3C;param name="schemaObjectPrefix" value="fs_repos_"/>
  &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>DataStore</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
    &#x3C;param name="driver" value="javax.naming.InitialContext"/>
    &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
    &#x3C;param name="databaseType" value="postgresql"/>
    &#x3C;param name="minRecordLength" value="1024"/>
    &#x3C;param name="maxConnections" value="3"/>
    &#x3C;param name="copyWhenReading" value="true"/>
    &#x3C;param name="tablePrefix" value=""/>
    &#x3C;param name="schemaObjectPrefix" value="ds_repos_"/>
  &#x3C;/DataStore>
</code></pre></td></tr><tr><td>Workspaces</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="postgresql"/>
      &#x3C;param name="schemaObjectPrefix" value="fs_ws_"/>
    &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>PersistenceManager (1st part)</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="postgresql"/>
      &#x3C;param name="schemaObjectPrefix" value="${wsp.name}_pm_ws_"/>
    &#x3C;/PersistenceManager>
</code></pre></td></tr><tr><td>Versioning</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="postgresql"/>
      &#x3C;param name="schemaObjectPrefix" value="fs_ver_"/>
    &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>PersistenceManager (2nd part)</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="postgresql"/>
      &#x3C;param name="schemaObjectPrefix" value="pm_ver_"/>
    &#x3C;/PersistenceManager>
</code></pre></td></tr><tr><td>DatabaseJournal</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
	&#x3C;param name="revision" value="${rep.home}/revision.log" />
	&#x3C;param name="driver" value="javax.naming.InitialContext"/>
	&#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
	&#x3C;param name="schema" value="postgresql"/>
	&#x3C;param name="schemaObjectPrefix" value="cl_j_"/>
	&#x3C;param name="janitorEnabled" value="true"/>
	&#x3C;param name="janitorSleep" value="86400"/>
	&#x3C;param name="janitorFirstRunHourOfDay" value="3"/>
     &#x3C;/Journal>
</code></pre></td></tr></tbody></table>

### Perform Tomcat-specific connection tasks

After you configure the repository, configure your web application servers to connect to it.

In this step, you make JDBC and JNDI connections to the Hibernate, Jackrabbit, and Quartz components.

**Note:** By default, Pentaho Server is configured to run on Tomcat.

Connections are already specified.

Modify Tomcat `context.xml` only if you changed the default ports or passwords.

#### Step 1: Download driver and apply to the Pentaho Server

To connect to a database, including the Pentaho Repository database, you must download and copy a JDBC driver to the correct locations.

**Note:** Due to licensing restrictions, Pentaho cannot redistribute some third-party database drivers.

You must download and install the file yourself.

1. Download a JDBC driver JAR from your database vendor or a third-party driver developer.

   See [JDBC drivers reference](/install/jdbc-drivers-reference.md) for supported drivers.
2. Copy the JDBC driver JAR to `pentaho/server/pentaho-server/tomcat/lib`.
3. If you want to keep the Pentaho sample, copy [`hsqldb-2.3.2.jar`](https://sourceforge.net/projects/hsqldb/files/hsqldb/hsqldb_2_3/) to `pentaho-server/tomcat/lib`.

#### Step 2: Modify JDBC connection information in the Tomcat XML file

Database connection and network information is stored in `context.xml`.

Modify `context.xml` to match your environment.

**CAUTION:**

If you use a different port, password, user, driver class, or host name, update the examples to match.

1. Consult your database documentation to determine the JDBC class name and connection string.
2. Go to `server/pentaho-server/tomcat/webapps/pentaho/META-INF`.
3. Open `context.xml` in a text editor.
4. Add the following code if it does not already exist:

   ```xml
   <Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
           maxWait="10000" username="hibuser" password="password"
           driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/hibernate"
           validationQuery="select 1" jdbcInterceptors="ConnectionState" defaultAutoCommit="true"/>
   <Resource name="jdbc/Audit" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
           maxWait="10000" username="hibuser" password="password"
           driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/hibernate"
           validationQuery="select 1" />
   <Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="pentaho_user" password="password" testOnBorrow="true"
           driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/quartz"
           validationQuery="select 1"/>
   <Resource name="jdbc/PDI_Operations_Mart" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
           maxWait="10000" username="hibuser" password="password"
           driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/hibernate"
           validationQuery="select 1"/>
   <Resource name="jdbc/pentaho_operations_mart" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
           maxWait="10000" username="hibuser" password="password"
           driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/hibernate"
           validationQuery="select 1"/>
   <Resource name="jdbc/live_logging_info" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="hibuser" password="password" driverClassName="org.postgresql.Driver"
           url="jdbc:postgresql://localhost:5432/hibernate?searchpath=pentaho_dilogs"
           validationQuery="select 1"/>
   <Resource name="jdbc/SampleData" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
           maxWait="10000" username="pentaho_user" password="password"
           driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost/sampledata"
           validationQuery="select 1"/>
   <Resource name="jdbc/SampleDataAdmin" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
           maxWait="10000" username="pentaho_admin" password="password"
           driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost/sampledata"
           validationQuery="select 1"/>
   <Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
           maxWait="10000" username="jcr_user" password="password"
           driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/jackrabbit"
           validationQuery="select 1" jdbcInterceptors="ConnectionState" defaultAutoCommit="true"/>
   ```
5. Update the user name, password, driver class, host name, and port values for your environment.
6. Comment out any resource references that refer to other databases.
7. Set `validationQuery` to `select 1`.
8. Save and close `context.xml`.

### Start your server

After you complete the archive installation steps, start the Pentaho Server.

See [Step 3: Start Pentaho Server and install licenses](#step-3-start-pentaho-server-and-install-licenses).
{% endtab %}

{% tab title="MySQL or MariaDB" %}
Use these steps to install MySQL or MariaDB as the host database for the Pentaho Server in an archive installation of Pentaho.

* [Prerequisites](#prerequisites)
* [Components](#components)
* [Initialize the repository database](#initialize-the-repository-database)
* [Configure the repository database](#configure-the-repository-database)
* [Perform Tomcat-specific connection tasks](#perform-tomcat-specific-connection-tasks)
* [Start the Pentaho Server](#start-the-pentaho-server)

### Prerequisites

Before you prepare your Pentaho Repository, complete [Step 1: Prepare your environment](#step-1-prepare-your-environment).

{% hint style="warning" %}
MySQL Connector/J 8.0 cannot be used when configuring Tomcat with the JDBC driver JAR.
{% endhint %}

### Components

The Pentaho Repository resides on the database you installed during the environment preparation step.

It includes these components:

* **Jackrabbit**\
  Contains the solution repository, examples, security data, and content data from reports that you create.
* **Quartz**\
  Holds data related to scheduling reports and jobs.
* **Hibernate**\
  Holds data related to audit logging.
* **(Optional) Pentaho Operations Mart**\
  Reports on system usage and performance.

### Initialize the repository database

To initialize MySQL or MariaDB so that it serves as the Pentaho Repository, run several SQL scripts to create the Hibernate, Quartz, Jackrabbit (JCR), and Pentaho Operations Mart components.

{% hint style="warning" %}
Use the ASCII character set when you run these scripts. Do not use UTF-8. UTF-8 can trigger string-length limits that can make scripts fail.
{% endhint %}

{% hint style="warning" %}
If your user, password, host, or port differs, update the examples to match your environment.
{% endhint %}

{% hint style="warning" %}
Pentaho 10.2.0.0 and earlier use Quartz 1.x tables with the `QRTZ5_` prefix. Pentaho 10.2.0.1 and later use Quartz 2.x tables with the `QRTZ6_` prefix.

When upgrading to 10.2.0.1 or later, you must create the `QRTZ6_` tables by re-running the Quartz database creation step. You can then optionally migrate schedules using the provided migration script.

Back up your data before you run any SQL scripts.
{% endhint %}

Failure to complete the Quartz upgrade results in a Pentaho Server start-up error. In addition to the server error, the following exception message is generated in the `catalina.log` file:

```
Missing Quartz library database error
```

{% stepper %}
{% step %}

### Step 1: Change default passwords

For production, follow best practices and change the default passwords in the SQL script files.

{% hint style="info" %}
If you are evaluating Pentaho, you can skip this step.
{% endhint %}

1. Browse to the `<your pentaho directory>/pentaho-server/data/mysql` folder.
2. Use a text editor to update these scripts as needed for your existing user, password, database, and other values:
   * `create_jcr_mysql.sql`
   * `create_quartz_mysql.sql`
   * `create_repository_mysql.sql`
   * `pentaho_mart_mysql.sql`
3. Save and close the files.
   {% endstep %}

{% step %}

### Step 2: Run SQL scripts

When upgrading from previous Pentaho versions (including 10.2.0.0 GA to 10.2.0.1 and later), you must manually initialize a new Quartz database. This creates a new Quartz library in the repository database.

If you want to keep existing Quartz schedules, migrate the old tables to the new tables.

{% hint style="info" %}
You may need administrator permissions to run these scripts on the host OS.
{% endhint %}

1. Back up your data. See [Back up your existing Pentaho products and install Pentaho 11.0](/install/legacy-redirects/back-up-your-pentaho-products-and-install-pentaho-9.1-pentaho-upgrade.md).
2. If the Pentaho Server is running, stop it.\
   See [Stop and start the Pentaho Server and repository](/install/legacy-redirects/tasks-to-be-performed-by-an-it-administrator-legacy-redirects/configure-the-pentaho-server-legacy-pages/stop-and-start-the-pentaho-server-and-repository.md).
3. Make sure your MySQL or MariaDB instance is running.
4. Open MySQL Workbench or a MySQL/MariaDB command prompt.
5. Run the SQL creation scripts in this order:

   1. `<your pentaho directory>/pentaho-server/data/mysql/create_jcr_mysql.sql`
   2. `<your pentaho directory>/pentaho-server/data/mysql/create_quartz_mysql.sql`
   3. `<your pentaho directory>/pentaho-server/data/mysql/create_repository_mysql.sql`
   4. `<your pentaho directory>/pentaho-server/data/mysql/pentaho_mart_mysql.sql`

   This creates the Quartz database, the Jackrabbit and MySQL/MariaDB repositories, and Pentaho Operations Mart.

   The scripts create the new Quartz scheduler tables prefixed with `QRTZ6_`.

   Any existing `QRTZ5_` tables are retained. Starting the Pentaho Server at this point results in an empty schedule.
6. If you want to retain your existing scheduler data, open `migrate_old_quartz_data_mysql.sql` in a text editor.
7. Update the migration script for your user, password, database, and other values. Save the file.
8. Run the migration script:

   `<your pentaho directory>/pentaho-server/data/mysql/migrate_old_quartz_data_mysql.sql`

The original Quartz scheduler database is migrated to the new Quartz database.

{% hint style="info" %}
The original `QRTZ5_` data is retained. You can delete it after you confirm migration success.
{% endhint %}

{% hint style="info" %}
You unpacked the Pentaho Operations Mart SQL file while preparing your environment for the archive installation.
{% endhint %}
{% endstep %}

{% step %}

### Step 3: Verify MySQL or MariaDB initialization

{% hint style="info" %}
Unless you changed it in Step 1, the default password for each username below is `password`.
{% endhint %}

After you run the scripts, verify the databases and user roles were created properly:

1. Open MySQL Workbench.
2. Log in as `hibuser`.
3. Under **Schemas**, expand **hibernate** > **Tables**.
4. If you installed Pentaho Operations Mart, expand **pentaho\_operations\_mart** > **Tables**.
5. Log in as `jcr_user`.
6. Under **Schemas**, expand **jackrabbit** > **Tables**.

   The Jackrabbit tables might not appear until after you start Pentaho for the first time.
7. Log in as `pentaho_user`.
8. Under **Schemas**, expand **quartz** > **Tables**.
9. Exit MySQL Workbench.

You have initialized the MySQL or MariaDB Pentaho Repository database.
{% endstep %}
{% endstepper %}

### Configure the repository database

Now that you have initialized your repository database, configure Quartz, Hibernate, Jackrabbit, and Pentaho Operations Mart for MySQL or MariaDB.

The examples assume MySQL on port `3306` with default passwords.

{% hint style="warning" %}
If your port or password differs, update the examples to match your environment.
{% endhint %}

{% stepper %}
{% step %}

### Step 1: Set up Quartz on MySQL or MariaDB

Quartz stores scheduler data, such as scheduled reports.

You point Pentaho at the correct JobStore by updating `quartz.properties`.

1. Open `pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties`.
2. In `#_replace_jobstore_properties`, set `org.quartz.jobStore.driverDelegateClass`:

```properties
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
```

3. Save the file.
   {% endstep %}

{% step %}

### Step 2: Set Hibernate settings for MySQL or MariaDB

Hibernate settings point Pentaho to the correct Hibernate configuration file.

{% hint style="info" %}
Hibernate also stores the audit logs used by Operations Mart.
{% endhint %}

Files are in `pentaho/server/pentaho-server/pentaho-solutions/system/hibernate`.

1. Open `hibernate-settings.xml`.
2. Find the `<config-file>` entry. Replace `postgresql.hibernate.cfg.xml` with `mysql5.hibernate.cfg.xml`:

From:

```xml
<config-file>system/hibernate/postgresql.hibernate.cfg.xml</config-file>
```

To:

```xml
<config-file>system/hibernate/mysql5.hibernate.cfg.xml</config-file>
```

3. Save and close the file.
4. (MariaDB only) Open `mysql5.hibernate.cfg.xml`.
5. Find the driver class and change it from MySQL to MariaDB:

From:

```xml
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
```

To:

```xml
<property name="connection.driver_class">org.mariadb.jdbc.Driver</property>
```

{% endstep %}

{% step %}

### Step 3: Replace the audit log file with the MySQL version

Replace `audit_sql.xml` with the MySQL version.

Use the same file for MariaDB.

1. Locate `pentaho-solutions/system/dialects/mysql5/audit_sql.xml`.
2. Copy it into `pentaho-solutions/system`.
   {% endstep %}

{% step %}

### Step 4: Modify Jackrabbit repository information for MySQL or MariaDB

Update Jackrabbit to use the MySQL (or MariaDB) repository.

1. Open `pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit/repository.xml`.
2. Uncomment the MySQL lines.
3. Comment out the MS SQL Server, Oracle, and PostgreSQL lines.
4. Verify these sections use the MySQL values.

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Item</td><td>Code Section</td></tr><tr><td>Repository</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
    &#x3C;param name="driver" value="javax.naming.InitialContext"/>
    &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
    &#x3C;param name="schema" value="mysql"/>
    &#x3C;param name="schemaObjectPrefix" value="fs_repos_"/>
  &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>DataStore</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
    &#x3C;param name="driver" value="javax.naming.InitialContext"/>
    &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
    &#x3C;param name="databaseType" value="mysql"/>
    &#x3C;param name="minRecordLength" value="1024"/>
    &#x3C;param name="maxConnections" value="3"/>
    &#x3C;param name="copyWhenReading" value="true"/>
    &#x3C;param name="tablePrefix" value=""/>
    &#x3C;param name="schemaObjectPrefix" value="ds_repos_"/>
  &#x3C;/DataStore>
</code></pre></td></tr><tr><td>Workspaces</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="mysql"/>
      &#x3C;param name="schemaObjectPrefix" value="fs_ws_"/>
    &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>PersistenceManager (1st part)</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="mysql"/>
      &#x3C;param name="schemaObjectPrefix" value="${wsp.name}_pm_ws_"/>
    &#x3C;/PersistenceManager>
</code></pre></td></tr><tr><td>Versioning</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="mysql"/>
      &#x3C;param name="schemaObjectPrefix" value="fs_ver_"/>
    &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>PersistenceManager (2nd part)</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="mysql"/>
      &#x3C;param name="schemaObjectPrefix" value="pm_ver_"/>
    &#x3C;/PersistenceManager>
</code></pre></td></tr><tr><td>DatabaseJournal</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
	&#x3C;param name="revision" value="${rep.home}/revision.log"/>
	&#x3C;param name="driver" value="javax.naming.InitialContext"/>
	&#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
	&#x3C;param name="schema" value="mysql"/>
	&#x3C;param name="schemaObjectPrefix" value="J_C_"/>
	&#x3C;param name="janitorEnabled" value="true"/>
	&#x3C;param name="janitorSleep" value="86400"/>
	&#x3C;param name="janitorFirstRunHourOfDay" value="3"/>
     &#x3C;/Journal>
</code></pre></td></tr></tbody></table>
{% endstep %}
{% endstepper %}

### Perform Tomcat-specific connection tasks

After your repository is configured, configure the web application server to connect to the Pentaho Repository.

In this step, you will make JDBC and JNDI connections to the Hibernate, Jackrabbit, and Quartz components.

{% hint style="info" %}
By default, the Pentaho Server software is configured to deploy and run on Tomcat. Connections are already specified. Only update the Tomcat `context.xml` file if you changed default ports or passwords.
{% endhint %}

#### Step 1: Download driver and apply to the Pentaho Server

To connect to a database, including the Pentaho Repository database, download and copy a JDBC driver to the right locations for the Pentaho Server and the web application server.

{% hint style="info" %}
Due to licensing restrictions, Pentaho cannot redistribute some third-party database drivers. You must download and install these files yourself.
{% endhint %}

1. Download a JDBC driver JAR from your database vendor or a third-party driver developer.\
   The [JDBC drivers reference](/install/jdbc-drivers-reference.md) lists supported drivers.
2. Copy the JDBC driver JAR to the `pentaho/server/pentaho-server/tomcat/lib` folder.
3. Copy the [`hsqldb-2.3.2.jar`](https://sourceforge.net/projects/hsqldb/files/hsqldb/hsqldb_2_3/) file to `pentaho-server/tomcat/lib` if you want to keep the Pentaho sample.

#### Step 2: Modify JDBC connection information in the Tomcat XML file

Database connection and network settings (username, password, driver class, IP address or domain name, and port numbers) for your Pentaho Repository database are stored in the `context.xml` file.

Update this file to match your environment.

{% hint style="warning" %}
If you have a different port, password, user, driver class, or IP address, update the examples to match your environment.
{% endhint %}

1. Consult your database documentation to determine the JDBC class name and the connection string for your Pentaho Repository database.
2. Go to `server/pentaho-server/tomcat/webapps/pentaho/META-INF` and open `context.xml` in a text editor.
3. Add the following code if it does not already exist.

   For MySQL:

   ```xml
   <Resource validationQuery="select 1" url="jdbc:mysql://localhost:3306/hibernate"
           driverClassName="com.mysql.jdbc.Driver" password="password" username="hibuser"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/Hibernate"/>
   <Resource validationQuery="select 1" url="jdbc:mysql://localhost:3306/hibernate"
           driverClassName="com.mysql.jdbc.Driver" password="password" username="hibuser"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/Audit"/>
   <Resource validationQuery="select 1" url="jdbc:mysql://localhost:3306/quartz"
           driverClassName="com.mysql.jdbc.Driver" password="password" username="pentaho_user"
           testOnBorrow="true" initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/Quartz"/>
   <Resource validationQuery="select 1" url="jdbc:mysql://localhost:3306/pentaho_operations_mart"
           driverClassName="com.mysql.jdbc.Driver" password="password" username="hibuser"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/pentaho_operations_mart"/>
   <Resource validationQuery="select 1" url="jdbc:mysql://localhost:3306/pentaho_operations_mart"
           driverClassName="com.mysql.jdbc.Driver" password="password" username="hibuser"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/PDI_Operations_Mart"/>
   <Resource name="jdbc/live_logging_info" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           username="hibuser" password="password" driverClassName="com.mysql.jdbc.Driver"
           url="jdbc:mysql://localhost:3306/pentaho_dilogs" validationQuery="select 1"/>
   <Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="jcr_user" password="password" driverClassName="com.mysql.jdbc.Driver"
           url="jdbc:mysql://localhost:3306/jackrabbit" validationQuery="select 1"/>
   ```

   For MariaDB:

   ```xml
   <Resource validationQuery="select 1" url="jdbc:mariadb://localhost:3306/hibernate"
           driverClassName="org.mariadb.jdbc.Driver" password="password" username="hibuser"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/Hibernate"/>
   <Resource validationQuery="select 1" url="jdbc:mariadb://localhost:3306/hibernate"
           driverClassName="org.mariadb.jdbc.Driver" password="password" username="hibuser"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/Audit"/>
   <Resource validationQuery="select 1" url="jdbc:mariadb://localhost:3306/quartz"
           driverClassName="org.mariadb.jdbc.Driver" password="password" username="pentaho_user"
           testOnBorrow="true" initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/Quartz"/>
   <Resource validationQuery="select 1" url="jdbc:mariadb://localhost:3306/pentaho_operations_mart"
           driverClassName="org.mariadb.jdbc.Driver" password="password" username="hibuser"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/pentaho_operations_mart"/>
   <Resource validationQuery="select 1" url="jdbc:mariadb://localhost:3306/pentaho_operations_mart"
           driverClassName="org.mariadb.jdbc.Driver" password="password" username="hibuser"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           type="javax.sql.DataSource" auth="Container" name="jdbc/PDI_Operations_Mart"/>
   <Resource name="jdbc/live_logging_info" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           username="hibuser" password="password" driverClassName="org.mariadb.jdbc.Driver"
           url="jdbc:mariadb://localhost:3306/pentaho_dilogs" validationQuery="select 1"/>
   <Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="jcr_user" password="password" driverClassName="org.mariadb.jdbc.Driver"
           url="jdbc:mariadb://localhost:3306/jackrabbit" validationQuery="select 1"/>
   ```
4. Update usernames, passwords, driver classes, IP addresses (or domain names), and port numbers to match your environment.
5. Comment out resource references for databases you are not using.
6. Verify `validationQuery` is set to `select 1` (for example: `validationQuery="select 1"`).
7. Save `context.xml`, then close it.

### Start the Pentaho Server

After you complete the archive installation steps, start the Pentaho Server.

See [Step 3: Start Pentaho Server and install licenses](#step-3-start-pentaho-server-and-install-licenses).
{% endtab %}

{% tab title="Oracle" %}
This section includes the steps for installing Oracle as the host database for the Pentaho Server in an archive installation of Pentaho.

### Before you begin

#### Prerequisite

Before you prepare your Pentaho Repository, complete [Step 1: Prepare your environment](#step-1-prepare-your-environment).

#### Components

The Pentaho Repository resides on the database that you installed during the environment preparation step. It consists of the following components:

* **Jackrabbit**

  Contains the solution repository, examples, security data, and content data from reports that you use Pentaho software to create.
* **Quartz**

  Holds data that is related to scheduling reports and jobs.
* **Hibernate**

  Holds data that is related to audit logging.
* **(Optional) Pentaho Operations Mart**

  To report on system usage and performance.

### Initialize Oracle Pentaho Repository database

The sections in this topic take you through the steps to initialize the Oracle Pentaho Repository database.

To initialize Oracle so that it serves as the Pentaho Repository, you will need to run several SQL scripts to create the Hibernate, Quartz, Jackrabbit (JCR), and Pentaho Operations Mart components.

{% hint style="warning" %}
Use the ASCII character set when you run these scripts. Do not use UTF-8. UTF-8 may cause script failures due to text string length limits.
{% endhint %}

{% hint style="warning" %}
If you use different users or passwords, update the examples to match your environment.
{% endhint %}

{% hint style="warning" %}
Pentaho 10.2.0.0 and earlier use the Quartz 1.x library. Those tables use the `QRTZ5_` prefix.

Pentaho 10.2.0.1 and later use Quartz 2.x. Those tables use the `QRTZ6_` prefix.

If you upgrade from an earlier version to 10.2.0.1 or later, create the `QRTZ6_` tables by repeating the Quartz database creation step. You can optionally migrate existing schedules with the migration script.

Back up your data before you run any scripts.
{% endhint %}

**Important:** Failure to complete the Quartz upgrade results in a Pentaho Server error at start-up. In addition to the server error, the following exception message is generated in the `catalina.log` file:

```
Missing Quartz library database error
```

#### Steps

1. [Step 1: Change default passwords](#step-1-change-default-passwords)
2. [Step 2: Run SQL scripts](#step-2-run-sql-scripts)
3. [Step 3: Verify Oracle initialization](#step-3-verify-oracle-initialization)

#### Step 1: Change default passwords

For production systems, follow best practices and change the default passwords in the SQL scripts.

**Note:** If you are evaluating Pentaho, you can skip this step.

1. Browse to the `<your pentaho directory>/pentaho-server/data/oracle` folder.
2. Use a text editor to update the scripts as needed for your user, password, database, and other settings:
   * `create_jcr_ora.sql`
   * `create_quartz_ora.sql`
   * `create_repository_ora.sql`
   * `pentaho_mart_oracle.sql`
3. Save and close the files.

#### Step 2: Run SQL scripts

When upgrading from previous Pentaho versions, including 10.2.0.0 GA to 10.2.0.1 and later, you must manually initialize a new Quartz database. A new Quartz library is created in the repository database as a result.

Always follow best practices and back up your data before you proceed. If you want to keep existing Quartz schedules, you can migrate the existing tables to the new tables.

**Note:** You may need administrator permissions to run these scripts on the host OS server.

1. Back up your data. See [Back up your existing Pentaho products and install Pentaho 11.0](/install/legacy-redirects/back-up-your-pentaho-products-and-install-pentaho-9.1-pentaho-upgrade.md).
2. If the Pentaho Server is running, stop it.

   For instructions, see [Stop and start the Pentaho Server and repository](/install/legacy-redirects/tasks-to-be-performed-by-an-it-administrator-legacy-redirects/configure-the-pentaho-server-legacy-pages/stop-and-start-the-pentaho-server-and-repository.md).
3. Make sure that your Oracle instance is running.
4. Open a Command Prompt or terminal window that runs SQL\*Plus, then run the following scripts in this order:

   1. `<your pentaho directory>/pentaho-server/data/oracle/create_jcr_ora.sql`
   2. `<your pentaho directory>/pentaho-server/data/oracle/create_quartz_ora.sql`
   3. `<your pentaho directory>/pentaho-server/data/oracle/create_repository_ora.sql`
   4. `<your pentaho directory>/pentaho-server/data/pentaho_mart_oracle.sql`

   This creates the Quartz database, Jackrabbit repository, Hibernate repository, and Pentaho Operations Mart.

   The `QRTZ6_` tables are created. Any existing `QRTZ5_` tables remain. If you start the Pentaho Server now, the schedule is empty.
5. If you want to retain your existing schedule data, open `migrate_old_quartz_data_oracle.sql` in a text editor.
6. Update the script for your user, password, database, and other settings, then save it.
7. Run the migration script:

   `<your pentaho directory>/pentaho-server/data/oracle/migrate_old_quartz_data_oracle.sql`

**Note:** The original `QRTZ5_` data remains available. Delete it only after you verify a successful migration.

**Note:** You unpacked the Pentaho Operations Mart SQL file while preparing your environment for the archive installation.

#### Step 3: Verify Oracle initialization

**Note:** Unless you changed it in Step 1, the default password for each username below is `password`.

After you run the scripts, verify that databases and user roles were created correctly:

1. Open a Terminal or Command Prompt window running SQL\*Plus (or a similar client) and connect to the Oracle database.
2. Log in as *hibuser*.
3. Verify that you can see the tables under **hibernate**.
4. If you installed Pentaho Operations Mart, verify that you can see the tables under **pentaho\_operations\_mart**.
5. Log in as *jcr\_user*.
6. Verify that you can see the tables under **jackrabbit**.

   The Jackrabbit tables may not appear until you start Pentaho for the first time.
7. Log in as *pentaho\_user*.
8. Verify that you can see the tables under **quartz**.
9. Exit the tool.

You have initialized the Oracle Pentaho Repository database.

### Configure Oracle Pentaho Repository database

Now that you have initialized your repository database, you will need to configure Quartz, Hibernate, Jackrabbit, and Pentaho Operations Mart for an Oracle database.

By default, the examples in this section are for an Oracle database that runs on port 1521. The default password is also in these examples.

{% hint style="warning" %}
If you use a different port or password, update the examples to match your environment.
{% endhint %}

#### Step 1: Set up Quartz on Oracle

Event information, such as scheduled reports, is stored in the Quartz JobStore. During the installation process, you must indicate where the JobStore is located by modifying the `quartz.properties` file.

1. Open the `pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties` file in any text editor.
2. Locate the **#\_replace\_jobstore\_properties** section and set the **org.quartz.jobStore.driverDelegateClass** as shown:

   ```xml
   org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
   ```
3. Save the file and close the text editor.

#### Step 2: Set Hibernate settings for Oracle

Modify the Hibernate settings file to specify where Pentaho should find the Pentaho Repository’s Hibernate configuration file. The Hibernate configuration file specifies driver and connection information, as well as dialects and how to handle connection closes and timeouts.

**Note:** The Hibernate database is also where the Pentaho Server stores the audit logs that act as source data for the Pentaho Operations Mart.

The files in this section are located in the `pentaho/server/pentaho-server/pentaho-solutions/system/hibernate` directory.

Perform the following steps to specify where Pentaho can find the Hibernate configuration file.

1. Open the `hibernate-settings.xml` file in a text editor. Find the tags and change `postgresql.hibernate.cfg.xml` to `oracle10g.hibernate.cfg.xml` as shown.

   From:

   ```xml
   <config-file>system/hibernate/postgresql.hibernate.cfg.xml</config-file>
   ```

   To:

   ```xml
   <config-file>system/hibernate/oracle10g.hibernate.cfg.xml</config-file>
   ```
2. Save and close the file.

#### Step 3: Replace default version of audit log file with Oracle version

Since you are using Oracle to host the Pentaho Repository, you need to replace the `audit_sql.xml` file with one that is configured for Oracle.

1. Locate the `pentaho-solutions/system/dialects/oracle10g/audit_sql.xml` file.
2. Copy it into the `pentaho-solutions/system` directory.

#### Step 4: Modify Jackrabbit repository information for Oracle

Edit the following code to change the default Jackrabbit repository to Oracle.

1. Navigate to the `pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit` and open the `repository.xml` file with any text editor.
2. As shown in the table below, locate and verify or change the code so that the Oracle lines are not commented out, but the MySQL, PostgreSQL, and MS SQL Server lines are commented out.

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Item</td><td>Code Section</td></tr><tr><td>Repository</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
    &#x3C;param name="driver" value="javax.naming.InitialContext"/>
    &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
    &#x3C;param name="schemaObjectPrefix" value="fs_repos_"/>
    &#x3C;param name="tablespace" value="pentaho_tablespace"/>
&#x3C;/FileSystem>
</code></pre></td></tr><tr><td>DataStore</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
    &#x3C;param name="driver" value="javax.naming.InitialContext"/>
    &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
    &#x3C;param name="databaseType" value="oracle"/>
    &#x3C;param name="minRecordLength" value="1024"/>
    &#x3C;param name="maxConnections" value="3"/>
    &#x3C;param name="copyWhenReading" value="true"/>
    &#x3C;param name="tablePrefix" value=""/>
    &#x3C;param name="schemaObjectPrefix" value="ds_repos_"/>
&#x3C;/DataStore>
</code></pre></td></tr><tr><td>Workspaces</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schemaObjectPrefix" value="fs_ws_"/>
      &#x3C;param name="tablespace" value="pentaho_tablespace"/>
&#x3C;/FileSystem>
</code></pre></td></tr><tr><td>PersistenceManager (1st part)</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="oracle"/>
      &#x3C;param name="schemaObjectPrefix" value="${wsp.name}_pm_ws_"/>
      &#x3C;param name="tablespace" value="pentaho_tablespace"/>
&#x3C;/PersistenceManager>
</code></pre></td></tr><tr><td>Versioning</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schemaObjectPrefix" value="fs_ver_"/>
      &#x3C;param name="tablespace" value="pentaho_tablespace"/>
&#x3C;/FileSystem>
</code></pre></td></tr><tr><td>PersistenceManager (2nd part)</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="oracle"/>
      &#x3C;param name="schemaObjectPrefix" value="pm_ver_"/>
      &#x3C;param name="tablespace" value="pentaho_tablespace"/>
&#x3C;/PersistenceManager>
</code></pre></td></tr><tr><td>DatabaseJournal</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;Journal class="org.apache.jackrabbit.core.journal.OracleDatabaseJournal">
	 &#x3C;param name="revision" value="${rep.home}/revision.log" />
	 &#x3C;param name="driver" value="javax.naming.InitialContext"/>
	 &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
	 &#x3C;param name="schema" value="oracle"/>
	 &#x3C;param name="schemaObjectPrefix" value="J_C_"/>
 	&#x3C;param name="janitorEnabled" value="true"/>
	 &#x3C;param name="janitorSleep" value="86400"/>
	 &#x3C;param name="janitorFirstRunHourOfDay" value="3"/>
&#x3C;/Journal>
</code></pre></td></tr></tbody></table>

### Perform Tomcat-specific connection tasks

After your repository has been configured, you must configure the web application servers to connect to the Pentaho Repository. In this step, you will make JDBC and JNDI connections to the Hibernate, Jackrabbit, and Quartz components.

**Note:** By default, the Pentaho Server software is configured to be deployed and run on the Tomcat server. As such, connections have already been specified and the Tomcat `context.xml` file must be modified ONLY if you have changed the default ports or passwords.

Use these steps to set up the JDBC driver and update the Tomcat connection settings.

#### Step 1: Download driver and apply to the Pentaho Server

To connect to a database, including the Pentaho Repository database, you must download and copy a JDBC driver to the appropriate places for the Pentaho Server and the web application server.

**Note:** Due to licensing restrictions, Pentaho cannot redistribute some third-party database drivers. You must download and install the file yourself.

1. Download a JDBC Driver JAR from your database vendor or a third-party driver developer.

   The [JDBC drivers reference](/install/jdbc-drivers-reference.md) has a list of supported drivers.
2. Copy the JDBC driver JAR you downloaded to the `pentaho/server/pentaho-server/tomcat/lib` folder.
3. Copy the [`hsqldb-2.3.2.jar`](https://sourceforge.net/projects/hsqldb/files/hsqldb/hsqldb_2_3/) file to `pentaho-server/tomcat/lib` if you want to retain the sample provided by Pentaho.

#### Step 2: Modify JDBC connection information in the Tomcat XML file

Database connection and network information, such as the username, password, driver class information, IP address or domain name, and port numbers for your Pentaho Repository database are stored in the `context.xml` file. Modify this file to reflect the database connection and network information for your operating environment.

**Caution:** If you have a different port, password, user, driver class information, or IP address, change the values in these examples to match your environment.

1. Consult your database documentation to determine the JDBC class name and the connection string for your Pentaho Repository database.
2. Navigate to the `server/pentaho-server/tomcat/webapps/pentaho/META-INF` directory and open the `context.xml` file with any text editor.
3. Add the following code to the file if it does not already exist. Replace `XE` in the URL setting with your schema name.

   ```xml
   <Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="hibuser" password="password" driverClassName="oracle.jdbc.OracleDriver"
           url="jdbc:oracle:thin:@localhost:1521/XE" validationQuery="select 1 from dual"
           jdbcInterceptors="ConnectionState" defaultAutoCommit="true"/>
   <Resource name="jdbc/Audit" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="hibuser" password="password" driverClassName="oracle.jdbc.OracleDriver"
           url="jdbc:oracle:thin:@localhost:1521/XE" validationQuery="select 1 from dual"/>
   <Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="quartz" password="password" testOnBorrow="true"
           driverClassName="oracle.jdbc.OracleDriver"
           url="jdbc:oracle:thin:@localhost:1521/XE" validationQuery="select 1 from dual"/>
   <Resource name="jdbc/PDI_Operations_Mart" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="pentaho_operations_mart" password="password"
           driverClassName="oracle.jdbc.OracleDriver"
           url="jdbc:oracle:thin:@localhost:1521/XE" validationQuery="select 1 from dual"/>
   <Resource name="jdbc/pentaho_operations_mart" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="pentaho_operations_mart" password="password"
           driverClassName="oracle.jdbc.OracleDriver"
           url="jdbc:oracle:thin:@localhost:1521/XE" validationQuery="select 1 from dual"/>
   <Resource name="jdbc/live_logging_info" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="pentaho_dilogs" password="password"
           driverClassName="oracle.jdbc.OracleDriver"
           url="jdbc:oracle:thin:@localhost:1521/XE" validationQuery="select 1 from dual"/>
   <Resource name="jdbc/SampleData" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="pentaho_user" password="password"
           driverClassName="org.hsqldb.jdbcDriver"
           url="jdbc:hsqldb:hsql://localhost/sampledata"
           validationQuery="select 1 from dual"/>
   <Resource name="jdbc/SampleDataAdmin" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="pentaho_admin" password="password"
           driverClassName="org.hsqldb.jdbcDriver"
           url="jdbc:hsqldb:hsql://localhost/sampledata"
           validationQuery="select 1 from dual"/>
   <Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="jcr_user" password="password"
           driverClassName="oracle.jdbc.OracleDriver"
           url="jdbc:oracle:thin:@localhost:1521/XE"
           validationQuery="select 1 from dual"/>
   ```
4. Modify the username, password, driver class information, IP address (or domain name), and port numbers to match your environment.
5. Comment out any resource references that refer to other databases.
6. Verify that the `validationQuery` variable for your database is set to `validationQuery=\"select 1 from dual\"`.
7. Save the `context.xml` file, then close it.

### Start your server

After you complete the archive installation steps, start the Pentaho Server.

See [Step 3: Start Pentaho Server and install licenses](#step-3-start-pentaho-server-and-install-licenses).
{% endtab %}

{% tab title="MS SQL Server" %}
This section includes the steps for using MS SQL Server as the host database for the Pentaho Server in an archive installation.

### Before you begin

#### Prerequisites

Before you prepare your Pentaho Repository, complete [Step 1: Prepare your environment](#step-1-prepare-your-environment).

#### Components

The Pentaho Repository resides on the database you installed during environment preparation.

It consists of these components:

* **Jackrabbit**\
  Contains the solution repository, examples, security data, and report content data.
* **Quartz**\
  Holds data related to scheduling reports and jobs.
* **Hibernate**\
  Holds data related to audit logging.
* **(Optional) Pentaho Operations Mart**\
  Reports on system usage and performance.

### Initialize MS SQL Server Pentaho Repository database

To initialize MS SQL Server so it serves as the Pentaho Repository, run SQL scripts to create the Hibernate, Quartz, Jackrabbit (JCR), and Pentaho Operations Mart components.

**CAUTION:** Use the ASCII character set when you run these scripts. Do not use UTF-8. Text string length limitations can cause the scripts to fail.

**CAUTION:** If you have a different password or user, update the examples to match your configuration.

**CAUTION:** Pentaho 10.2.0.0 and earlier use the Quartz 1.x library, which uses a `QRTZ5_` prefix in the database. Pentaho 10.2.0.1 and later use Quartz 2.x, which uses a `QRTZ6_` prefix. When you upgrade from an earlier version, create the `QRTZ6_` tables by repeating the Quartz database creation step. You can optionally migrate schedules with the migration script. Always back up your data before you proceed.

**Important:** If you do not complete the Quartz upgrade, Pentaho Server fails at startup. You will see a “Missing Quartz library database error” exception in `catalina.log`.

#### Step 1: Adjust MS SQL Server configuration settings

Configure these MS SQL Server settings in Microsoft SQL Server Management Studio (or a similar tool).

1. Select **SQL Server and Windows Authentication Mode** to use mixed authentication.
2. Enable **TCP/IP** for MS SQL Server.
3. Make sure MS SQL Server listens on an external IP, not localhost.

#### Step 2: Change default passwords

For production, follow best practices to change the default passwords in the SQL scripts.

**Note:** If you are evaluating Pentaho, you may want to skip this step.

1. Browse to the `<your pentaho directory>/pentaho-server/data/sqlserver` folder.
2. Modify these create scripts as needed for your existing setup (user, password, database, and other required information):
   * `create_jcr_sqlServer.sql`
   * `create_quartz_sqlServer.sql`
   * `create_repository_sqlServer.sql`
   * `pentaho_mart_sqlserver.sql`
3. Save and close the files.

#### Step 3: Run SQL scripts

When upgrading from previous Pentaho versions (including 10.2.0.0 GA to 10.2.0.1 and later), manually initialize a new Quartz database. This creates a new Quartz library in the repository database. Back up your data before you proceed.

Run the SQL creation scripts.

**Note:** You may need administrator permissions to run these scripts on the host OS server.

1. Back up your data. See [Back up your existing Pentaho products and install Pentaho 11.0](/install/legacy-redirects/back-up-your-pentaho-products-and-install-pentaho-9.1-pentaho-upgrade.md).
2. If the Pentaho Server is running, stop it.\
   For instructions, see [Stop and start the Pentaho Server and repository](/install/legacy-redirects/tasks-to-be-performed-by-an-it-administrator-legacy-redirects/configure-the-pentaho-server-legacy-pages/stop-and-start-the-pentaho-server-and-repository.md).
3. Make sure your MS SQL Server instance is running.
4. Open a `sqlcmd` utility window, or run these scripts from Microsoft SQL Server Management Studio, in this order:

   1. `<your pentaho directory>/pentaho-server/data/sqlserver/create_jcr_sqlServer.sql`
   2. `<your pentaho directory>/pentaho-server/data/sqlserver/create_quartz_sqlServer.sql`
   3. `<your pentaho directory>/pentaho-server/data/sqlserver/create_repository_sqlServer.sql`
   4. `<your pentaho directory>/pentaho-server/data/sqlserver/pentaho_mart_sqlserver.sql`

   The Quartz database, Jackrabbit and MS SQL Server repositories, and Pentaho Operations Mart are created. The new Quartz scheduler table prefixed with `QRTZ6_` is created. Any existing `QRTZ5_` scheduler database is retained. Starting the Pentaho Server at this point results in an empty schedule.
5. If you want to retain your existing scheduler database, open the `migrate_old_quartz_data_sqlserver.sql` file.
6. Modify the migration script as needed for your existing setup (user, password, database, and other required information), then save it.
7. Run the migration script:\
   `<your pentaho directory>/pentaho-server/data/sqlserver/migrate_old_quartz_data_sqlserver.sql`

The original Quartz scheduler database is migrated to the new Quartz database.

**Note:** The original `QRTZ5_` data is retained. You can delete it after you confirm migration is successful.

**Note:** You unpacked the Pentaho Operations Mart SQL file while preparing your environment.

#### Step 4: Verify MS SQL Server initialization

**Note:** Unless you changed it in Step 1, the default password for each username below is `password`.

After you run the scripts, verify that the databases and user roles were created properly:

1. Open MS SQL Server Management Studio.
2. Log in as `hibuser`.
3. In **Object Explorer**, navigate to `hibernate` and verify that you can see the tables.
4. If you installed Pentaho Operations Mart, log in as `pentaho_operations_mart`.
5. In **Object Explorer**, navigate to `pentaho_operations_mart` and verify that you can see the tables.
6. Log in as `jcr_user`.
7. In **Object Explorer**, navigate to `jackrabbit` and verify that you can see the tables.\
   The Jackrabbit tables may not appear until you start Pentaho for the first time.
8. Log in as `pentaho_user`.
9. In **Object Explorer**, navigate to `quartz` and verify that you can see the tables.
10. Exit MS SQL Server Management Studio.

### Configure MS SQL Server Pentaho Repository database

After you initialize your repository database, configure Quartz, Hibernate, Jackrabbit, and Pentaho Operations Mart for an MS SQL Server database.

By default, the examples in this section assume MS SQL Server running on port `1433`. They also use the default password.

**CAUTION:** If you use a different port or password, update the examples to match your configuration.

#### Step 1: Set up Quartz on MS SQL Server

Event information, such as scheduled reports, is stored in the Quartz JobStore. During installation, indicate where the JobStore is located by modifying `quartz.properties`.

1. Open `pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties`.
2. In the `#_replace_jobstore_properties` section, set `org.quartz.jobStore.driverDelegateClass`:

   ```properties
   org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate
   ```
3. Save the file.

#### Step 2: Set Hibernate settings for MS SQL Server

Modify the Hibernate settings file to specify where Pentaho should find the Pentaho Repository Hibernate configuration file.

**Note:** The Hibernate database is also where Pentaho Server stores the audit logs used as source data for Pentaho Operations Mart.

The files in this section are located in `pentaho/server/pentaho-server/pentaho-solutions/system/hibernate`.

1. Open `hibernate-settings.xml`.
2. Find the `<config-file>` tags. Change `postgresql.hibernate.cfg.xml` to `sqlserver.hibernate.cfg.xml`.

   From:

   ```xml
   <config-file>system/hibernate/postgresql.hibernate.cfg.xml</config-file>
   ```

   To:

   ```xml
   <config-file>system/hibernate/sqlserver.hibernate.cfg.xml</config-file>
   ```
3. Save and close the file.

#### Step 3: Replace default version of audit log file with MS SQL Server version

Since you are using MS SQL Server to host the Pentaho Repository, replace `audit_sql.xml` with the MS SQL Server version.

1. Locate `pentaho-solutions/system/dialects/sqlserver/audit_sql.xml`.
2. Copy it into the `pentaho-solutions/system` directory.

#### Step 4: Modify Jackrabbit repository information for MS SQL Server

Edit `repository.xml` to change the default Jackrabbit repository to MS SQL Server.

1. Navigate to `pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit`.
2. Open `repository.xml`.
3. Locate and verify or change the configuration so that the MS SQL Server lines are uncommented, and the MySQL, Oracle, and PostgreSQL lines are commented out.

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Item</td><td>Code Section</td></tr><tr><td>Repository</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.MSSqlFileSystem">
    &#x3C;param name="driver" value="javax.naming.InitialContext"/>
    &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
    &#x3C;param name="schema" value="mssql"/>
    &#x3C;param name="schemaObjectPrefix" value="fs_repos_"/>
  &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>DataStore</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
    &#x3C;param name="driver" value="javax.naming.InitialContext"/>
    &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
    &#x3C;param name="databaseType" value="mssql"/>
    &#x3C;param name="minRecordLength" value="1024"/>
    &#x3C;param name="maxConnections" value="3"/>
    &#x3C;param name="copyWhenReading" value="true"/>
    &#x3C;param name="tablePrefix" value=""/>
    &#x3C;param name="schemaObjectPrefix" value="ds_repos_"/>
  &#x3C;/DataStore>
</code></pre></td></tr><tr><td>Workspaces</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.MSSqlFileSystem">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="mssql"/>
      &#x3C;param name="schemaObjectPrefix" value="fs_ws_"/>
    &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>PersistenceManager (1st part)</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MSSqlPersistenceManager">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="mssql"/>
      &#x3C;param name="schemaObjectPrefix" value="${wsp.name}_pm_ws_"/>
    &#x3C;/PersistenceManager>
</code></pre></td></tr><tr><td>Versioning</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;FileSystem class="org.apache.jackrabbit.core.fs.db.MSSqlFileSystem">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="mssql"/>
      &#x3C;param name="schemaObjectPrefix" value="fs_ver_"/>
    &#x3C;/FileSystem>
</code></pre></td></tr><tr><td>PersistenceManager (2nd part)</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MSSqlPersistenceManager">
      &#x3C;param name="driver" value="javax.naming.InitialContext"/>
      &#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
      &#x3C;param name="schema" value="mssql"/>
      &#x3C;param name="schemaObjectPrefix" value="pm_ver_"/>
    &#x3C;/PersistenceManager>
</code></pre></td></tr><tr><td>DatabaseJournal</td><td><pre class="language-xml"><code class="lang-xml">&#x3C;Journal class="org.apache.jackrabbit.core.journal.MSSqlDatabaseJournal">
	&#x3C;param name="revision" value="${rep.home}/revision.log" />
	&#x3C;param name="url" value="java:comp/env/jdbc/jackrabbit"/>
	&#x3C;param name="driver" value="javax.naming.InitialContext"/>
	&#x3C;param name="schema" value="mssql"/>
	&#x3C;param name="schemaObjectPrefix" value="cl_j_"/>
	&#x3C;param name="janitorEnabled" value="true"/>
	&#x3C;param name="janitorSleep" value="86400"/>
	&#x3C;param name="janitorFirstRunHourOfDay" value="3"/>
&#x3C;/Journal>
</code></pre></td></tr></tbody></table>

### Perform Tomcat-specific connection tasks

After your repository is configured, configure your web application server to connect to the Pentaho Repository.

In this step, you make JDBC and JNDI connections to the Hibernate, Jackrabbit, and Quartz components.

**Note:** By default, Pentaho Server is configured to be deployed and run on Tomcat. Connections are already specified. Modify Tomcat `context.xml` only if you changed the default ports or passwords.

#### Step 1: Download driver and apply to the Pentaho Server

To connect to a database (including the Pentaho Repository database), download and copy a JDBC driver to the Pentaho Server and the web application server.

**Note:** Due to licensing restrictions, Pentaho cannot redistribute some third-party database drivers. You must download and install the file yourself.

1. Download a JDBC driver `.jar` from your database vendor or a third-party driver developer.\
   See [JDBC drivers reference](/install/jdbc-drivers-reference.md).
2. Copy the JDBC driver `.jar` to `pentaho/server/pentaho-server/tomcat/lib`.
3. Copy [`hsqldb-2.3.2.jar`](https://sourceforge.net/projects/hsqldb/files/hsqldb/hsqldb_2_3/) to `pentaho-server/tomcat/lib` if you want to retain the Pentaho sample data.

#### Step 2: Modify JDBC connection information in the Tomcat XML file

Database connection and network information (such as user name, password, driver class, host, and port) is stored in `context.xml`. Modify it to match your environment.

**CAUTION:** If you use a different user name, password, or port, update the examples to match your environment.

1. Consult your database documentation to determine the JDBC class name and connection string for your Pentaho Repository database.
2. Navigate to `server/pentaho-server/tomcat/webapps/pentaho/META-INF`.
3. Open `context.xml`.
4. Add the following resources if they do not already exist:

   ```xml
   <Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" maxIdle="10" maxWait="10000"
           initialSize="0" username="hibuser" password="password"
           driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
           url="jdbc:sqlserver://localhost:1433;DatabaseName=hibernate;encrypt=true;trustServerCertificate=false"
           validationQuery="select 1"/>
   <Resource name="jdbc/Audit" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" maxIdle="10" maxWait="10000"
           initialSize="0" username="hibuser" password="password"
           driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"        
           url="jdbc:sqlserver://localhost:1433;DatabaseName=hibernate;encrypt=true;trustServerCertificate=false"
           validationQuery="select 1"/>
   <Resource  name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           initialSize="0" maxActive="20" maxIdle="10" maxWait="10000"
           testOnBorrow="true" username="pentaho_user" password="password"
           driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
           url="jdbc:sqlserver://localhost:1433;DatabaseName=quartz;encrypt=true;trustServerCertificate=false"
           validationQuery="select 1"/>
   <Resource name="jdbc/pentaho_operations_mart" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" maxIdle="10" maxWait="10000"
           initialSize="0" username="pentaho_operations_mart" password="password"
           driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
           url="jdbc:sqlserver://localhost:1433;DatabaseName=pentaho_operations_mart;encrypt=true;trustServerCertificate=false"
           validationQuery="select 1"/>
   <Resource name="jdbc/PDI_Operations_Mart" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" maxIdle="10" maxWait="10000"
           initialSize="0" username="pentaho_operations_mart" password="password"
           driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
           url="jdbc:sqlserver://localhost:1433;DatabaseName=pentaho_operations_mart;encrypt=true;trustServerCertificate=false"
           validationQuery="select 1"/>
   <Resource name="jdbc/live_logging_info" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           initialSize="0" maxActive="20" maxIdle="10"
           maxWait="10000" username="dilogs_user" password="password"
           driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
           url="jdbc:sqlserver://localhost:1433;DatabaseName=pentaho_dilogs;encrypt=true;trustServerCertificate=false"
           validationQuery="select 1"/>
   <Resource name="jdbc/SampleData" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="pentaho_user" password="password" driverClassName="org.hsqldb.jdbcDriver"
           url="jdbc:hsqldb:hsql://localhost/sampledata" validationQuery="select 1"/>
   <Resource name="jdbc/SampleDataAdmin" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0" maxWait="10000"
           username="pentaho_admin" password="password" driverClassName="org.hsqldb.jdbcDriver"
           url="jdbc:hsqldb:hsql://localhost/sampledata" validationQuery="select 1"/>
   <Resource name="jdbc/jackrabbit" auth="Container" type="javax.sql.DataSource"
           factory="org.pentaho.di.core.database.util.DecryptingDataSourceFactory"
           maxActive="20" minIdle="0" maxIdle="5" initialSize="0"
           maxWait="10000" username="jcr_user" password="password"
           driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
           url="jdbc:sqlserver://localhost:1433;DatabaseName=jackrabbit;encrypt=true;trustServerCertificate=false"
           validationQuery="select 1"/>
   ```

   **Note:** Depending on your MS SQL Server configuration, you may be able to set `trustServerCertificate=true`. See [Connecting with encryption](https://learn.microsoft.com/en-us/sql/connect/jdbc/connecting-with-ssl-encryption?view=sql-server-ver16).
5. Modify user names, passwords, driver class information, host, and port to match your environment.
6. Comment out any resource references that refer to other databases.
7. Verify your database validation query is set to `validationQuery=\"select 1\"`.
8. Save and close `context.xml`.

### Start your server

After you complete the archive installation steps, start the Pentaho Server.

See [Step 3: Start Pentaho Server and install licenses](#step-3-start-pentaho-server-and-install-licenses).
{% endtab %}
{% endtabs %}

### Step 3: Start Pentaho Server and install licenses

The Pentaho Server is located on the Pentaho-provided Tomcat web application server.

The way you start the Pentaho Server depends on your operating system.

1. Navigate to the `<your pentaho directory>/server/pentaho-server` folder.
2. Run the startup script for your operating system:

   | Operating system | File                |
   | ---------------- | ------------------- |
   | Windows          | `start-pentaho.bat` |
   | Linux            | `start-pentaho.sh`  |

   The Tomcat web application server and the Pentaho Server start.
3. From a workstation, open a web browser and enter `http://localhost:8080/pentaho` in the address bar.

   **Note:** If your server has a different hostname or port, replace `localhost` or `8080` with your specific values.

   The Pentaho User Console login page appears.
4. Enter your user name and password then click **Login**.

   The Pentaho User Console (PUC) appears.

   **Note:** Upon logging in the first time after installation, you must enter a license server code or the individual license codes for Pentaho before proceeding.

See the **Administer Pentaho Data Integration and Analytics** document for instructions on setting up your licenses and optional Operations Mart logging.

If you have problems starting the Pentaho Server, see [Troubleshooting possible installation and upgrade issues](/install/pentaho-installation-overview-cp/installation-and-upgrade-issues.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/install/legacy-redirects/archive-installation-of-pentaho-legacy-pages/archive-installation-process.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
