MSSQL Installation

Version 2.2 by Vincent Massol on 2007/12/10

Microsoft SQL Server Installation

This has been tested only on MSSQL 2000. MSSQL 2005 will probably not work due to the depreciation of the text types.

Case-insensitive search does not work with this database; see below for more info. You may want to use the the Lucene search

Create the xwiki user and database

  • Use the Enterprise Manager to create a database named 'XWiki' and a user named 'xwiki'.
  • Set xwiki's password to 'xwiki'.
  • Give database ownership of the database XWiki to the user xwiki.

Install the JDBC driver

  • Download the jtds jdbc driver and install the jar file into your servers lib directory (for JBoss this could be server
    default
    lib
    , for Tomcat this might be common
    lib
    )
  • Alternatively, you can use the JDBC driver provided by Microsoft, however this has not been tested.

When compiling from source

When using a downloaded .war

  • Save the file xwiki.mssql.hbm.sql as WEB-INF/classes/xwiki.mssql.hbm.xml (creating the classes directory if needed). This directory can be found inside the XWiki war, which is either a directory or a zip file.

XWiki configuration

  • Tell XWiki to use MSSQL. To do this, edit the WEB-INF/hibernate.cfg.xml file. Replace the matching properties with the following ones (or uncomment them if they are present):
<property name="connection.url">jdbc:jtds:sqlserver://bl01svdwh01.bns&#45;group.com:1433/XWiki;tds=8.0;lastupdatecount=true</property>
    <property name="connection.username">xwiki</property>
    <property name="connection.password">xwiki</property>
    <property name="connection.driver&#95;class ">net.sourceforge.jtds.jdbc.Driver</property>
    <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
    <mapping resource="xwiki.mssql.hbm.xml"/>
    <mapping resource="feeds.hbm.xml"/>

Fix search function

If you try to do a search, via WebSearch, you will get an error. This is because the UPPER() function doesn not work on TEXT or NTEXT as used by MSSQL 2000 for blobs. The only solution I have found is to remove all the calls to upper() in WebSearch. This is however not very practical, because it makes search case-sensitive.

Alternatively, you may want to use the Lucene search instead of the default search.

Tags:
   

Get Connected