Database Configuration

Follow these guidelines to configure and connect the database to the VMS after the installation.

Database Configuration Guidelines

Before proceeding with the setup, ensure that PostgreSQL version 9.5 or later is installed, as earlier versions are not supported for VMS integration.

To prepare the database for connection to the VMS, it's necessary to establish the required PostgreSQL environment by creating a new user, database, and schema specifically for VMS. Follow these steps to complete the setup:

Step 1: Create a new PostgreSQL user with password:

CREATE USER <user_name> WITH PASSWORD '<password>';

Step 2: Create a new database owned by this user with the recommended encoding and locale settings:

CREATE DATABASE <db_name> WITH OWNER = <user_name> ENCODING = 'UTF8' LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United States.1252' LOCALE_PROVIDER = 'libc';

Step 3: Switch to the newly created database and create a schema:

\c <db_name>
CREATE SCHEMA <schema_name> AUTHORIZATION <user_name>;

Database Connection Process

To start the DB connection process, access the server by opening the following URL:

  • If accessing from the same server where the Management Server is installed, navigate to http://localhost:2002/
  • If accessing from another server, use the server's IP address http://<server_ip>:2002/

The Database Configuration dialog allows setting the following parameters:

  • In the DB Type drop-down list, select the PostgreSQL DB
  • In the Host field, specify the IP address of the server where the PostgreSQL DB is preinstalled and configured
  • In the DB Name field, specify the name of the database intended for VMS
  • In the Schema Name field, provide the name of the schema created within the database
  • In the Login and Password fields, enter the user credentials of the database owner for accessing the database for VMS

The PostgreSQL DB default port is 5432. If it has been changed to any other, enter "host:port" in the Host field, where:

  • host is the PostgreSQL DB server IP address
  • port is a custom PostgreSQL DB port

Once all fields are correctly filled in:

  1. Click the Test Connection button to check the database connection
  2. Verify the Connection Status has changed to Success, which indicates the connection is successful
  3. Click the Save and Reload button to save the settings and restart the system

At this point, the database configuration and connection are successfully completed.

Common Errors

Here you will find detailed descriptions of various errors that may occur during the database configuration process:

Error NameDescription
Unable to establish the connectionThe SQL connection could not be established. This error typically occurs if the host address is invalid.
Invalid authorization dataIncorrect authorization credentials for the SQL user. This error indicates that while the host is valid, either the username or password is incorrect.
Invalid catalogThe database name is invalid. This error occurs when the db_name is incorrect but the user_name, password, and host are all valid.
Invalid schemaThe specified database schema is invalid. This error arises when the schema does not match a valid schema in the database, even though the db_name, user_name, password, and host are valid.
Unknown SQL connection errorAn unknown error occurred during the SQL connection attempt, which could not be resolved.
Database initialization failedThis error is triggered when specific initialization procedures cannot be completed successfully.
Settings saving failedThe error indicates a failure in saving configuration settings, preventing the completion of the settings update.

If you are connecting to the PostgreSQL server from a remote machine (i.e., not using a local IP address), ensure that remote access is allowed in the PostgreSQL configuration.

By default, the configuration file is located at:

C:\Program Files\PostgreSQL\15\data\pg_hba.conf

Add the following line to the file to allow remote connections using password authentication:

host   all   all   0.0.0.0/0   scram-sha-256
Replace 0.0.0.0/0 with a specific IP address or subnet to restrict access as needed.