Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 XWiki uses by default a database to store its data. You will find on this page tips and tricks to administer and tune your database setup. For Installation please check the [[Installation guide>>Documentation.AdminGuide.InstallationWAR||anchor="HInstallandconfigureaRelationalDatabase"]] which contains information on how to setup XWiki for multiple databases.
6
7 = Main limitations =
8
9 == Short strings ==
10
11 {{version before="13.2"}}
12 All fields dedicated to page references, page title and in general short object properties strings are limlited to 255 characters
13 {{/version}}
14
15 {{version since="13.2"}}
16 The limit of those fiels has been increased to 768.
17 {{/version}}
18
19 = Indexes =
20
21 Even though we've configured XWiki to let Hibernate create indexes by default, there can be some limitations on some databases. For example on MySQL, indexes cannot be created automatically for string columns longer than 768 characters ([[MySQL has a limit of 768 utf8mb4 characters>>https://dev.mysql.com/doc/refman/8.0/en/innodb-limits.html]].
22
23 Instructions depending on the database you use:
24
25 * [[MySQL>>Documentation.AdminGuide.Installation.InstallationWAR.InstallationMySQL.WebHome||anchor="HIndexes"]]
26 * [[Oracle>>Documentation.AdminGuide.Installation.InstallationWAR.InstallationOracle.WebHome||anchor="HIndexes"]]
27
28 = Sanity Checks =
29
30 To verify the consistency of your XWiki database you can run the sanity check script. The script will select rows that are inconsistent with the logics of XWiki. If no rows are selected, it means the script itself can not detect any error.
31
32 * If you use **MySQL** as your database:
33 ** The following [[sanity check script>>attach:sanitycheck.sql]] has been tested for **MySQL 5.0** (also been reported to work with MS-SQL)
34 ** Another [[script>>attach:sanitycheckMySQL4.sql]] is a variant of the previous script for **MySQL 4.x** replacing some syntax with more ancient one (still reports errors in one command)
35 * If you use **postgresql** as your database:
36 ** Here is a [[modified version of the sanity check script>>attach:sanitycheck_postgresql.sql]], to be run in the "query" tool of pgAdmin. It is the same as the script for MySQL, except that the syntax for SQL comments is different.
37 ** pgAdmin is the GUI tool provided with postgresql to access the database. Run pgAdmin, select the ##xwiki## database, and choose the "Query" option in the "Tools" menu. Then just open the script and click on the play icon ("Execute query").
38
39 = Database browsing =
40
41 == DbVisualizer ==
42
43 [[DbVisualizer>>http://www.dbvis.com/download/]] natively supports these DBs:
44
45 * DB2 for Windows/Linux
46 * JavaDB/Derby
47 * MySQL
48 * PostgreSQL
49 * [[and more>>http://www.dbvis.com/features/tour/supported-databases/]]
50
51 Any DB using the corresponding JDBC driver:
52
53 * Example: HSQLDB by using the driver bundled with XWiki

Get Connected