Difference between revisions of "SQL Server - OpenKM 6.2"

From OpenKM Documentation
Jump to: navigation, search
m (Troubleshooting, error you can not connect to MS SQL Server)
m (Troubleshooting, error you can not connect to MS SQL Server)
Line 63: Line 63:
Read more at [http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx How to enable remote connections in SQL Server 2008?].
[[Category: Installation Guide]]
[[Category: Installation Guide]]

Revision as of 19:21, 6 March 2014

Download SQL Server JDBC driver from Miscrosof SQL Server Driver Page and move it to $TOMCAT_HOME/lib

Nota clasica.png Other JDBC driver for MS SQLServer we've tested is jdts.

Nota clasica.png OpenKM 6.2 has been verified to run with SQL Server 2005 using the JDBC driver sqljdbc4.jar under tomcat-7.0.27

In this OpenKM release you can create the databases automatically configuring the hibernate.dialect and hibernate.hbm2ddl properties in OpenKM.cfg.


More info about this at:

Database creation

Starting with OpenKM 6.0, only one databases is needed:


Start SQL Server Management Studio Express and create the database called okmdb.


Select your appropiate database collate.


Tomcat datasources

Edit file $TOMCAT_HOME/conf/server.xml

<Resource name="jdbc/OpenKMDS" auth="Container" type="javax.sql.DataSource"
          maxActive="100" maxIdle="30" maxWait="10000" validationQuery="select 1"
          username="sa" password="***" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"

Login configuration

Edit file $TOMCAT_HOME/OpenKM.xml

<security:authentication-manager alias="authenticationManager">
    <security:password-encoder hash="md5"/>
        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=?"/>

Troubleshooting, error you can not connect to MS SQL Server

Ensure you've got TCP protocol enabled ( by default is disabled )


Read more at How to enable remote connections in SQL Server 2008?.