Database Administration

Last modified by Thomas Mortagne on 2021/03/22

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 which contains information on how to setup XWiki for multiple databases.

Main limitations

Short strings

<13.2 All fields dedicated to page references, page title and in general short object properties strings are limlited to 255 characters

13.2+ The limit of those fiels has been increased to 768.

Indexes

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.

Instructions depending on the database you use:

Sanity Checks

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.

  • If you use MySQL as your database:
    • The following sanity check script has been tested for MySQL 5.0 (also been reported to work with MS-SQL)
    • Another script is a variant of the previous script for MySQL 4.x replacing some syntax with more ancient one (still reports errors in one command)
  • If you use postgresql as your database:
    • Here is a modified version of the sanity check script, 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.
    • 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").

Database browsing

DbVisualizer

DbVisualizer natively supports these DBs:

  • DB2 for Windows/Linux
  • JavaDB/Derby
  • MySQL
  • PostgreSQL
  • and more

Any DB using the corresponding JDBC driver:

  • Example: HSQLDB by using the driver bundled with XWiki
Tags:
   

Get Connected