---
title: "Configuration Changes: Updating Connection Strings After Migration"
description: "Point Nodinite v7 to the new SQL Server after a database migration: the connection string in the Nodinite Portal, the SqlServer System Parameter, the Log Database entries, the Pickup Service, and Monitoring Agent databases."
---

# Configuration Changes

Information about the whereabouts of the [Configuration Database][ConfigDB] and [Logging Databases][Log Databases] now needs to be updated in :Nodinite:.

To avoid most of the following steps, re-use the SQL Server cluster and/or listener names. If you are using stand-alone SQL Server instances, and not re-using the old server name, the new name must be specified accordingly.

>[!NOTE]
>This page covers :Nodinite: v7. :Nodinite: v6 is no longer supported; to move a v6 installation, follow [Migrating v6 to v7 on New Hardware][].

## :fa-network-wired: Understanding Where Nodinite Keeps the Database Locations

:Nodinite: keeps the location of its databases in several places. The connection string to the Configuration Database comes from the Nodinite Portal; everything else is stored in the Configuration Database itself.

<div class="mermaid">
flowchart TB
    Portal["fa:fa-cloud Nodinite Portal<br/>Step 3: Infrastructure<br/>connection string"] --> CLI["fa:fa-terminal CLI update<br/>elevated PowerShell 7"]
    CLI --> Core["fa:fa-globe Core Services<br/>protected connection string"]
    Core --> Config["fa:fa-database Configuration Database"]
    Config --> SqlServer["fa:fa-sliders SqlServer System Parameter<br/>server and linked server names"]
    Config --> LogTables["fa:fa-table LogTables<br/>Server and HOST per Log Database"]
    LogTables -->|"Linked Server"| Log["fa:fa-database Log Databases"]
    Pickup["fa:fa-inbox Pickup Service<br/>optional direct write"] --> Config
    Agent["fa:fa-hard-drive Monitoring Agents"] --> AgentDB["fa:fa-database Monitoring Databases"]
    style Portal fill:#2678BD
    style CLI fill:#2678BD
    style SqlServer fill:#E47528
    style LogTables fill:#E47528
    style Pickup fill:#9E59BB
    style Agent fill:#9E59BB
</div>

*Diagram: the places to update after a move. Blue is the connection string you set in the Nodinite Portal ([Step 3: Infrastructure][Portal SQL Server]) and the [CLI update][Updating Nodinite v7] that writes it into the [Core Services][]; orange is what lives in the [Configuration Database][ConfigDB] (the [SqlServer][] [System Parameter][System Parameters] and the `LogTables` entries for the [Log Databases][], reached through [Linked Servers][]); purple is the [Pickup Service][] and the [Monitoring Agents][] with their own [Monitoring Databases][Agent Database].*

|What|Where it is stored|When to change it|How|  
|---|---|---|---|  
|Configuration Database connection string|Nodinite Portal, written into each Core Service by the CLI|New server, instance, or listener name|[Step 1](#step-1-update-the-connection-string-in-the-nodinite-portal)|  
|[SqlServer][] System Parameter|Configuration Database|Any move to a different SQL Server instance|[Step 2](#step-2-update-the-sqlserver-system-parameter)|  
|Log Database server names|`LogTables` in the Configuration Database|Log Databases moved to another instance|[Step 3](#step-3-update-the-log-database-information)|  
|Pickup Service direct write|Pickup Service configuration|Only when **Use Configuration DB** is checked|[Step 4](#step-4-update-the-pickup-service)|  
|Monitoring Database connection strings|Nodinite Portal, on each agent card in the [Agents step][]|Monitoring Databases moved|[Step 5](#step-5-update-monitoring-agent-databases)|  
|[Linked Servers][]|`master` database on the SQL Server instance|New instance, newer SQL Server version, or in-place upgrade|[Recreate Linked Servers][]|  

## Step 1: Update the Connection String in the Nodinite Portal

The [Core Services][] read the Configuration Database connection string from their configuration, which the CLI writes from the Nodinite Portal at every install and update:

1. In the Nodinite Portal, open the environment and change the connection string in [Step 3: Infrastructure][Portal SQL Server]. If the environment is set to prompt for the connection string, pass the new value with `--database-connection-string` instead (see [Passing arguments when needed][Portal CLI Arguments]).
2. Download the package and run the CLI workflow in elevated PowerShell 7, as described in [Updating Nodinite v7][]. The CLI writes the new connection string into each Core Service.
3. Enter the connection string **unencrypted**; :Nodinite: protects it with **certificate-based encryption** (see [Secret Management][]).

For formats, certificate validation, and Always On settings, see [SQL Server Connection Strings][Connection Strings].

## Step 2: Update the SqlServer System Parameter

When the databases move to a different SQL Server instance, the [SqlServer][] System Parameter must describe the new server names, linked server names, and cloud or on-premises settings. Without it, the [Logging Service][] can't create new Log Databases or query existing ones. See [SqlServer System Parameter][Planning SqlServer] in the planning guide, and contact [Nodinite Support][] for assistance.

## Step 3: Update the Log Database Information

This script creates another T-SQL script. Use it to change the SQL Server instance name for selected [Log Databases][] in the **LogTables** table in the [Configuration Database][ConfigDB] (names like the `@prefix` variable).

>Change the `@prefix`, `@oldServerName` and `@newServerName` parameters as appropriate and run from the [Configuration Database][ConfigDB] in SSMS. Log Databases created by :Nodinite: v6 keep their `NodiniteLog_<Environment>_` names after an upgrade; see [Log Database Naming][].

``` SQL
DECLARE @sql NVARCHAR(max) =''
DECLARE @prefix NVARCHAR(255) =  'Nodinite_Dev_Log_'
DECLARE @oldServerName NVARCHAR(255) =  'localhost'
DECLARE @newServerName NVARCHAR(255) =  'MYOTHERSQLDATABASE[\InstanceName]'
DECLARE @length INT
SET @length = LEN(@prefix) 

;WITH nodinitelogdatabases ([Database]) as
(SELECT [Database] From LogTables Where [Database] Like (@prefix + '%'))
Select @sql += 'UPDATE LogTables SET [Server] = ''' + @newServerName + ''', [HOST] = ''' + @newServerName + ''''  + ' WHERE [Database] = ''' + l.[Database] + '''' + ' AND [Server] = ''' + @oldServerName + ''''   + CHAR(13)+CHAR(10) 
FROM nodinitelogdatabases l
ORDER BY [Database]
Print @@Rowcount
Print @sql
```

*This script creates another script that you can use to update the **Server** column in the **LogTables** table in the [Configuration Database][ConfigDB].*

>[!IMPORTANT]
>If you are running Azure SQL Managed Instance and you are moving to another managed instance, you must update the `HOST` column accordingly.

The [Add or manage Log Database][] page describes each field of a Log Database entry, including the **Remote Server** option.

## Step 4: Update the Pickup Service

This step applies only when the [Pickup Service][] writes directly to the Configuration Database (**Use Configuration DB** checked). Update its **Config DB Connection String**, as described in [Use Configuration DB (Direct Write)][Pickup Direct Write]. With the default destination, the [Log API][], nothing changes.

## Step 5: Update Monitoring Agent Databases

If you are also moving the :Nodinite: [Monitoring Databases][Agent Database], update the connection string of each agent that uses one:

* **Agents installed from the Portal package** — in the Nodinite Portal, [Step 5: Agents][Portal Agents], open the agent card and change **Agent database connection string** (and **Database type** when the target is an Always On group or a Managed Instance). If **Prompt for connection string during install** is on, pass the new value with `--agent-connection-string` instead. Then run the update; `install-agent` updates one agent.
* **Agents installed with an MSI** — change the Monitoring Database connection string through the agent's [Remote Configuration][]. See [Agent Database][] for the details.

## :fa-hand-point-right: Next Steps

**Configuration updated?** Continue with:  

* :fa-circle-check: [Validation and DACPAC Registration][] - Test and register databases  

## :fa-link-horizontal: Related Topics

* :fa-truck-moving: [Database Migration Overview][] - Hub page and decision tree  
* :fa-clipboard-check: [Planning][] - Pre-flight checklist  
* :fa-hard-drive: [Local Disk Move][] - For same SQL instance  
* :fa-server: [Remote SQL Instance Move][] - For different SQL instance  
* :fa-flag-checkered: [Post-Migration Steps][] - Cleanup and optimization  
* :fa-plug: [SQL Server Connection Strings][Connection Strings]  
* :fa-key: [Secret Management][]  

[Add or manage Log Database]:{ndr}/Administration/5.%20Settings/2.%20Log%20Databases/Add%20or%20manage%20Log%20Database.md
[Agent Database]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Agent%20Database.md
[Agents step]:{ndr}/Install%20and%20Update/Getting%20started/Version%207/Install%20Nodinite%20v7%20Steps/05%20-%20Agents.md
[ConfigDB]:{ndr}/Core%20Services/Configuration%20Database/Overview.md
[Connection Strings]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Connection%20Strings.md
[Core Services]:{ndr}/Core%20Services/Overview.md
[Database Migration Overview]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/Overview.md
[Linked Servers]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Linked%20Servers.md
[Local Disk Move]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/2.%20Local%20Disk%20Move.md
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Log Database Naming]:{ndr}/Core%20Services/Log%20Databases/Overview.md#fa-tag-log-database-naming
[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Migrating v6 to v7 on New Hardware]:{ndr}/Install%20and%20Update/Getting%20started/Version%206/Migrating%20v6%20to%20v7%20on%20New%20Hardware.md
[Monitoring Agents]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/What%20is%20a%20Monitor%20Agent.md
[Nodinite Support]:https://support.nodinite.com
[Pickup Direct Write]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Getting%20started/3.%20Configuration.md#use-configuration-db-direct-write
[Pickup Service]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Overview.md
[Planning]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/1.%20Planning.md
[Planning SqlServer]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/1.%20Planning.md#sqlserver-system-parameter
[Portal Agents]:{ndr}/Install%20and%20Update/Getting%20started/Version%207/Install%20Nodinite%20v7%20Steps/05%20-%20Agents.md#net-10-agents-without-gmsa-support
[Portal CLI Arguments]:{ndr}/Install%20and%20Update/Getting%20started/Version%207/Install%20Nodinite%20v7%20Steps/07%20-%20Install%20the%20Generated%20Package.md#passing-arguments-when-needed
[Portal SQL Server]:{ndr}/Install%20and%20Update/Getting%20started/Version%207/Install%20Nodinite%20v7%20Steps/03%20-%20Infrastructure.md#configure-sql-server-connectivity
[Post-Migration Steps]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/6.%20Post-Migration%20Steps.md
[Recreate Linked Servers]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/Overview.md#fa-link-recreate-linked-servers-after-a-sql-server-upgrade
[Remote Configuration]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/How%20do%20I%20configure%20a%20Monitor%20Agent.md
[Remote SQL Instance Move]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/3.%20Remote%20SQL%20Instance%20Move.md
[Secret Management]:{ndr}/Install%20and%20Update/Troubleshooting/Secret%20Managment.md
[SqlServer]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/SqlServer.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md
[Updating Nodinite v7]:{ndr}/Install%20and%20Update/Getting%20started/Version%207/Updating%20Nodinite%20v7.md
[Validation and DACPAC Registration]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/5.%20Validation%20and%20DACPAC%20Registration.md