Last modified by Thomas Mortagne on 2023/10/10

From version 4.1
edited by Helmut Nagy
on 2008/04/04
Change comment: There is no comment for this version
To version 6.1
edited by Jean-Vincent Drean
on 2008/09/05
Change comment: The file xwiki.mssql.hbm.xml is shipped with XWiki

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.hel
1 +XWiki.jvdrean
Content
... ... @@ -1,6 +1,6 @@
1 1  1 Microsoft SQL Server Installation
2 2  
3 -#info("This has been tested only on MSSQL 2000. MSSQL 2005 will probably not work due to the depreciation of the text types.")
3 +#info("This has been 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 4  
5 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 6  
... ... @@ -24,23 +24,25 @@
24 24  
25 25  1.1 When using a downloaded .war
26 26  
27 -* Save the file {attach:xwiki.mssql.hbm.sql|xwiki.mssql.hbm.xml} 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.
28 -
29 29  1.1 XWiki configuration
30 30  
31 31  * 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):
32 32  
33 33  {code:none}
34 -<property name="connection.url">jdbc:jtds:sqlserver://\<server-url\>:1433/XWiki;tds=8.0;lastupdatecount=true</property>
32 +<property name="connection.url">jdbc:jtds:sqlserver://<server-url>:1433/XWiki;tds=8.0;lastupdatecount=true</property>
35 35   <property name="connection.username">xwiki</property>
36 36   <property name="connection.password">xwiki</property>
37 - <property name="connection.driver_class ">net.sourceforge.jtds.jdbc.Driver</property>
35 + <property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
38 38   <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
37 + <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
38 + <property name="connection.pool_size">2</property>
39 + <property name="statement_cache.size">2</property>
39 39   <mapping resource="xwiki.mssql.hbm.xml"/>
40 40   <mapping resource="feeds.hbm.xml"/>
41 41  
42 42  {code}
43 43  
45 +
44 44  1.1 Fix search function
45 45  
46 46  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.

Get Connected