Use Oracle as Your Repository Database (Archive installation)
This article 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, prepare either a Windows or Linux environment.
Components
The Pentaho Repository resides on the database that you installed during the Windows or Linux 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 article 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.
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.
If you use different users or passwords, update the examples to match your environment.
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.
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:
Steps
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.
Browse to the
<*your pentaho directory*>/pentaho-server/data/oraclefolder.Use a text editor to update the scripts as needed for your user, password, database, and other settings:
create_jcr_ora.sqlcreate_quartz_ora.sqlcreate_repository_ora.sqlpentaho_mart_oracle.sql
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.
Back up your data. See Back up your existing Pentaho products and install Pentaho 11.0.
If the Pentaho Server is running, stop it.
For instructions, see Stop and start the Pentaho Server and repository.
Make sure that your Oracle instance is running.
Open a Command Prompt or terminal window that runs SQL*Plus, then run the following 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/pentaho_mart_oracle.sql
This creates the Quartz database, Jackrabbit repository, Hibernate repository, and Pentaho Operations Mart.
The
QRTZ6_tables are created. Any existingQRTZ5_tables remain. If you start the Pentaho Server now, the schedule is empty.If you want to retain your existing schedule data, open
migrate_old_quartz_data_oracle.sqlin a text editor.Update the script for your user, password, database, and other settings, then save it.
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.
For details, see Prepare your Windows environment for an archive install or Prepare your Linux environment for an archive install.
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:
Open a Terminal or Command Prompt window running SQL*Plus (or a similar client) and connect to the Oracle database.
Log in as hibuser.
Verify that you can see the tables under hibernate.
If you installed Pentaho Operations Mart, verify that you can see the tables under pentaho_operations_mart.
Log in as jcr_user.
Verify that you can see the tables under jackrabbit.
The Jackrabbit tables may not appear until you start Pentaho for the first time.
Log in as pentaho_user.
Verify that you can see the tables under quartz.
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.
If you use a different port or password, update the examples to match your environment.
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.
Open the
pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.propertiesfile in any text editor.Locate the #_replace_jobstore_properties section and set the org.quartz.jobStore.driverDelegateClass as shown:
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.
Open the
hibernate-settings.xmlfile in a text editor. Find the tags and changepostgresql.hibernate.cfg.xmltooracle10g.hibernate.cfg.xmlas shown.From:
To:
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.
Locate the
pentaho-solutions/system/dialects/oracle10g/audit_sql.xmlfile.Copy it into the
pentaho-solutions/systemdirectory.
Step 4: Modify Jackrabbit repository information for Oracle
Edit the following code to change the default Jackrabbit repository to Oracle.
Navigate to the
pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbitand open therepository.xmlfile with any text editor.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.
Item
Code Section
Repository
DataStore
Workspaces
PersistenceManager (1st part)
Versioning
PersistenceManager (2nd part)
DatabaseJournal
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.
Download a JDBC Driver JAR from your database vendor or a third-party driver developer.
The JDBC drivers reference has a list of supported drivers.
Copy the JDBC driver JAR you downloaded to the
pentaho/server/pentaho-server/tomcat/libfolder.Copy the
hsqldb-2.3.2.jarfile topentaho-server/tomcat/libif 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.
Consult your database documentation to determine the JDBC class name and the connection string for your Pentaho Repository database.
Navigate to the
server/pentaho-server/tomcat/webapps/pentaho/META-INFdirectory and open thecontext.xmlfile with any text editor.Add the following code to the file if it does not already exist. Replace
XEin the URL setting with your schema name.Modify the username, password, driver class information, IP address (or domain name), and port numbers to match your environment.
Comment out any resource references that refer to other databases.
Verify that the
validationQueryvariable for your database is set tovalidationQuery="select 1 from dual".Save the
context.xmlfile, then close it.
Start Your Server
Now that you have completed the initial Pentaho Archive installation steps, you are ready to start the Pentaho Server.
Last updated
Was this helpful?

