[KB8594] Install Microsoft SQL Server for ESET Inspect server

Issue

Solution

Install Microsoft SQL Server

Microsoft SQL version

We recommend using the Microsoft Server Enterprise/Standard edition, which requires a license. Microsoft SQL Server Express is not supported by ESET Inspect On-Prem.

  1. Download the Microsoft SQL Server installation file and run the file.

  2. On the Select an installation type screen, click Custom.

  3. Verify or update the installation directory and click Install.

  4. When the installation package is downloaded, the SQL Installation Center appears. In the left-side menu, click Installation.

  5. Click New SQL Server standalone installation or add features to an existing installation.

  6. On the Edition screen, select the edition you want to use and click Next.

  7. On the License Terms screen, accept the license terms and click Next.

  8. On the Microsoft Update screen, select the check box next to Use Microsoft Update to check for updates.

  9. On the Install Rules screen, click Next.

  10. On the Feature Selection screen, select the check box next to Database Engine Services and SQL Client connectivity SDK (not applicable for Microsoft SQL Server 2022). Click Next.

  11. On the Instance Configuration screen, verify the details and click Next.

  12. On the Server Configuration screen, change the Startup Type for SQL Server Agent to Automatic and click Next.

  13. On the Database Engine Configuration screen, do the following:

    1. Select Mixed Mode.

    2. Type and confirm the password for the default SQL Server system administrator (sa) user account. You can use this user account during the ESET Inspect Server installation process; alternatively, you can create a custom Microsoft SQL Server user account with sufficient privileges.

    3. Click Add Current User.

    4. Click Next.

  14. Click Install.

  15. After the installation is completed, click Close.


Configure TCP/IP communication for Microsoft SQL Server

  1. Open Microsoft SQL Server Configuration Manager.

  2. In the left-side menu, click SQL Server Network Configuration.

  3. In the right-side menu, double-click Protocols for {instance_name}.

  4. Verify that the TCP/IP protocol is enabled.

  5. In the left-side menu, click SQL Server Services.

  6. In the right-side menu, right-click the SQL Server ({instance_name}) service. From the context menu, select Restart.

  7. In the right-side menu, right-click the SQL Server Agent ({instance_name}) service. From the context menu, select Restart.

  8. In Windows Services, verify that the SQL Server service is running; otherwise, the ESET Inspect Server will not work.


Create a custom Microsoft SQL Server user account with Microsoft SQL Server Management Studio

ESET Inspect On-Prem versions

Required user privileges have changed in ESET Inspect On-Prem version 1.8 and later. Users upgrading to version 1.8 or later must set user rights before upgrading the ESET Inspect Server.

  1. Download Microsoft SQL Server Management Studio and install it on the Microsoft SQL Server machine.

  2. Open the Microsoft SQL Server Management Studio app.

  3. In the Connect to Server window, do the following:

    1. In the Server type drop-down menu, select Database Engine.

    2. In the Server name drop-down menu, select the server name.

    3. In the Authentication drop-down, select Windows Authentication.

    4. Click Connect.

  4. In the left-side menu, right-click the Security folder. From the context menu, click New Login.

  5. In the Login name field, type the user account name. Select SQL Server Authentication. Type and confirm the password.

  6. Deselect Enforce password expiration.

  7. In the left-side menu, click User Mapping. From the list of users mapped to this login, select a master login. In the Database role membership list, verify that public is selected.

  8. Click Securables. Click Search, select The server and click OK. Scroll down the Permission for list and for View Server State, select the check box for Grant.

  9. In the left-side menu, click Server Roles. From the Server roles list, select dbcreator and verify that public is selected.

  10. Click OK.


Microsoft SQL Server data storage recommendations

The Microsoft SQL database is a crucial component of ESET Inspect Server and can occupy a significant amount of disk space. To ensure operating system stability and maintain performance, we recommend that you move the SQL Server data and temporary folders to a dedicated volume (partition) or a separate server.

ESET Inspect On-Prem monitors disk space in the following locations:

  • SQL Server data folder—where Microsoft SQL Server stores the ESET Inspect Database (default location: C:\Program Files\Microsoft SQL Server\{instance_name}\MSSQL\DATA)
  • SQL Server temporary folder—where Microsoft SQL Server stores temporary tables and internal objects (default location: C:\Program Files\Microsoft SQL Server\{instance_name}\MSSQL\DATA\tempdb)
  • ESET Inspect Server data folder—typically located at C:\ProgramData\ESET\Inspect Server\Server

If the SQL Server database runs on the same machine as ESET Inspect Server, ESET Inspect On-Prem stops accepting new events when:

  • Less than 3% of free space remains on the disk with the SQL Server data folder
  • Less than 3% of free space remains on the disk with the  SQL Server temporary folder
  • Less than 5% of free space remains on the disk with the ESET Inspect Server data folder

If the ESET Inspect Server data folder and the SQL Server temporary folder share the same disk, ESET Inspect On-Prem stops accepting new events when free space on the disk drops below 10%.

When the SQL Server database is hosted on the same machine as ESET Inspect On-Prem, ensure at least 10% free space on the disk containing the SQL Server temporary folder for the purge process to function correctly. Any purge-related issues are indicated by red markers in the Events processed and stored per computer chart on the Events Load tab of the Dashboard in ESET Inspect On-Prem.


Move the Microsoft SQL Server database to a dedicated volume (partition)

  1. Ensure that a dedicated volume (partition) is available on the machine hosting the SQL Server, for example, E:\.

  2. Create an empty data folder on the dedicated volume (partition), for example, E:\DATA.

  3. Open Microsoft SQL Server Configuration Manager and connect to it. Click New Query and execute the commands below. To execute them, click Execute.

    ALTER DATABASE model MODIFY FILE (NAME = modeldev, FILENAME = 'E:\DATA\model.mdf'); ALTER DATABASE model MODIFY FILE (NAME = modellog, FILENAME = 'E:\DATA\modellog.ldf'); ALTER DATABASE msdb MODIFY FILE (NAME = MSDBData, FILENAME = 'E:\DATA\MSDBData.mdf'); ALTER DATABASE msdb MODIFY FILE (NAME = MSDBLog, FILENAME = 'E:\DATA\MSDBLog.ldf'); ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = 'E:\DATA\tempdb.mdf'); ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = 'E:\DATA\templog.ldf');
  4. Stop the SQL Server service. To stop the service, run Command Prompt as Administrator and execute the following command:

    net stop mssqlserver

    To check whether the MySQL service is running, run:

    sc query mssqlserver

    For a named instance, replace mssqlserver with mssql${instance_name}—for example, mssql$instance2.

  5. Move the contents of the SQL data folder to the data folder created on the dedicated volume (partition), for example, to E:\DATA. The SQL data folder is typically located at C:\Program Files\Microsoft SQL Server\{instance_name}\MSSQL\DATA. To verify the data folder location, open Microsoft SQL Server Management Studio, in Object Explorer, right-click the server name, select Properties, open Database Settings, and check the Data field under Database default locations.

  6. Give your SQL Server instance permission to access the data folder on the dedicated partition (E:\DATA in this example):

    1. Get the account name of your SQL Server instance:

      1. Open Microsoft SQL Server Configuration Manager.

      2. In the left-side menu, click SQL Server Services.

      3. In the right-side menu, right-click SQL Server ({instance_name}), click Properties and copy the value of the Account Name field on the Log On tab.

    2. Make the data folder on the dedicated volume (partition) accessible by the SQL Server instance:

      1. Right-click the data folder and select Properties.

      2. In the Data Properties window, open the Security tab.

      3. Click EditAdd.

      4. In the Enter the object names to select field, paste the instance account name you copied and click Check Names. The name should be underlined, indicating it is recognized. Click OK.

      5. With the instance account name selected under Group or user names, select the checkbox under Allow for Full control and click OKOK.

  7. Update the database startup parameters:

    1. Open Microsoft SQL Server Configuration Manager.

    2. In the left-side menu, click SQL Server Services.

    3. In the right-side menu, right-click SQL Server ({instance_name}) and click PropertiesStartup Parameters.

    4. Update the parameters to correspond with the location of the data folder on the dedicated volume (partition), that is, with E:\DATA in this example.

    5. Click Apply.

  8. Start the SQL Server service. To start the service, run Command Prompt as Administrator and execute the following command:

    net start mssqlserver

    To check whether the MySQL service is running, run:

    sc query mssqlserver

    For a named instance replace mssqlserver with mssql${instance_name}—for example, mssql$instance2.