[KB7813] Enable encrypted connection between ESET PROTECT Server and MS SQL database

Issue

  • You are running ESET PROTECT Server and MS SQL database on different computers
  • Resolve "SQL Server Error: 18" when connecting the database to ESET PROTECT On-Prem

Solution

Related solution: Linux users

TLS 1.2 enabled

Before you proceed, verify that TLS 1.2 is enabled on a supported MS SQL Server.

  1. Download and install Microsoft ODBC Driver for SQL Server version 17 and later.

  2. Press the Windows key + R, type services.msc, and click OK.

  3. Right-click the ESET PROTECT Server service and select Stop from the context menu.

  4. Navigate to the following directory:

    C:\ProgramData\ESET\RemoteAdministrator\Server\EraServerApplicationData\Configuration\
  5. Edit the StartupConfiguration.ini file:

    Create a backup

    Create a backup of the StartupConfiguration.ini file before you edit it.

    Change the variables in the StartupConfiguration.ini file based on your environment:

    DatabaseType=MSSQLOdbc
    DatabaseConnectionString=Driver={ODBC};Server=SERVER;Uid=era_user;Pwd={PASSWORD};CharSet=utf8;Database=era_db;
    • ODBC variable: Press the Windows key + Q, type ODBC, and click ODBC Data Sources. In the ODBC Data Source Administrator window, click Drivers and change the ODBC variable in the file to the highlighted text (in this example, ODBC Driver 17 for SQL Server)

    • SERVER variable: IP address and port of the computer where the database is installed

    • PASSWORD variable: password to the era_db database

    • Add the following code to the end of the file:

      Encrypt=yes;TrustServerCertificate=yes;

    Below is an example of the StartupConfiguration.ini file with example values:

    DatabaseType=MSSQLOdbc
    DatabaseConnectionString=Driver={ODBC Driver 17 for SQL Server};Server=10.10.10.10,1433;Uid=era_user;Pwd={SecretPassword};CharSet=utf8;Database=era_db;Encrypt=yes;TrustServerCertificate=yes;
  6. Save the StartupConfiguration.ini file.

  7. Press the Windows key + R, type services.msc, and click OK.

  8. Right-click the ESET PROTECT Server service and select Start from the context menu.

  9. If you can log in to the ESET PROTECT Web Console, the encrypted connection to the database works properly.

    If you are not able to log in to the ESET PROTECT Web Console, restore the StartupConfiguration.ini file from backup and contact ESET Technical Support.