Updating the Database Connection

When there is a change in the database or a migration of the database from one server to another, it is essential to update the database connection details.

The placeholder AL-HOME indicates the  Agiloft installation directory. Typically, this is located at C:\Agiloft on Windows and /usr/local/Agiloft on Linux.

Updating the Database Connection Details

  1. If the password has been changed, first determine whether the password is encrypted. To do so, check the db.password.encrypted property in the file located at AL-HOME/resources/java/build/local.properties.
    • If the property is set to Yes, the password is encrypted, and you must encrypt the new password using this command in the command prompt: AL-HOME/Agiloft/jre/bin/java -jar AL-HOME//Agiloft/resources/java/lib/encrdecr.jar -e <your-password>
    • If the property is set to No, you can use the password as it is.
  2. Next, modify the configuration file. On Windows, this is located at C:\EnterpriseWizardConfig.xml, and on Linux, it is located at /etc/EnterpriseWizardConfig.xml.
  3. In the file, review each of the following tags and update them if they have changed:
    • databaseAdminLogin and databaseAdminPassword: the database user name and the corresponding encrypted password
    • databaseEwLogin and databaseEwPassword: the Agiloft's database user name and the corresponding encrypted password
    • databaseReaderLogin and databaseReaderPassword: a read-only user for the Agiloft database, and the corresponding encrypted password
    • databaseName: the name of the database
    • databaseAddress: the host name or IP address of the database
    • databasePort: the port number used for the database connection
  4. Save your changes to the file.
  5. Next, modify the file at AL-HOME/resources/java/build/local.properties.
  6. Update the following properties:
    • db.port
    • db.server
    • db.host
    • db.name
    • db.password
    • db.ro_password
    • db.login=ewuser
    • db.ro_login=ewreader
  7. Now, stop Agiloft using this command in the command prompt: Execute AL-HOME/bin/ew-control -a stop
  8. Next, use this command: AL-HOME\bin\ant -v -f AL-HOME\resources\java\build\build.xml -l <ALHOME>\logs\M_installer_jboss-config.log installer:jboss-config
  9. Now, start Agiloft using this command: Execute AL-HOME/bin/ew-control -a start.

If you encounter problems when restarting the application, reach out to Support and include these log files to aid investigation:

  • AL-HOME\logs\M_installer_jboss-config.log
  • AL-HOME\wildfly\standalone\configuration\agiloft.xml
  • AL-HOME\wildfly\standalone\configuration\*.cs
  • AL-HOME\wildfly\standalone\log\server.log