Database Configuration
Database Configuration Guidelines
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: After creating the user, create a database owned by this user:
CREATE DATABASE <db_name> WITH OWNER = <user_name>;
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 the VMS was installed on the current PC, use http://localhost:2002/
- If the VMS was remotely installed on a server, use http://ip:2002/ where IP is the IP address of the remote server
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:
- Click the Test Connection button to check the database connection
- Verify the Connection Status has changed to Success, which indicates the connection is successful
- 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 Name | Description |
---|---|
Unable to establish the connection | The SQL connection could not be established. This error typically occurs if the host address is invalid. |
Invalid authorization data | Incorrect authorization credentials for the SQL user. This error indicates that while the host is valid, either the username or password is incorrect. |
Invalid catalog | The database name is invalid. This error occurs when the db_name is incorrect but the user_name, password, and host are all valid. |
Invalid schema | The 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 error | An unknown error occurred during the SQL connection attempt, which could not be resolved. |
Database initialization failed | This error is triggered when specific initialization procedures cannot be completed successfully. |
Settings saving failed | The error indicates a failure in saving configuration settings, preventing the completion of the settings update. |