Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.2 | 1 | 1 Microsoft SQL Server Installation |
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.") | ||
4 | |||
![]() |
2.2 | 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]") |
![]() |
1.5 | 6 | |
![]() |
1.2 | 7 | 1.1 Create the xwiki user and database |
![]() |
1.3 | 8 | |
![]() |
1.2 | 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 | |||
![]() |
1.3 | 13 | 1.1 Install the JDBC driver |
![]() |
1.2 | 14 | |
![]() |
3.1 | 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\\\~~)\\ |
![]() |
3.2 | 16 | |
17 | #info("The connection was successfully tested with version 1.2.1 of the driver and version 1.3.1 of XWiki. Some problems occurred when using drivers > 1.2.1 so it might be better to use the old one. ") | ||
18 | |||
![]() |
1.3 | 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 | |||
![]() |
1.2 | 21 | 1.1 When compiling from source |
22 | |||
![]() |
1.7 | 23 | * Add {attach:xwiki.mssql.hbm.sql|xwiki.mssql.hbm.xml} to ~~xwiki-core\\\src\\\main\\\resources\\\~~ and recompile everything. |
![]() |
1.5 | 24 | |
![]() |
1.7 | 25 | 1.1 When using a downloaded .war |
![]() |
1.5 | 26 | |
![]() |
1.7 | 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. |
![]() |
1.2 | 28 | |
29 | 1.1 XWiki configuration | ||
30 | |||
![]() |
1.5 | 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): |
![]() |
1.3 | 32 | |
![]() |
2.2 | 33 | {code:none} |
![]() |
5.1 | 34 | <property name="connection.url">jdbc:jtds:sqlserver://<server-url>:1433/XWiki;tds=8.0;lastupdatecount=true</property> |
![]() |
1.3 | 35 | <property name="connection.username">xwiki</property> |
36 | <property name="connection.password">xwiki</property> | ||
![]() |
5.2 | 37 | <property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property> |
![]() |
1.3 | 38 | <property name="dialect">org.hibernate.dialect.SQLServerDialect</property> |
![]() |
5.1 | 39 | <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property> |
40 | <property name="connection.pool_size">2</property> | ||
41 | <property name="statement_cache.size">2</property> | ||
![]() |
1.3 | 42 | <mapping resource="xwiki.mssql.hbm.xml"/> |
43 | <mapping resource="feeds.hbm.xml"/> | ||
![]() |
1.2 | 44 | |
45 | {code} | ||
46 | |||
![]() |
5.1 | 47 | |
![]() |
1.2 | 48 | 1.1 Fix search function |
49 | |||
![]() |
1.3 | 50 | 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-sensitive. |
![]() |
1.2 | 51 | |
![]() |
3.2 | 52 | Alternatively, you may want to use the [Lucene search>code:Applications.SearchApplication] instead of the default search. |