By default, the Pentaho distribution comes with the Hibernate-based security data access object (DAO) enabled. If you already have existing security tables in a relational database, you might want to consider the JDBC back-end for its simplicity and flexibility. This page shows you how to switch to the "JDBC" DAO. The instructions below describe a sample security database using HSQLDB.
Note: Changing to the JDBC Security DAO means that you will no longer be able to use the user/role administration functionality found in the Pentaho Admin Console.
- Edit pentaho-spring-beans.xml
Change the Spring XML files to use the JDBC DAOs instead of the Hibernate ones. Open
pentaho-solutions/system/pentaho-spring-beans.xmland look for the following section:
- Create the security tables
Copy the below SQL into a file called
The sample Spring XML files (i.e.
applicationContext-pentaho-security-jdbc.xml) assume a HSQLDB database and the tables below. If you already have security tables setup, or you wish to alter the sample, you'll need to adjust your SQL queries in the aforementioned Spring XML files.
- Start the database
The security database will need to be running before the first user logs in.
- The default JDBC configuration should work with the above database and tables. If you want to change the database host or anything else about the configuration, see Security Data Access Objects.
- Start the application server
Now that the database is running and the security tables have been created, start the application server.
- Stop the database
When you shutdown your application server, you'll want to shutdown the security database as well. The command to do that is below.