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;This configuration property should be set before the database creation. Once the database has been initialized don't modify it because can damage your installation.
If your OpenKM installation has been already configured with another database you can't switch to another database simply changing this property.
Edit the file $TOMCAT_HOME/OpenKM.cfg
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
hibernate.hbm2ddl=createEdit the file $TOMCAT_HOME/conf/server.xml and enable the resource named jdbc/OpenKMDS
<Resource name="jdbc/OpenKMDS" auth="Container" type="javax.sql.DataSource"maxActive="100" maxIdle="30" maxWait="10000" validationQuery="select 1 from dual" username="OPENKM" password="*secret*" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:XE"/>Configure the attributes values named:
Can be only one resource namedjdbc/OpenKMDS.
Sample using service name instead of SID:
The main difference between SID connection is the ":" is replaced by "/".
<Resource name="jdbc/OpenKMDS" auth="Container" type="javax.sql.DataSource"maxActive="100" maxIdle="30" maxWait="10000" validationQuery="select 1 from dual" username="OPENKM" password="*secret*" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521/ServiceName"/>Edity the file $TOMCAT_HOME/OpenKM.xml
<security:authentication-manager alias="authenticationManager"> <security:authentication-provider> <security:password-encoder hash="md5"/> <security:jdbc-user-service data-source-ref="dataSource" users-by-username-query="select usr_id, usr_password, 1 from OKM_USER where usr_id=? and usr_active='T'" authorities-by-username-query="select ur_user, ur_role from OKM_USER_ROLE where ur_user=?"/> </security:authentication-provider></security:authentication-manager>Go to $TOMCAT_HOME/lib and check for JDBCojdbc6-11.2.0.3.jar Driver.
If it is not present, download Oracle JDBC driver from Oracle JDBC Driver page and move it.
The driver numeration version could be distinct due some version upgrade.
As a process into OpenKM startup, the application will create automatically and empty database structure.
Once the tables are created, OpenKM will automatically change thehibernate.hbm2ddl property fromcreate tonone.
© OpenKM kcenter v.1.0.0 (build: d51a7b0). All Rights Reserved.Documentation license![]()
![]()
![]()