Skip to content

Configuring Oracle

create tablespace OPENKMDATA datafile '/u01/app/oracle/oradata/XE/openkmdata.dbf' size 100M;
create user OPENKM identified by *secret* default tablespace OPENKMDATA quota unlimited on OPENKMDATA;
grant all privileges to OPENKM;
grant create any context, create cluster, create dimension, create indextype, create job, create materialized view, create operator, create procedure, create sequence, create session, create synonym, create table, create trigger, create type, create view to OPENKM;

Edit the file $TOMCAT_HOME/openkm.properties

spring.jpa.properties.hibernate.dialect=com.openkm.db.dialect.Oracle10gDialect
spring.jpa.hibernate.ddl-auto=create-only

Edit the file $TOMCAT_HOME/openkm.properties and enable the resource named jdbc/OpenKMDS.

spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:XE
spring.datasource.username=OPENKM
spring.datasource.password=*secret*
spring.datasource.validationQuery=select 1 from dual

Sample using a service name instead of SID:

spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521/ServiceName
spring.datasource.username=OPENKM
spring.datasource.password=*secret*
spring.datasource.validationQuery=select 1 from dual

Another sample:

spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(HOST=localhost)(PROTOCOL=TCP)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))
spring.datasource.username=OPENKM
spring.datasource.password=*secret*
spring.datasource.validationQuery=select 1 from dual

Edit the file $TOMCAT_HOME/openkm.properties

authentication.openkm.database=true

During OpenKM startup, the application will automatically create an empty database structure.