Use MS SQL Server as your repository database (Manual installation)
Legacy page. Content moved to the main topic.
This page is kept for existing links. Go to Manual installation process.
Use these steps to set up MS SQL Server as the Pentaho Repository host database.
Before you begin
Prerequisite
Prepare your OS environment first:
Repository components
The Pentaho Repository database includes:
Jackrabbit Stores the solution repository, examples, security data, and report content.
Quartz Stores schedules for reports and jobs.
Hibernate Stores audit logging data.
(Optional) Pentaho Operations Mart Stores usage and performance data.
Initialize the MS SQL Server Pentaho Repository database
You will run SQL scripts to create the Hibernate, Quartz, Jackrabbit (JCR), and Pentaho Operations Mart schemas.
Use the ASCII character set when you run these scripts. Do not use UTF-8. Some scripts can fail due to string length limits.
If your usernames, passwords, or ports differ, update the examples first.
Pentaho 10.2.0.0 and earlier use Quartz 1.x tables with a QRTZ5_ prefix.
Pentaho 10.2.0.1 and later use Quartz 2.x tables with a QRTZ6_ prefix.
When upgrading to 10.2.0.1+ you must create the QRTZ6_ tables.
You can optionally migrate existing schedules with migrate_old_quartz_data_sqlserver.sql.
Failure to complete this Quartz upgrade can prevent the server from starting.
You may see Missing Quartz library database error in catalina.log.
Step 1: 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.
Step 2: Change default passwords
For production systems, change the default passwords in the SQL scripts.
If you are evaluating Pentaho, you can skip this step.
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.
Step 3: Run SQL scripts
If you are upgrading from earlier Pentaho versions, initialize a new Quartz database for Quartz 2.x.
Back up your data before proceeding.
Back up your data. See Back up your existing Pentaho products and install Pentaho 11.0.
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.
The original QRTZ5_ tables remain.
Delete them only after you confirm the migration.
Step 4: Verify MS SQL Server initialization
Unless you changed it in Step 1, the default password for each username is password.
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.
These examples assume MS SQL Server on port 1433 and the default passwords.
If your ports or passwords differ, update the examples.
Step 1: Set up Quartz on MS SQL Server
Quartz schedule data is stored in the Quartz JobStore. You configure the JobStore in quartz.properties.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties.In
#_replace_jobstore_properties, set this value:Save the file.
Step 2: Set Hibernate settings for MS SQL Server
Hibernate configuration includes the driver, connection, dialect, and connection handling. The Hibernate database also stores audit logs for Operations Mart.
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.
Step 4: Modify Jackrabbit repository information for MS SQL Server
Update repository.xml to use MS SQL Server for the Jackrabbit repository.
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.
Pentaho Server is configured for Tomcat by default.
Update context.xml only if you changed default ports, hosts, or passwords.
Step 1: 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.
Step 2: Modify JDBC connection information in the Tomcat context.xml file
context.xml fileConnection details for your repository database are stored in context.xml.
If your host, port, username, password, or driver class differs, update the values below. Also comment out resources for databases you do not use.
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.
Next steps
Continue with Configure and start the Pentaho Server after manual installation.
Last updated
Was this helpful?

