Step 2: Prepare your Pentaho Repository
The Pentaho Repository resides on the database you installed during environment setup.
It includes these components:
Jackrabbit Contains the solution repository, examples, security data, and report content data.
Quartz Stores scheduler data for reports and jobs.
Hibernate Stores audit logging data.
(Optional) Pentaho Operations Mart Stores system usage and performance data.
Prepare the Pentaho Repository for your host database:
Use PostgreSQL as your repository database (manual installation)
Install PostgreSQL as the host database for the Pentaho Server repository.
Initialize the PostgreSQL Pentaho Repository database
Run PostgreSQL initialization scripts to create the Pentaho Repository schemas.
You create schemas for Hibernate, Quartz, Jackrabbit (JCR), and Pentaho Operations Mart.
Change default passwords
For production, follow best practices and change the default passwords in the SQL script files.
Browse to
<your-pentaho-dir>/pentaho-server/data/postgresql.Edit these scripts for your user, password, database, and any other required values:
create_jcr_postgresql.sqlcreate_quartz_postgresql.sqlcreate_repository_postgresql.sqlpentaho_mart_postgresql.sql
Save the files.
Run SQL scripts
Run the PostgreSQL initialization scripts from the Pentaho software distribution.
If you are upgrading from earlier Pentaho versions (including 10.2.0.0 GA → 10.2.0.1+), you must create the new Quartz 2.x tables.
If you want to keep existing scheduler data, migrate QRTZ5_ data to the new QRTZ6_ tables.
Back up your data. See step 3, Back up your existing Pentaho products and install Pentaho 11.0, in the Upgrade an archive installation section.
If Pentaho Server is running, stop it. See Stop and start the Pentaho Server and repository.
Make sure PostgreSQL is running.
Open a
psqlconsole and run these scripts in order:<your-pentaho-dir>/pentaho-server/data/postgresql/create_quartz_postgresql.sql<your-pentaho-dir>/pentaho-server/data/postgresql/create_jcr_postgresql.sql<your-pentaho-dir>/pentaho-server/data/postgresql/create_repository_postgresql.sql(Hibernate)<your-pentaho-dir>/pentaho-server/data/postgresql/pentaho_mart_postgresql.sql
The Quartz database, Jackrabbit repository, PostgreSQL repository, and Operations Mart schema are created. The new Quartz scheduler tables are also created with the prefix,
QRTZ6_. Any existingQRTZ5_scheduler tables are retained.If you want to retain existing scheduler data, open
migrate_old_quartz_data_postgresql.sql.Update the migration script for your current user, password, database, and any other required values.
Run the migration script in the following location:
<your-pentaho-dir>/pentaho-server/data/postgresql/migrate_old_quartz_data_postgresql.sql. The originalQRTZ5_data is retained. Delete it after you confirm the migration is successful.
Verify PostgreSQL initialization
Open pgAdmin (or a similar client).
Log in as
hibuser, then verify you can see the tables underhibernate.If you installed Operations Mart, verify you can see the tables under
pentaho_operations_mart.Log in as
jcr_user, then verify you can see the tables underjackrabbit.Log in as
pentaho_user, then verify you can see the tables underquartz.
You have initialized the PostgreSQL Pentaho Repository database.
Configure the PostgreSQL Pentaho Repository database
Configure Quartz, Hibernate, Jackrabbit, and Operations Mart for PostgreSQL.
Set up Quartz on PostgreSQL
Quartz stores scheduler data, such as scheduled reports.
You point Pentaho at the correct JobStore by updating quartz.properties.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties.In
#_replace_jobstore_properties, setorg.quartz.jobStore.driverDelegateClass:org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegateSave the file.
Set Hibernate settings for PostgreSQL
Hibernate settings point Pentaho to the correct Hibernate configuration file.
Files are in pentaho/server/pentaho-server/pentaho-solutions/system/hibernate.
Open
hibernate-settings.xml.Find the
<config-file>entry, then confirm it uses the PostgreSQL config:<config-file>system/hibernate/postgresql.hibernate.cfg.xml</config-file>Save the file if you made changes.
Modify Jackrabbit repository information for PostgreSQL
Update Jackrabbit to use the PostgreSQL repository.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit/repository.xml.Comment out resource references for databases you are not using.
Verify these sections use the PostgreSQL values.
Repository
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem"> <param name="driver" value="javax.naming.InitialContext"/> <param name="url" value="java:comp/env/jdbc/jackrabbit"/> <param name="schema" value="postgresql"/> <param name="schemaObjectPrefix" value="fs_repos_"/> </FileSystem>DataStore
<DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore"> <param name="driver" value="javax.naming.InitialContext"/> <param name="url" value="java:comp/env/jdbc/jackrabbit"/> <param name="databaseType" value="postgresql"/> <param name="minRecordLength" value="1024"/> <param name="maxConnections" value="3"/> <param name="copyWhenReading" value="true"/> <param name="tablePrefix" value=""/> <param name="schemaObjectPrefix" value="ds_repos_"/> </DataStore>Workspaces
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem"> <param name="driver" value="javax.naming.InitialContext"/> <param name="url" value="java:comp/env/jdbc/jackrabbit"/> <param name="schema" value="postgresql"/> <param name="schemaObjectPrefix" value="fs_ws_"/> </FileSystem>PersistenceManager (workspaces)
<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager"> <param name="driver" value="javax.naming.InitialContext"/> <param name="url" value="java:comp/env/jdbc/jackrabbit"/> <param name="schema" value="postgresql"/> <param name="schemaObjectPrefix" value="${wsp.name}_pm_ws_"/> </PersistenceManager>DatabaseJournal
<Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal"> <param name="revision" value="${rep.home}/revision.log" /> <param name="driver" value="javax.naming.InitialContext"/> <param name="url" value="java:comp/env/jdbc/jackrabbit"/> <param name="schema" value="postgresql"/> <param name="schemaObjectPrefix" value="cl_j_"/> <param name="janitorEnabled" value="true"/> <param name="janitorSleep" value="86400"/> <param name="janitorFirstRunHourOfDay" value="3"/> </Journal>
Perform Tomcat-specific connection tasks
After you configure the Pentaho Repository, configure Tomcat to connect to it.
This step sets up JDBC and JNDI connections for Hibernate, Jackrabbit, and Quartz.
Download the JDBC driver and apply it to Pentaho Server
To connect to a database, you must install a JDBC driver JAR.
Install it for Pentaho Server and Tomcat.
Download a JDBC driver JAR from your database vendor. See JDBC drivers reference.
Copy the JDBC driver JAR to
pentaho/server/pentaho-server/tomcat/lib.Optional: Copy
hsqldb-2.3.2.jartopentaho/server/pentaho-server/tomcat/lib.
Do this if you want to keep the Pentaho sample data.
Modify JDBC connection information in the Tomcat context.xml file
Database connection settings are stored in Tomcat context.xml.
Update the file to match your environment.
Consult your database documentation for:
JDBC driver class name
JDBC connection string
Open
server/pentaho-server/tomcat/webapps/pentaho/META-INF/context.xmlin a text editor.Add the following XML if it does not already exist:
Update the username, password, driver class, host, and port to match your environment.
Comment out any resources for databases you are not using.
Verify
validationQuery="select 1".Save the file.
After you have prepared your Pentaho Repository, go to Step 3: Configure and start the Pentaho Server after manual installation.
Use MySQL or MariaDB as your repository database (manual installation)
Install MySQL or MariaDB as the host database for the Pentaho Server repository.
Initialize the MySQL or MariaDB Pentaho Repository database
Run SQL scripts to create the Hibernate, Quartz, Jackrabbit (JCR), and Operations Mart components.
Change default passwords
For production, change the default passwords in the SQL scripts.
Browse to
<your-pentaho-directory>/pentaho-server/data/mysql.Update these scripts for your user, password, database, and other required values:
create_jcr_mysql.sqlcreate_quartz_mysql.sqlcreate_repository_mysql.sqlpentaho_mart_mysql.sql
Save and close the files.
Run SQL scripts
When upgrading from older versions (including 10.2.0.0 GA), initialize a new Quartz database. This creates the Quartz 2.x tables.
Back up your data. See step 3, Back up your existing Pentaho products and install Pentaho 11.0, in the Upgrade an archive installation section.
If the Pentaho Server is running, stop it. See Stop and start the Pentaho Server and repository.
Make sure your MySQL or MariaDB instance is running.
Open a MySQL/MariaDB prompt or MySQL Workbench. Then run the scripts in this order:
<your-pentaho-directory>/pentaho-server/data/mysql/create_jcr_mysql.sql<your-pentaho-directory>/pentaho-server/data/mysql/create_quartz_mysql.sql<your-pentaho-directory>/pentaho-server/data/mysql/create_repository_mysql.sql<your-pentaho-directory>/pentaho-server/data/mysql/pentaho_mart_mysql.sql
This creates:
Quartz scheduler tables prefixed with
QRTZ6_Jackrabbit tables
Repository tables
(Optional) Operations Mart tables
Any existing
QRTZ5_tables are retained. If you start the server now, the schedule is empty.If you want to retain existing schedules, open
migrate_old_quartz_data_mysql.sql.Update the migration script as needed. Then save it.
Run:
<your-pentaho-directory>/pentaho-server/data/mysql/migrate_old_quartz_data_mysql.sql
Verify MySQL or MariaDB initialization
Open MySQL Workbench.
Log in as
hibuser.Under Schemas, expand hibernate > Tables. Verify you see tables.
If you installed Operations Mart, expand pentaho_operations_mart > Tables. Verify tables.
Log in as
jcr_user.Under Schemas, expand jackrabbit > Tables. Verify tables.
Log in as
pentaho_user.Under Schemas, expand quartz > Tables. Verify tables.
Exit MySQL Workbench.
You have initialized the MySQL or MariaDB Pentaho Repository database.
Configure the MySQL or MariaDB Pentaho Repository database
Configure Quartz, Hibernate, Jackrabbit, and Operations Mart.
The examples assume MySQL on port 3306 with default passwords.
Set up Quartz on MySQL or MariaDB
Quartz stores scheduler event data, such as scheduled reports.
You point Pentaho at the correct JobStore by updating quartz.properties.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties.In
#_replace_jobstore_properties, setorg.quartz.jobStore.driverDelegateClass:Save the file.
Set Hibernate settings for MySQL or MariaDB
Hibernate settings point Pentaho to the correct Hibernate configuration file.
Files are in pentaho/server/pentaho-server/pentaho-solutions/system/hibernate.
Open
hibernate-settings.xml.Find the
<config-file>entry. Replacepostgresql.hibernate.cfg.xmlwithmysql5.hibernate.cfg.xml:From:
To:
Save and close the file.
(MariaDB only) Open
mysql5.hibernate.cfg.xml.Change the driver class:
From:
To:
Replace the audit log file with the MySQL version
Replace audit_sql.xml with the MySQL version.
Use the same file for MariaDB.
Locate
pentaho-solutions/system/dialects/mysql5/audit_sql.xml.Copy it into
pentaho-solutions/system.
Modify Jackrabbit repository information for MySQL or MariaDB
Update Jackrabbit to use the MySQL (or MariaDB) repository.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit/repository.xml.Uncomment the MySQL lines.
Comment out the MS SQL Server, Oracle, and PostgreSQL lines.
Verify these sections use the MySQL values.
Repository
DataStore
Workspaces
PersistenceManager (workspaces)
DatabaseJournal
Perform Tomcat-specific connection tasks
Configure Tomcat to connect to Hibernate, Jackrabbit, and Quartz.
Download the driver and apply it to the Pentaho Server
You need a JDBC driver for your repository database.
Download a JDBC driver JAR from your database vendor or a third-party provider. See JDBC drivers reference.
Copy the driver JAR to
pentaho/server/pentaho-server/tomcat/lib.If you want to keep the sample data, copy
hsqldb-2.3.2.jartopentaho-server/tomcat/lib.
Modify JDBC connection information in the Tomcat context XML file
Database connection information is stored in context.xml.
Use your database documentation to confirm:
JDBC driver class name
JDBC connection string format
Open
server/pentaho-server/tomcat/webapps/pentaho/META-INF/context.xml.Add resource entries if they do not exist already.
MySQL
MariaDB
Update usernames, passwords, hostnames, and ports to match your environment.
Comment out resource entries for databases you are not using.
Verify
validationQuery="select 1"is correct for your database.Save
context.xml.
After you have prepared your Pentaho Repository, go to Step 3: Configure and start the Pentaho Server after manual installation.
Use Oracle as your repository database (manual installation)
Install Oracle as the host database for the Pentaho Server repository.
Initialize the Oracle Pentaho Repository database
To initialize Oracle as a Pentaho Repository, run several SQL scripts to create Hibernate, Quartz, Jackrabbit (JCR), and Operations Mart components.
Change default passwords
For production systems, change the default passwords in the SQL scripts.
Browse to
<your-pentaho-directory>/pentaho-server/data/oracle.Edit these scripts for your user, password, database, and required settings:
create_jcr_ora.sqlcreate_quartz_ora.sqlcreate_repository_ora.sqlpentaho_mart_oracle.sql
Save and close the files.
Run SQL scripts
If you are upgrading from earlier Pentaho versions, initialize a new Quartz database for Quartz 2.x.
Back up your data. See step 3, Back up your existing Pentaho products and install Pentaho 11.0, in the Upgrade an archive installation section.
If the Pentaho Server is running, stop it. See Stop and start the Pentaho Server and repository.
Make sure your Oracle instance is running.
Open SQL*Plus (or a similar client) and run the scripts in this order:
<your-pentaho-directory>/pentaho-server/data/oracle/create_jcr_ora.sql<your-pentaho-directory>/pentaho-server/data/oracle/create_quartz_ora.sql<your-pentaho-directory>/pentaho-server/data/oracle/create_repository_ora.sql<your-pentaho-directory>/pentaho-server/data/oracle/pentaho_mart_oracle.sql
(Optional) Migrate schedules from Quartz 1.x:
Open
<your-pentaho-directory>/pentaho-server/data/oracle/migrate_old_quartz_data_oracle.sql.Update the script for your environment, then save it.
Run the migration script.
Verify Oracle initialization
Open SQL*Plus (or a similar client) and connect to the Oracle database.
Log in as
hibuser. Verify you can see the tables underhibernate.If you installed Operations Mart, verify you can see the tables under
pentaho_operations_mart.Log in as
jcr_user. Verify you can see the tables underjackrabbit. Jackrabbit tables might not appear until you start Pentaho for the first time.Log in as
pentaho_user. Verify you can see the tables underquartz.
Configure the Oracle Pentaho Repository database
By default, these examples assume Oracle runs on port 1521.
Set up Quartz on Oracle
Open
pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties.In
#_replace_jobstore_properties, set:Save the file.
Set Hibernate settings for Oracle
Files are in pentaho/server/pentaho-server/pentaho-solutions/system/hibernate.
Open
hibernate-settings.xml.Update the
<config-file>value:From:
To:
Save and close the file.
Replace the audit log file with the Oracle version
Locate
pentaho-solutions/system/dialects/oracle10g/audit_sql.xml.Copy it into
pentaho-solutions/system.
Modify Jackrabbit repository information for Oracle
Open
pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit/repository.xml.Uncomment the Oracle sections.
Comment out the MySQL, PostgreSQL, and MS SQL Server sections. Use these Oracle sections as your reference:
Repository
DataStore
Workspaces
PersistenceManager (workspaces)
Versioning
PersistenceManager (versioning)
DatabaseJournal
Perform Tomcat-specific connection tasks
After repository configuration, configure your web application server to connect to the repository. This includes JDBC and JNDI connections for Hibernate, Jackrabbit, and Quartz.
Download the JDBC driver and apply it to Pentaho Server
Download a JDBC driver
.jarfrom Oracle or a third-party provider.If needed, confirm the driver is supported. See JDBC drivers reference.
Copy the JDBC driver
.jartopentaho/server/pentaho-server/tomcat/lib.(Optional) Copy
hsqldb-2.3.2.jartopentaho/server/pentaho-server/tomcat/libto keep the sample data.
Modify JDBC connection information in the Tomcat context.xml file
Find the JDBC driver class name and connection string in your database documentation.
Open
server/pentaho-server/tomcat/webapps/pentaho/META-INF/context.xml.Add or update resources similar to the following examples:
Save the file.
After you have prepared your Pentaho Repository, go to Step 3: Configure and start the Pentaho Server after manual installation.
Use MS SQL Server as your repository database (manual installation)
Install MS SQL Server as the host database for the Pentaho Server repository.
Initialize the MySQL or MariaDB Pentaho Repository database
Run SQL scripts to create the Hibernate, Quartz, Jackrabbit (JCR), and Operations Mart schemas.
Adjust MS SQL Server configuration settings
Configure these settings in Microsoft SQL Server Management Studio (or similar):
Select SQL Server and Windows Authentication Mode to use mixed authentication.
Enable TCP/IP for MS SQL Server.
Make sure MS SQL Server listens on an external IP, not
localhost.
Change default passwords
For production systems, change the default passwords in the SQL scripts.
Browse to
<your-pentaho-directory>/pentaho-server/data/sqlserver.Edit these scripts for your user, password, database, and required settings:
create_jcr_sqlServer.sqlcreate_quartz_sqlServer.sqlcreate_repository_sqlServer.sqlpentaho_mart_sqlserver.sql
Save and close the files.
Run SQL scripts
If you are upgrading from earlier Pentaho versions, initialize a new Quartz database for Quartz 2.x.
Back up your data. See step 3, Back up your existing Pentaho products and install Pentaho 11.0, in the Upgrade an archive installation section.
If the Pentaho Server is running, stop it. See Stop and start the Pentaho Server and repository.
Make sure your MS SQL Server instance is running.
Run these scripts in order:
<your-pentaho-directory>/pentaho-server/data/sqlserver/create_jcr_sqlServer.sql<your-pentaho-directory>/pentaho-server/data/sqlserver/create_quartz_sqlServer.sql<your-pentaho-directory>/pentaho-server/data/sqlserver/create_repository_sqlServer.sql<your-pentaho-directory>/pentaho-server/data/sqlserver/pentaho_mart_sqlserver.sql
This creates:
Jackrabbit schema and repository tables
Quartz tables (
QRTZ6_for Quartz 2.x)Hibernate repository schema
Pentaho Operations Mart schema
(Optional) Migrate schedules from Quartz 1.x:
Open
<your-pentaho-directory>/pentaho-server/data/sqlserver/migrate_old_quartz_data_sqlserver.sql.Update the script for your environment, then save it.
Run the migration script.
Verify MS SQL Server initialization
Open MS SQL Server Management Studio.
Log in as
hibuser.In Object Explorer, select
hibernate. Verify tables exist.If you installed Pentaho Operations Mart, log in as
pentaho_operations_mart.In Object Explorer, select
pentaho_operations_mart. Verify tables exist.Log in as
jcr_user.In Object Explorer, select
jackrabbit. Verify tables exist. Jackrabbit tables may not appear until you start Pentaho the first time.Log in as
pentaho_user.In Object Explorer, select
quartz. Verify tables exist.Exit MS SQL Server Management Studio.
Configure the MS SQL Server Pentaho Repository database
After initialization, configure Quartz, Hibernate, Jackrabbit, and Pentaho Operations Mart to use MS SQL Server.
Set up Quartz on MS SQL Server
Open
pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties.In
#_replace_jobstore_properties, set this value:Save the file.
Set Hibernate settings for MS SQL Server
All files below are in pentaho/server/pentaho-server/pentaho-solutions/system/hibernate.
Open
hibernate-settings.xml.Update the
<config-file>value:From:
To:
Save the file.
Replace the default audit log file with the MS SQL Server version
Locate
pentaho-solutions/system/dialects/sqlserver/audit_sql.xml.Copy it to
pentaho-solutions/system.
Modify Jackrabbit repository information for MS SQL Server
Open
pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit/repository.xml.Uncomment the MS SQL Server sections.
Comment out the MySQL, Oracle, and PostgreSQL sections. Use these MS SQL Server sections as your reference:
Repository
DataStore
Workspaces
PersistenceManager (workspace)
Versioning
PersistenceManager (versioning)
DatabaseJournal
Perform Tomcat-specific connection tasks
After repository configuration, configure your web application server to connect to the repository. This includes JDBC and JNDI connections for Hibernate, Jackrabbit, and Quartz.
Download the JDBC driver and apply it to Pentaho Server
You must provide a JDBC driver for MS SQL Server. Pentaho cannot redistribute all third-party drivers.
Download a JDBC driver
.jarfrom Microsoft or a third-party provider.If needed, confirm the driver is supported. See JDBC drivers reference.
Copy the JDBC driver
.jartopentaho/server/pentaho-server/tomcat/lib.(Optional) Copy
hsqldb-2.3.2.jartopentaho/server/pentaho-server/tomcat/libto keep the sample data.
Modify JDBC connection information in the Tomcat context.xml file
Find the JDBC driver class name and connection string in your database documentation.
Open
server/pentaho-server/tomcat/webapps/pentaho/META-INF/context.xml.Add or update the resources if they do not already exist.
Verify
validationQuery="select 1"is correct for your database.Save the file.
After you have prepared your Pentaho Repository, go to Step 3: Configure and start the Pentaho Server after manual installation.
Last updated
Was this helpful?

