Mondrian with Oracle connection

Load the data into Oracle database

The easiest way to load the test data into an Oracle database is to use the MondrianFoodMartLoader application provided with Pentaho. MondrianFoodMartLoader will automatically create necessary database objects and will load the FoodMart data.
Below the script used to load the data to Oracle which was used during the creation of that tutorial:

java -cp "D:\mondrian\lib\mondrian.jar;
      mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes 
Script execution options which are worth looking at:
  • The java libraries required to run the application are in the D:\mondrian\lib\ folder
  • The -jdbcDrivers parameter indicates which java connection drivers should be used to connect to the database. oracle.jdbc.driver.OracleDriver is a JDBC connector for Oracle and jdbc.odbc.JdbcOdbcDriver is an ODBC connector - which can be used for example to access a MSAccess database
  • -inputJdbcURL="jdbc:odbc:MondrianFoodMart" indicates an OBDC datasource for the source data. ODBC connection nameis MondrianFoodMart in that case
  • -outputJdbcURL="jdbc:oracle:thin:foodmart/foodmart@" points to the target Oracle database. In the example we use a foodmart user (password: foodmart), the database is installed locally (, the listener is set up on port 1521 and the Oracle database SID is dwdev.

    Apache Tomcat configuration

  • file - (it's in the TOMCAT/webapps/mondrian/WEB-INF folder). Oracle connection parameters need to be added:
  • web.xml - modify the value of a param-value in the connectString section and a MDXQueryServlet in the same way as above:
  • Edit the jsp files and change connection parameters accordingly (jdbcDriver and jdbcUrl). The files are in the TOMCAT/webapps/mondrian/WEB-INF/queries folder.

    The Oracle database is set up correctly now and Mondrian is ready to access the data from oracle.