Skip to main content
jie
Staff
Staff
August 3, 2025

Troubleshooting Tip: How to check local database connection in EMS

  • August 3, 2025
  • 0 replies
  • 449 views
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:

 

aaa.PNG

 

If Windows authentication is being used, use the following syntax:

 

sqlcmd -S .\FCEMS 

 

aaa.PNG

 

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.


bbb.PNG

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!