Description | This article describes how to use the sqlcmd and psql commands to check EMS local database connection. |
Scope | FortiClient EMS 7.2 and 7.4. |
Solution |
In FortiClient EMS 7.2, the sqlcmd command can be used to check the EMS local database connection to confirm whether there is a DB connection issue.
Syntax:
sqlcmd -U "******" -P "******" -S tcp:<ip/FQDN>,1811 -t 5 -Q "use master"
1811 is the port number and it will depend on the customer's configuration. If the connection is healthy, it shows the output below:
If Windows authentication is being used, use the following syntax:
sqlcmd -S .\FCEMS
In FortiClient EMS 7.4, as it is Linux based, the psql command can be used.
Syntax:
psql -h localhost -U postgres -p 5432
5432 is the default port number and it can be changed to suit the customer's configuration.
If the connection is healthy, it shows the output below. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.