Using Oracle Server
This section describes how to use Oracle as the solution repository.
Workflow:
- Initialize Oracle Pentaho Repository Database
- Step 1: Change Default Passwords
- Step 2: Run SQL Scripts
- Configure Oracle Pentaho Repository Database
- Step 1: Set Up Quartz on Oracle
- Step 2: Set Hibernate Settings for Oracle
- Step 3: Replace Default Version of Audit Log File with Oracle Version
- Step 4: Modify Jackrabbit Repository Information for Oracle
- Perform Tomcat-Specific Connection Tasks
- Step 1: Download Driver and Apply to Pentaho Server
- Step 2: Modify JDBC Connection Information in the Tomcat XML File
- Start the Server
Components
- Jackrabbit: Contains the solution repository, examples, security data and content data from reports for which you use the Pentaho software to create.
- Quartz: Holds data related to scheduling reports and jobs.
- Hibernate: Holds data related to audit logging.
Initialize Oracle Pentaho Repository Database
To initialize Oracle so that it serves as the Pentaho Repository, you must run several SQL scripts to create Hibernate, Quartz and Jackrabbit (JCR).
Step 1: Change Default Passwords
For the production server, follow best practices to change the default passwords in the following SQL script files to secure the databases.
- Navigate to the <pentaho_directory>/pentaho-server/data/oracle folder.
- Use any text editor to modify the following
CREATE scripts as needed according to the existing setup for the user, password, database and other required information:
- create_jcr_ora.sql
- create_quartz_ora.sql
- create_repository_ora.sql
-
Save and close the files.
The scripts provided by Pentaho assume you are using the default TEMP tablespace. If you have modified the temporary tablespace of your database, update the scripts accordingly.
For example:
In create_jcr_ora.sql with the following lines, the highlighted word is the name of the tablespace to update:
create user jcr_user identified by "password" default tablespace pentaho_tablespace quota unlimited on pentaho_tablespace temporary tablespace mactmp quota 5M on system;
Step 2: Run SQL Scripts
Procedure:
- Open a command prompt window and run sqlplus on your database instance, for example, sqlplus user/pass@servicename
- Run the following scripts in the order listed below:
- @"<pentaho_directory>/pentaho-server/data/oracle/create_jcr_ora.sql"
- @"<pentaho_directory>/pentaho-server/data/oracle/create_quartz_ora.sql"
- @"<pentaho_directory>/pentaho-server/data/oracle/create_repository_ora.sql"
- Log in as the following database users to verify they are created:
- hibuser
- jcr_user
- quartz
Configure Oracle Pentaho Repository Database
After initializing the repository database, you must configure Quartz, Hibernate and Jackrabbit for an Oracle database. Make sure that you change the password and port number in these examples to match the ones in your configuration.
Step 1: Set Up Quartz on Oracle
- Open the pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties file in any text editor.
- Locate the
#_replace_jobstore_properties section and set
org.quartz.jobStore.driverDelegateClass as shown:
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
- Save the file and close the text editor.
Step 2: Set Hibernate Settings for Oracle
- Open the hibernate-settings.xml file in a text editor.
- Find the
<config-file> tags and change
postgresql.hibernate.cfg.xml to
oracle10g.hibernate.cfg.xml as shown.
From: <config-file>system/hibernate/postgresql.hibernate.cfg.xml</config-file>
To: <config-file>system/hibernate/oracle10g.hibernate.cfg.xml</config-file>
- Save and close the file.
Step 3: Replace Default Version of Audit Log File with Oracle Version
- Locate the pentaho-solutions/system/dialects/oracle10g/audit_sql.xml file.
- Copy it into the pentaho-solutions/system directory.
Step 4: Modify Jackrabbit Repository Information for Oracle
- Download PentahoServer-config.zip.
- Copy oracle_repository.xml from /config/jackrabbit/oracle.
- Place oracle_repository.xml into pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit.
- Backup and delete the repository.xml file in the same folder as the previous step.
- Rename oracle_repository.xml to repository.xml
Perform Tomcat-Specific Connection Tasks
After the repository has been configured, you must configure the web application servers to connect to the Pentaho repository. In this step, you make JDBC and JNDI connections to the Hibernate, Jackrabbit and Quartz components.
Step 1: Download Driver and Apply to Pentaho Server
To connect to a database, including the Pentaho repository database, you must download and copy a JDBC driver to the appropriate locations for the Pentaho server, as well as on the web application server.
- Download a JDBC Driver JAR from your database vendor or a third-party driver developer:
- Copy the JDBC driver JAR downloaded to the pentaho/server/pentaho-server/tomcat/lib folder.
Step 2: Modify JDBC Connection Information in the Tomcat XML File
- Download and extract PentahoServer-config.zip.
- Copy oracle_context.xml from /config/tomcat/oracle.
- Place the file in /pentaho-server/tomcat/webapps/pentaho/META-INF.
- Backup and delete context.xml on the same folder as the previous step.
- Rename oracle_context.xml to context.xml.
- Open the new context.xml in any text editor.
- Replace all the password="password" with the corresponding database user's password.
- Replace all the url="jdbc:oracle:thin:@localhost:1521/XE" value with the correct host port and service name/SID.
- Save the
context.xml file, then close it.
Warning:
After changing to another database type (for example, PostgreSQL to Oracle) make sure to clean up the following cache:
- \pentaho-solutions\system\jackrabbit\repository\*
- \pentaho-solutions\system\karaf\cache\*
Otherwise, it could result in unpredictable errors like "java.sql.SQLSyntaxErrorException: ORA-00906: missing left parenthesis" as it tries to use the older syntax for the new database type.
Start the Server
Now that you have completed the initial Pentaho archive installation steps, you are ready to start the Pentaho Server. Follow these steps:
- Navigate to the <pentaho_directory>/server/pentaho-server folder.
- Run the startup script start-pentaho.bat.
- From a workstation, open a web browser and enter
http://<hostname>:<port>/pentaho in the address bar.
Note: The default port is 8080.
- In the the Pentaho User Console (PUC), enter your username and password then click Login.