Wiki source code of MSSQL Installation

Version 7.2 by Helmut Nagy on 2008/12/17

Show last authors
1 1 Microsoft SQL Server Installation
2
3 #info("This has been tested on MSSQL 2000 and MSSQL 2005 (text types are only deprecated in MSSQL 2005, this tutorial won't work when they'll be dropped)")
4
5 #warning("Case-insensitive search does not work with this database; see below for more info. You may want to use the the [Lucene search>code:Applications.SearchApplication]")
6
7 1.1 Create the xwiki user and database
8
9 * Use the Enterprise Manager to create a database named 'XWiki' and a user named 'xwiki'.
10 * Set xwiki's password to 'xwiki'.
11 * Give database ownership of the database XWiki to the user xwiki.
12
13 1.1 Install the JDBC driver
14
15 * Download the [jtds jdbc driver>http://jtds.sourceforge.net/] 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\\\~~)\\
16
17 #info("The connection was successfully tested with version 1.2.1 of the driver and version 1.5 of XWiki. Some problems occurred when using drivers > 1.2.1 so it might be better to use the old one. ")
18
19 * Alternatively, you can use the [JDBC driver provided by Microsoft>http://www.microsoft.com/downloads/details.aspx?familyid=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en], however this has not been tested.
20
21 1.1 XWiki configuration
22
23 * 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):
24
25 {code:none}
26 <property name="connection.url">jdbc:jtds:sqlserver://<server-url>:1433/XWiki;tds=8.0;lastupdatecount=true</property>
27 <property name="connection.username">xwiki</property>
28 <property name="connection.password">xwiki</property>
29 <property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
30 <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
31 <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
32 <property name="connection.pool_size">2</property>
33 <property name="statement_cache.size">2</property>
34 <mapping resource="xwiki.mssql.hbm.xml"/>
35 <mapping resource="feeds.hbm.xml"/>
36
37 {code}
38
39
40 1.1 Fix search function
41
42 If you try to do a search, via [Main.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 [Main.WebSearch]. This is however not very practical, because it makes search case&#45;sensitive.
43
44 Alternatively, you may want to use the [Lucene search>code:Applications.SearchApplication] instead of the default search.

Get Connected