### Checking server data integrity

In abnormal circumstances, server data may not be saved correctly or completely in the databases. JReport Server allows you to check the integrity of server data.

The integrity check mainly examines two aspects of the realm database:

- Integrality and consistency among tables - checking records among the tables to see whether they are complete and consistent.
- Integrality and consistency between realm database and the external files - checking to see whether the records in the tables match the related external files.

If any inconsistent or incomplete server data is found, it will be removed from the realm database since it is unused. The same process also applies to files.

To check server data integrity, do one of the following:

- Launch JReport Server on the command line, using parameter `-cleanup`.

  `C:\JReport\Server\bin>JRServer -cleanup`

- Open the batch file used to start JReport Server, add`-Dcheck.realmtables=true` to the line that starts JReport Server:

  `"%JAVAHOME%\bin\java.exe" -Dcheck.realmtables=true "-Dinstall.root= <install_root>"` ...

Note: The integrity check checks only the realm database.