This chapter explains how to use Microsoft SQL Server as the ManualWorks database.
SQL Server 2008 and later are supported. If you use SQL Server, back up your data with the database's own backup features.
ManualWorks stores strings that need Unicode and long text in NVARCHAR columns, and other strings in VARCHAR columns. The character encoding and the comparison and sorting rules of VARCHAR columns follow the database collation, so when you create the database, specify a collation for your language (for example, SQL_Latin1_General_CP1_CI_AS for English or Korean_Wansung_CI_AS for Korean).
Adding the SQL Server JDBC Driver
3RABBITZ_HOME refers to the directory where ManualWorks is installed.
Add the JDBC driver for your SQL Server version to the 3RABBITZ_HOME/web/WEB-INF/lib directory.
Download the SQL Server JDBC driver from the Microsoft website. Use mssql-jdbc-VERSION.jre8.jar for Java 8, and mssql-jdbc-VERSION.jre11.jar for Java 11 or later.
Changing the Configuration File
Configure ManualWorks to use SQL Server as follows.
Open the
3RABBITZ_HOME/tomcat/conf/server.xmlfile.
<Context docBase="${3rabbitz.home}/web" path=""
reloadable="false" backgroundProcessorDelay="3">
<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />
<!-- H2 -->
<Resource name="jdbc/Base" auth="Container" type="javax.sql.DataSource"
driverClassName="org.h2.Driver" url="jdbc:h2:h2/database;"
username="database" password="database"
maxTotal="100" maxIdle="30" maxWaitMillis="10000"/>
<!-- for MS SQL -->
<!--
<Resource name="jdbc/Base" auth="Container" type="javax.sql.DataSource"
maxTotal="100" maxIdle="30" maxWaitMillis="10000" username="username" password="password"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;encrypt=false;databaseName=rabbitz" />
-->
</Context>Comment out the H2 settings.
Uncomment the MS SQL settings.
Change
username, password, url, and other values.Restart ManualWorks.
Recent SQL Server JDBC drivers (version 10.2 and later) set the encrypt property to true by default. If the server does not have a trusted certificate, the connection fails with a TLS error, so add encrypt=false to the url as in the example. To use an encrypted connection, keep encrypt=true and configure a server certificate.
ManualWorks creates its tables automatically during installation and software updates. The SQL Server account set in username must have privileges to create tables, alter columns, and create and drop indexes.
The server.xml file contains the database account password in plain text. Restrict the file permissions so that only the account that runs ManualWorks can read it. To encrypt the connection information, see Encrypting Database Connection Information.