
Documentation for Crowd 2.4. Documentation for other versions of Crowd is available too.
Follow the steps below to connect CrowdID to MS SQL Server.
Create a database user which CrowdID will connect as (e.g. crowduser).
In SQL Server, the database user (crowduser above) should not be the database owner, but should be in the db_owner role.
Download the SQL Server JDBC driver from JTDS (recommended, assumed below), or I-net software(commercial).
jtds-[version].jar) to the following directory:CROWD_INSTALL}/apache-tomcat/lib/.CROWD_INSTALL}/apache-tomcat/common/lib/.common/lib/.lib/.Edit the conf/Catalina/localhost/openidserver.xml file and customise the username, password, driverClassName and urlparameters for the Datasource.
<Context path="/openidserver" docBase="../../crowd-openidserver-webapp" debug="0"> <Resource name="jdbc/CrowdIDDS" auth="Container" type="javax.sql.DataSource" username="[enter db username here]" password="[enter db password here]" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433/crowdiddb" [ delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive params here ] /> <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/> </Context>
Edit the build.properties file (located in the root of the Crowd distribution, not Crowd EAR-WAR) and modify the hibernate.dialect to the following:
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
./build.sh or build.bat. This will configure CrowdID to use the MS SQL Server dialect.If you do not wish to edit this file and run the build script, you can edit the jdbc.properties file (which the above script modifies) directly. The jdbc.properties file is located here: crowd-openidserver-webapp\WEB-INF\classes\jdbc.properties. Modify the file to the following:
# - Crowd Configuration Options hibernate.connection.datasource=java\:comp/env/jdbc/CrowdIDDS hibernate.dialect=org.hibernate.dialect.SQLServerDialect hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory ...
You should now have an application server configured to connect to a database, and CrowdID configured to use the correct database. Now start up CrowdID and watch the logs for any errors.