- 6 minutes to read

Manually install or update Monitoring Agent database

On this page, you will learn how to manually install and update any of the Monitoring Databases.

The following [Monitoring Agents][], uses a Monitoring Database to improve performance and/or provide long term statistics:

Database installationsm and updates, should be executed with the account running the Monitoring Agent. If you are not performing the steps in this guide with that service account, you must at least have the DB_Creator, DiskAdmin and Security Admin right, or the sysadmin right on the SQL Server instance where to install or update the monitoring database.

Verified Topic
Software Requirements
Windows rights
Database rights
Firewall

Software Requirements

This functionality requires that the Microsoft Data-tier Applications SqlPackage.exe is installed on the server hosting the [Monitoring agent][Monitoring Agents]. Download it from either our download page, or directly from Microsoft.

Product
Windows Windows Server Windows version as determined by the Monitoring Agent
.NET Framework .NET Framework 4.x or later Different Monitoring Agents may have different requirements
SQL Package.exe Data-tier Applications No license required

What Windows rights does the installation and update process require?

The Monitoring Agent is running as a Windows Service and is responsible for updating existing databases (runs on each start). This means that the account running the Monitoring Agent Windows Service (may be different for different Monitoring Agents), must have local rights on the Windows Server, and be granted SQL Rights on the SQL instance with the Monitoring Database, see next section.

All [Monitoring Agents][] requires the privileges described in the 'Windows Service Account' page.

What SQL Rights does the installation and update process require?

The [Monitoring Agent][Monitoring Agents] tries to perform an update of the Monitoring Database, if any new versions exist upon service start. The identity for the Windows account running the Service is used for the update operation.

graph LR subgraph "SQL Server" roDatabase(fal:fa-database Monitoring database) end subgraph "Application Server" roMA(fal:fa-hdd Monitoring Agent) --- roDatabase end

Required SQL Server rights

On the SQL Server instance with the Monitoring Database, the account must have the following User Mapping (assign manually after installing the database)

  • db_owner - Rights to change the database in any way (for example the database is automatically updated with newer versions of the monitoring agent)

What Firewall settings are required by the installation and update process?

The Monitoring agents all require outbound ports to be opened. Since Nodinite is highly configurable, the actual ports in use may differ from what's being exampled here.

  • TCP Ports between Monitoring Agent Windows Service and SQL Server instance with Monitoring Database
Port Name Inbound Outbound TCP UDP Comment
53 DNS The Agent needs to know where your other servers/services are (can sometimes optionally be solved with user-defined entries in the hosts file in each Windows server instance), review the following 'Microsoft' user guide
88 Kerberos Review 'Microsoft Kerberos' user guide
135 DTC/RPC This port is shared between many Windows Services
1433/... SQL Server instance ports (multiple) Depends on policies and settings on target environment. Please review the How to configure RPC dynamic port allocation to work with firewalls user guide

How do I install a Monitoring Database?

There are 2 ways of installing a new Monitoring Database:

  1. Executing the database installer (.exe) manually

You must have set a proper configuration for the database in the configuration file before launching the installer

  1. Manually install the monitoring database using the %NAME%.DACPAC file

1. Executing database installer manually using the Database Installer (.exe)

Before you execute the installer you must first provide information about the SQL Server instance and the name of the monitoring database, this connectivity information is set using the MonitorAgentConnectionString property either directly from the configuration file or using Remote Configuration

Use Notepad++ or run notepad with elevated privileges:

  1. Open the Settings.json file
  2. Set the appropriate MonitorAgentConnectionString (See ConnectionStrings.com for additional examples)
...
"MonitorAgentConnectionString": "Server=localhost;Database=IM_MonitorAgent_%AgentName%_Test;Integrated Security=SSPI;Connection Timeout=60",
...

NOTE: Named instances must be JSON formatted (use 2 backslashes for configuration\\) for example Server=localhost\\instancename

  1. Run the Nodinite.Installer.MonitorAgent.%AgentName%Database.exe using an account that has SQL rights to create new databases

Agent database install

  1. Set SQL database rights as described on this page

2. Manually installing the monitoring database using the .DACPAC file

Follow the guide below to manually install the monitoring database using the .DACPAC file:

  1. Copy the .DACPAC file from the folder where the Monitoring Agent is installed to a local disk of the SQL Server instance
  2. From SSMS on the SQL server instance where to install the database, choose to "Deploy Data Tier Application"
    • Follow the steps in the Deploy Data tier Wizard...

    If you host multiple monitoring databases on the same SQL Server instance, make sure to provide a uniquely identifiable name for the database

  3. Set SQL database rights as described on this page

How do I update a Monitoring Database manually?

Simply follow the steps below.

Updating manually

Normally you should not need to perform this step manually, since the Monitoring Agent, if it has the appropriate rights, will update the database during the start of the service. Information about the outcome of such operations, can be found in the diagnostics file.

1. Executing database installer manually using the Database Installer (.exe)

Before you execute the installer you must first provide information about the SQL Server instance and the name of the monitoring database, this connectivity information is set using the MonitorAgentConnectionString property either directly from the configuration file or using Remote Configuration

Use Notepad++ or run notepad with elevated privileges:

  1. Open the Settings.json file
  2. Set the appropriate MonitorAgentConnectionString (See ConnectionStrings.com for examples)
...
"MonitorAgentConnectionString": "Server=localhost;Database=IM_MonitorAgent_%AgentName%_Test;Integrated Security=SSPI;Connection Timeout=60",
...

NOTE: Named instances must be JSON formatted (use 2 backslashes for configuration\\) for example Server=localhost\\instancename

  1. Run the Nodinite.Installer.MonitorAgent.%AgentName%Database.exe using an account that has SQL rights to create new databases

Agent database update

2. Manually updating the monitoring database using the .DACPAC file

Follow the guide below ,to manually update the monitoring database using the .DACPAC file:

  1. Copy the .DACPAC file from the folder where the Monitoring Agent is installed to a local disk of the SQL Server instance
  2. From SSMS on the SQL server instance where to update the database, choose to "Update Data Tier Application"
    • Follow the steps in the Update Data tier Wizard...

    If you host multiple monitoring databases on the same SQL Server instance, make sure to select the right database for the update operation

Next Step

  • Make sure to monitor that backups are taken, and that the size of the Monitoring Database is within your user-defined thresholds using the Database Monitoring Agent