Issue
- Install Microsoft SQL Server
- Configure TCP/IP communication for Microsoft SQL Server
- Create a custom Microsoft SQL Server user account with Microsoft SQL Server Management Studio
- Microsoft SQL Server data storage recommendations
- Move the Microsoft SQL Server database to a dedicated volume (partition)
Solution
Install Microsoft SQL Server
-
Download the Microsoft SQL Server installation file and run the file.
-
On the Select an installation type screen, click Custom.
-
Verify or update the installation directory and click Install.
-
When the installation package is downloaded, the SQL Installation Center appears. In the left-side menu, click Installation.
-
Click New SQL Server standalone installation or add features to an existing installation.
-
On the Edition screen, select the edition you want to use and click Next.
-
On the License Terms screen, accept the license terms and click Next.
-
On the Microsoft Update screen, select the check box next to Use Microsoft Update to check for updates.
-
On the Install Rules screen, click Next.
-
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.
-
On the Instance Configuration screen, verify the details and click Next.
-
On the Server Configuration screen, change the Startup Type for SQL Server Agent to Automatic and click Next.
-
On the Database Engine Configuration screen, do the following:
-
Select Mixed Mode.
-
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.
-
Click Add Current User.
-
Click Next.
-
-
Click Install.
-
After the installation is completed, click Close.
Configure TCP/IP communication for Microsoft SQL Server
-
Open Microsoft SQL Server Configuration Manager.
-
In the left-side menu, click SQL Server Network Configuration.
-
In the right-side menu, double-click Protocols for {instance_name}.
-
Verify that the TCP/IP protocol is enabled.
-
In the left-side menu, click SQL Server Services.
-
In the right-side menu, right-click the SQL Server ({instance_name}) service. From the context menu, select Restart.
-
In the right-side menu, right-click the SQL Server Agent ({instance_name}) service. From the context menu, select Restart.
-
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
-
Download Microsoft SQL Server Management Studio and install it on the Microsoft SQL Server machine.
-
Open the Microsoft SQL Server Management Studio app.
-
In the Connect to Server window, do the following:
-
In the Server type drop-down menu, select Database Engine.
-
In the Server name drop-down menu, select the server name.
-
In the Authentication drop-down, select Windows Authentication.
-
Click Connect.
-
-
In the left-side menu, right-click the Security folder. From the context menu, click New → Login.
-
In the Login name field, type the user account name. Select SQL Server Authentication. Type and confirm the password.
-
Deselect Enforce password expiration.
-
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.
-
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.
-
In the left-side menu, click Server Roles. From the Server roles list, select dbcreator and verify that public is selected.
-
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)
-
Ensure that a dedicated volume (partition) is available on the machine hosting the SQL Server, for example,
E:\. -
Create an empty data folder on the dedicated volume (partition), for example,
E:\DATA. -
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'); -
Stop the SQL Server service. To stop the service, run Command Prompt as Administrator and execute the following command:
net stop mssqlserverTo check whether the MySQL service is running, run:
sc query mssqlserverFor a named instance, replace
mssqlserverwithmssql${instance_name}—for example,mssql$instance2. -
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 atC:\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. -
Give your SQL Server instance permission to access the data folder on the dedicated partition (
E:\DATAin this example):-
Get the account name of your SQL Server instance:
-
Open Microsoft SQL Server Configuration Manager.
-
In the left-side menu, click SQL Server Services.
-
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.
-
-
Make the data folder on the dedicated volume (partition) accessible by the SQL Server instance:
-
Right-click the data folder and select Properties.
-
In the Data Properties window, open the Security tab.
-
Click Edit → Add.
-
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.
-
With the instance account name selected under Group or user names, select the checkbox under Allow for Full control and click OK → OK.
-
-
-
Update the database startup parameters:
-
Open Microsoft SQL Server Configuration Manager.
-
In the left-side menu, click SQL Server Services.
-
In the right-side menu, right-click SQL Server ({instance_name}) and click Properties → Startup Parameters.
-
Update the parameters to correspond with the location of the data folder on the dedicated volume (partition), that is, with
E:\DATAin this example. -
Click Apply.
-
-
Start the SQL Server service. To start the service, run Command Prompt as Administrator and execute the following command:
net start mssqlserverTo check whether the MySQL service is running, run:
sc query mssqlserverFor a named instance replace
mssqlserverwithmssql${instance_name}—for example,mssql$instance2.