Enabling the Derby database

It is not mandatory to configure the Derby database during installation. If you later find that you need to generate reports and do not have access to a production database, you can enable the Derby database.

Procedure

Note: If you did not set the DERBY_DB_HOST environment variable during installation, you must manually start the Derby service (derbydb) to successfully connect to the database. The Derby database is not supported for production clusters.

  1. From the cluster management console, go to System & Services > EGO Services > Service Profiles.
  2. For the derbydb service, click Actions > Open Profile.
  3. In the sc:ServiceDefinition > sc:AllocationSpecification > sc:ResourceSpecification section, replace the ego:ResourceRequirement value with the name of the host on which you intend to run the Derby database. For example, if you intend to run the Derby database on hostM, replace the value as select('hostM').
  4. Click Save and confirm the changes.
  5. Click Actions > Start to start the derbydb service.
  6. Launch the database configuration tool.
    • In Linux® (X-Windows only), run dbconfig.sh.
    • In Windows, run dbconfig.
    1. In the User ID and Password fields, use app as both the user name and password for the Derby database.
    2. In the Cipher field, choose your cipher, for example, AES256.
    3. Verify that the correct JDBC driver is selected for the Derby database. It should be org.apache.derby.jdbc.ClientDriver
    4. Verify the database URL. It should resemble the following format:

      jdbc:derby://hostname:1527/app

      Note: If the default port is not used, ensure that the port number configured in derby_service.xml matches the port number configured in datasource.xml.
    5. Click Test to test the database connection using the specified host and port.
    6. Click OK to save configuration changes to datasource.xml and exit the utility.
  7. If the derbydb service is not in the DEFINED state, stop the service. In the command console, run:
    egosh service stop derbydb
  8. Restart EGO on the primary host to activate the changes to derby_service.xml:
    egosh ego restart primary_host_name
  9. Restart the plc and purger services to activate the changes to datasource.xml:
    egosh service stop plc purger
    egosh service start plc purger