Version resource structure in the server database

Information about versions, folders, nodes, the security system, the completed table, and server runtime performance are all stored in the default database Derby. Also, since JReport Server provides multiple database support, you can configure your own database to store server data. For production systems it is recommended to use the same DBMS as your database application so the server data will be backed up with the rest of the application.

This section discusses how view resources were stored in the server database - Derby.

To open the Derby database, use Apache toolkit ij. ij is Derby's interactive JDBC scripting tool. It is a simple utility for running scripts or interactive queries against a Derby database. ij is a Java application that you start from a command window such as an MS-DOS Command Window or the Unix shell. ij provides several non-SQL commands for ease in accessing a variety of JDBC features for testing.

To open the defaultRealm.* files:

  1. Start ij.bat in <server_install_root>\derby\bin.
  2. Connect to database. To connect to a Derby database, you need to perform a valid database connection URL. ij automatically loads the appropriate driver based on the syntax of the URL. The following example shows how to connect defaultRealm by using the Connect command and the client driver:

    D:>java org.apache.derby.tools.ij
    ij version 10.5
    ij> connect 'jdbc:derby://localhost:8886/defaultRealm';
    ij>

  3. After connected to the database successfully, ij allows the execution of Derby SQL statements interactively or via scripts.

    Note: All statements must be terminated with a semicolon.

    Example 1: Finding result version information from the database

    Execute the command SELECT * FROM RESULTVERSION_2 WHERE CREATOR='admin'; to retrieve result versions which were created by the user 'admin'.

    Example 2: Finding catalog version information from the database

    Execute the command SELECT * FROM CATALOGVERSION_3; to fetch all catalog versions.

  4. For more information about Derby and ij, please visit Apache website http://db.apache.org/derby/.

Note: Don't delete, update or insert data into the database. It is recommended that all modifications to the database be done from JReport Server instead of in the ij. Otherwise, it may result in JReport Server crashing if invalid data is found.