Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
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.
7 = Indexes =
9 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 255 chars ([[MySQL has a limit of 255 characters>>]] - See also [[InnoDB limits>>]]).
11 Instructions depending on the database you use:
12 * [[MySQL>>Documentation.AdminGuide.Installation.InstallationWAR.InstallationMySQL.WebHome||anchor="HIndexes"]]
13 * [[Oracle>>Documentation.AdminGuide.Installation.InstallationWAR.InstallationOracle.WebHome||anchor="HIndexes"]]
15 = Sanity Checks =
17 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.
19 * If you use **MySQL** as your database:
20 ** The following [[sanity check script>>attach:sanitycheck.sql]] has been tested for **MySQL 5.0** (also been reported to work with MS-SQL)
21 ** 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)
22 * If you use **postgresql** as your database:
23 ** 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.
24 ** 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").
26 = Database browsing =
28 == DbVisualizer ==
30 [[DbVisualizer>>]] natively supports these DBs:
32 * DB2 for Windows/Linux
33 * JavaDB/Derby
34 * MySQL
35 * PostgreSQL
36 * [[and more>>]]
38 Any DB using the corresponding JDBC driver:
40 * Example: HSQLDB by using the driver bundled with XWiki

Get Connected