FortiClient
FortiClient proactively defends against advanced attacks. Its tight integration with the Security Fabric enables policy-based automation to contain threats and control outbreaks. FortiClient is compatible with Fabric-Ready partners to further strengthen enterprises’ security posture.
jie
Staff
Staff
Article Id 403137
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

Contributors