---
title: Nodinite SQL Server Database Migration – Complete Guide
description: Navigate your Nodinite SQL Server database migration with confidence. Choose your migration path, recreate encrypted linked servers after a move or in-place upgrade to a newer SQL Server, and follow the guides for planning, execution, validation, and optimization.
---

# SQL Server Database Migration

Migrate your :Nodinite: SQL Server databases with confidence using this comprehensive guide. Whether you're moving to a new disk volume or migrating to an entirely new SQL Server instance, we'll guide you through every step of the process.

* ✅ Step-by-step planning checklists  
* ✅ Scenario-specific migration paths (local disk or remote instance)  
* ✅ Secure configuration updates through the Nodinite Portal and the CLI  
* ✅ Encrypted linked servers after a move or in-place upgrade to a newer SQL Server  
* ✅ Complete validation and testing procedures  
* ✅ Post-migration optimization and monitoring  

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

## :fa-compass: Choose Your Migration Path

<div class="mermaid">
flowchart TD
    A["fa:fa-database Where are your databases now?"] --> B{"What is your target?"}
    B -->|"Same SQL instance, different disks"| C["fa:fa-hard-drive Local Disk Move"]
    B -->|"Different SQL instance, same or different server"| D["fa:fa-server Remote SQL Instance Move"]
    C --> E["Fast path: detach and reattach"]
    D --> F["Full migration: backup and restore or detach and attach,<br/>then new connection string and SqlServer parameter"]
    style C fill:#93d16d
    style D fill:#E47528
</div>

*Diagram: pick the [Local Disk Move][LocalMove] (green) when the SQL Server instance stays the same, and the [Remote SQL Instance Move][RemoteMove] (orange) for any other instance, including SQL Server version upgrades and consolidations.*

## Migration Phases Overview

Every migration follows these core phases, regardless of your scenario:

<div class="mermaid">
flowchart LR
    P1["fa:fa-clipboard-check 1. Planning"] --> P2["fa:fa-truck-moving 2 or 3. Move the databases"]
    P2 --> P4["fa:fa-gear 4. Configuration changes"]
    P4 --> P5["fa:fa-circle-check 5. Validation"]
    P5 --> P6["fa:fa-flag-checkered 6. Post-migration"]
    style P1 fill:#2678BD
    style P2 fill:#E47528
    style P4 fill:#9E59BB
    style P5 fill:#93d16d
    style P6 fill:#3F827B
</div>

*Diagram: the six guides in order: [Planning][], [Local Disk Move][LocalMove] or [Remote SQL Instance Move][RemoteMove], [Configuration Changes][ConfigChanges], [Validation and DACPAC Registration][Validation], and [Post-Migration Steps][PostMigration], covering the [Configuration Database][ConfigDB], the [Log Databases][], and the [Agent Database][].*

### Phase 1: Planning and Preparation

Verify prerequisites, inform stakeholders, and prepare the target environment before you touch anything: [1. Planning][Planning].

### Phase 2: Migration Execution

Stop the :Nodinite: [Core Services][] and move the data. The steps depend on your scenario:

* [2. Local Disk Move][LocalMove] — detach and reattach on the same SQL Server instance  
* [3. Remote SQL Instance Move][RemoteMove] — backup and restore (or detach and attach) on a new SQL Server instance  

### Phase 3: Configuration Updates

Point :Nodinite: to the new database location: the connection string in the Nodinite Portal ([Step 3: Infrastructure][Portal SQL Server]), the [SqlServer][] [System Parameter][System Parameters], and the Log Database entries: [4. Configuration Changes][ConfigChanges].

### Phase 4: Validation and DACPAC Registration

Verify that the Core Services start and that the databases are operational and registered: [5. Validation and DACPAC Registration][Validation].

### Phase 5: Post-Migration Optimization

Back up, monitor, and tune the performance of the new environment, then decommission the old one: [6. Post-Migration Steps][PostMigration].

## Quick Decision Tree

|**Scenario**|**Start Here**|**Key Phases**|  
|---|---|---|  
|Moving to different disks on **same SQL instance**|[Local Disk Move][LocalMove]|Stop services → Detach → Move files → Reattach → Restart|  
|Moving to **different SQL Server instance**|[Planning][Planning] → [Remote Move][RemoteMove]|Plan → Prepare instance → Backup → Restore → Configure → Validate|  
|Upgrading to **newer SQL Server version**|[Planning][Planning] → [Remote Move][RemoteMove]|Verify compatibility → Prepare → Backup → Restore → [Recreate linked servers](#fa-link-recreate-linked-servers-after-a-sql-server-upgrade) → Test|  
|**In-place upgrade** of SQL Server|[Recreate Linked Servers](#fa-link-recreate-linked-servers-after-a-sql-server-upgrade)|Stop services → Upgrade SQL Server → Drop and recreate linked servers → Verify → Restart|  
|**Consolidating multiple instances**|[Planning][Planning] → [Remote Move][RemoteMove]|Plan carefully → Prepare → Backup each → Restore to new instance|  

## Key Concepts

### Local Disk Move

Use the [Local Disk Move][LocalMove] when moving to different disk volumes on the **same** SQL Server instance.

#### Advantages of a Local Disk Move

* ✅ Fast and simple  
* ✅ No connection string change needed (server name unchanged)  
* ✅ Lower risk  
* ✅ Minimal downtime  

#### What Happens in a Local Disk Move

1. Stop the :Nodinite: [Core Services][]
2. Detach databases from current disks
3. Move database files to new disks
4. Reattach databases
5. Restart the Core Services

### Remote SQL Instance Move

Use the [Remote SQL Instance Move][RemoteMove] when moving to **any different SQL Server instance** (new server, upgrade, consolidation).

#### Advantages of a Remote SQL Instance Move

* ✅ Complete infrastructure refresh  
* ✅ Version upgrades supported  
* ✅ No downtime on old server  
* ✅ Easy rollback (old server still available)  

#### What Happens in a Remote SQL Instance Move

1. Plan and prepare new SQL instance
2. Stop the :Nodinite: [Core Services][]
3. Backup databases from old instance
4. Restore to new instance and [recreate the linked servers](#fa-link-recreate-linked-servers-after-a-sql-server-upgrade)
5. Update the :Nodinite: configuration (connection string, [SqlServer][] System Parameter, Log Database entries)
6. Validate and test
7. Decommission old instance

## Connection Strings and Secrets

:Nodinite: v7 protects connection strings with **certificate-based encryption** stored in the Windows Certificate Store (see [Secret Management][]). You always enter the new connection string unencrypted, in the Nodinite Portal or as a CLI argument, and :Nodinite: protects it automatically. [Configuration Changes][ConfigChanges] shows every place to update.

## :fa-link: Recreate Linked Servers After a SQL Server Upgrade

:Nodinite: always reads the [Log Databases][] through [Linked Servers][], even when they sit on the same SQL Server instance as the [Configuration Database][ConfigDB]. A linked server definition stores the OLE DB provider and its connection options, and these changed in newer SQL Server versions:

* SQL Server 2022 and later no longer ship the SQL Server Native Client (`SQLNCLI`, `SQLNCLI11`) provider that older linked servers use.
* The replacement, the Microsoft OLE DB Driver for SQL Server (`MSOLEDBSQL`), **encrypts the connection by default** and validates the SQL Server certificate.

A linked server that comes along from the older SQL Server, kept by an **in-place upgrade** or scripted in SSMS and run on the new instance, therefore keeps its old options and can fail. When it does, the [Logging Service][] can't query or create Log Databases, and searches in the [Web Client][] return no [Log Events][Log Event].

<div class="mermaid">
flowchart LR
    Old["fa:fa-link Old linked server<br/>SQLNCLI, no encryption"] --> Upgrade{"fa:fa-arrow-up-right-dots Newer SQL Server<br/>moved or upgraded in place"}
    Upgrade -->|"kept or scripted as is"| Fail["fa:fa-plug-circle-xmark Linked server queries fail<br/>no Log Databases"]
    Upgrade -->|"dropped and recreated"| New["fa:fa-lock MSOLEDBSQL<br/>Encrypt=Yes"]
    New --> OK["fa:fa-database Nodinite reaches the Log Databases"]
    style Old fill:#FFD525
    style Fail fill:#c33d34
    style New fill:#2678BD
    style OK fill:#93d16d
</div>

*Diagram: an old linked server (yellow) carried over to a newer SQL Server fails (red); dropping and recreating it with the new provider and encryption options (blue) lets the [Configuration Database][ConfigDB] reach the [Log Databases][] again (green).*

### When to Recreate the Linked Servers

|Scenario|Recreate the linked servers?|  
|---|---|  
|In-place upgrade to a newer SQL Server version|✅ Yes, all of them|  
|[Remote SQL Instance Move][RemoteMove] to a newer SQL Server version|✅ Yes, create them with the new options; never run a script of the old ones unchanged|  
|[Remote SQL Instance Move][RemoteMove] to the same SQL Server version|✅ Yes, create them on the new instance (see [Planning][])|  
|[Local Disk Move][LocalMove] on the same instance|❌ No, the linked servers stay as they are|  

Recreate **every** linked server :Nodinite: uses: the one for `localhost` (or the server name), the ones for other instances that host Log Databases, and the ones for BizTalk Server and other monitored databases. With [Always On Availability Groups][] or a failover cluster, recreate them on every node. The full list is in [Required Linked Servers for Nodinite][Required Linked Servers].

### Old vs New Linked Server Options

|Setting|Old linked server|New linked server|  
|---|---|---|  
|Provider|`SQLNCLI` or `SQLNCLI11` (SQL Server Native Client)|`MSOLEDBSQL` (Microsoft OLE DB Driver for SQL Server)|  
|Encryption|Optional (off)|**Mandatory**: `Encrypt=Yes`|  
|Trust Server Certificate|Not used|`TrustServerCertificate=Yes`, unless SQL Server has a certificate the :Nodinite: servers trust|  
|Security context|Be made using the login's current security context|Unchanged|  
|RPC and RPC Out|`true`|Unchanged, see [Linked Server RPC and RPC Out][LinkedServer - RPC - RPC OUT]|  

>[!TIP]
>`TrustServerCertificate=Yes` encrypts the connection but accepts the self-signed certificate SQL Server creates at startup. If your SQL Server has a certificate from a trusted certificate authority, clear **Trust Server Certificate** and, when the certificate name differs from the linked server name, enter it in **Host Name in Certificate**. [SQL Server Connection Strings][Connection Strings] describes the same options for the connection string.

### Step 1: List the Existing Linked Servers

Run this query in SSMS against the **master** database on the new or upgraded instance, and note each linked server's name:

```sql
SELECT name, provider, data_source, provider_string
FROM sys.servers
WHERE is_linked = 1;
```

Keep the names unchanged. :Nodinite: reads the linked server name from the `LinkedServerName` property of the [SqlServer][] System Parameter, and the `Server` column of every Log Database entry must match a linked server name.

### Step 2: Drop the Old Linked Server

Stop the [Logging Service][] and the [Monitoring Service][] first, unless you're in the middle of a migration where the [Core Services][] are already stopped. Then drop the linked server, here `localhost`:

```sql
EXEC master.dbo.sp_dropserver @server = N'localhost', @droplogins = 'droplogins';
GO
```

### Step 3: Create the Linked Server With Encryption

In SSMS, right-click **Server Objects** › **Linked Servers** › **New Linked Server**:

1. On the **General** page, enter the linked server name, select **SQL Server** as the server type, set **Encryption** to **Mandatory**, and check **Trust Server Certificate** (see the tip above).
2. On the **Security** page, select **Be made using the login's current security context**.
3. On the **Server Options** page, set **RPC** and **RPC Out** to `True`.

![SSMS New Linked Server dialog with Encryption set to Mandatory and Trust Server Certificate checked][png_LinkedServerEncryption]  
*Example of the encryption options on the General page of a new linked server for `LOCALHOST`.*  

Or run the script below; it creates the same linked server for `localhost`. Replace `localhost` in every statement with your linked server name, such as `SERVERNAME\INSTANCENAME` or an Always On listener name:

```sql
USE [master]
GO

EXEC master.dbo.sp_addlinkedserver @server = N'localhost', @srvproduct = N'', @provider = N'MSOLEDBSQL', @datasrc = N'localhost', @provstr = N'TrustServerCertificate=Yes;Encrypt=Yes'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'localhost', @useself = N'True', @locallogin = NULL, @rmtuser = NULL, @rmtpassword = NULL
GO

EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'collation compatible', @optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'data access', @optvalue = N'true'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'dist', @optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'pub', @optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'rpc', @optvalue = N'true'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'rpc out', @optvalue = N'true'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'sub', @optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'connect timeout', @optvalue = N'0'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'collation name', @optvalue = NULL
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'lazy schema validation', @optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'query timeout', @optvalue = N'0'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'use remote collation', @optvalue = N'true'
GO
EXEC master.dbo.sp_serveroption @server = N'localhost', @optname = N'remote proc transaction promotion', @optvalue = N'true'
GO
```

*`@useself = N'True'` is the login's current security context, and `@provstr` holds the encryption options. Repeat the script for every linked server you listed in Step 1.*

### Step 4: Verify the Linked Server

Query through the linked server, then start the Logging Service and the Monitoring Service again:

```sql
SELECT name FROM [localhost].[master].[sys].[databases];
EXEC sp_helpserver;
```

The query lists the databases on the linked instance, and `sp_helpserver` shows `rpc` and `rpc out` for the linked server. If the query fails with a certificate error, such as *The certificate chain was issued by an authority that is not trusted*, check **Trust Server Certificate** or install a trusted certificate on SQL Server. For other errors, see [Troubleshooting][Linked Servers Troubleshooting] on the Linked Servers page.

## Databases Affected

This guide covers migration of:

* :fa-database: [Configuration Database][ConfigDB] — Central settings and parameters
* :fa-hdd: [Log Databases][] — Message logging storage (one or many)
* :fa-bar-chart: [Monitoring Databases][Agent Database] — Monitor data storage (if applicable)

## Estimated Time & Downtime

|**Migration Type**|**Planning Time**|**Service Downtime**|**Total Duration**|  
|---|---|---|---|  
|Local Disk Move|1-2 hours|30-60 minutes|2-3 hours|  
|Remote SQL Instance Move (same server)|2-4 hours|1-2 hours|4-6 hours|  
|Remote SQL Instance Move (different server)|4-8 hours|2-4 hours|6-12 hours|  
|SQL Server Version Upgrade|6-12 hours|2-4 hours|8-16 hours|  

*Times vary based on database size, network speed, and team experience.*

## :fa-lightbulb: Best Practices

* ✅ **Always Plan First** — Never rush into migration without a clear plan  
* ✅ **Test in Staging** — Validate the process in a non-production environment  
* ✅ **Backup Everything** — Full backup before any migration  
* ✅ **Notify Stakeholders** — Inform users about planned downtime  
* ✅ **Have a Rollback Plan** — Know how to revert if issues occur  
* ✅ **Monitor After Migration** — Watch for issues in the first 24-48 hours  
* ✅ **Document Changes** — Keep records of what was moved and when  

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

* :fa-clipboard-check: First time? Start with the [Planning Guide][Planning]  
* :fa-hard-drive: Know your scenario? Jump to [Local Move][LocalMove] or [Remote Move][RemoteMove]  
* :fa-gear: Already migrating? Go to [Configuration Changes][ConfigChanges]  
* :fa-circle-check: Finishing up? See [Validation & DACPAC][Validation] and [Post-Migration][PostMigration]  

## :fa-link-horizontal: Related Topics

* :fa-database: [SQL Server Troubleshooting][SQL Server Overview]  
* :fa-key: [Secret Management][] — Certificate-based encryption in :Nodinite: 7  
* :fa-database: [Configuration Database][ConfigDB] — Central configuration storage  
* :fa-hdd: [Log Databases][] — Message logging storage  
* :fa-plug: [SQL Server Connection Strings][Connection Strings]  
* :fa-link: [SQL Server Linked Servers][Linked Servers] — Linked server setup, naming, and troubleshooting  
* :fa-rocket: [Post Installation Steps][] — Environment tuning and optimization after migration  
* :fa-arrow-turn-up: [Updating Nodinite v7][] — Stay current with latest version  
* :fa-cloud: [Upload and restore SQL Managed Instance .bak using Azure Blob Storage][AzureBakRestore]  

[Agent Database]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Agent%20Database.md
[Always On Availability Groups]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Always%20On%20Availability%20Groups.md
[AzureBakRestore]:{ndr}/Install%20and%20Update/Troubleshooting/Azure/Upload%20and%20restore%20SQL%20Managed%20Instance%20.bak%20using%20Azure%20Blob%20Storage.md
[ConfigChanges]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/4.%20Configuration%20Changes.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
[Linked Servers]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Linked%20Servers.md
[Linked Servers Troubleshooting]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Linked%20Servers.md#fa-wrench-troubleshooting
[LinkedServer - RPC - RPC OUT]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Linked%20Server%20RPC%20and%20RPC%20Out.md
[LocalMove]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/2.%20Local%20Disk%20Move.md
[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/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 Service]:{ndr}/Core%20Services/Monitoring%20Service/Overview.md
[Planning]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/1.%20Planning.md
[png_LinkedServerEncryption]:{ndm}/Documentation%20Pictures/IM/IMUpdate/Troubleshooting/SQL/LinkedServer_New_2025_With_Encryption.png
[Portal SQL Server]:{ndr}/Install%20and%20Update/Getting%20started/Version%207/Install%20Nodinite%20v7%20Steps/03%20-%20Infrastructure.md#configure-sql-server-connectivity
[Post Installation Steps]:{ndr}/Install%20and%20Update/Getting%20started/7.%20Post%20Installation%20Steps.md
[PostMigration]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/6.%20Post-Migration%20Steps.md
[RemoteMove]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/3.%20Remote%20SQL%20Instance%20Move.md
[Required Linked Servers]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Linked%20Servers.md#fa-list-check-required-linked-servers-for-nodinite
[Secret Management]:{ndr}/Install%20and%20Update/Troubleshooting/Secret%20Managment.md
[SQL Server Overview]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Overview.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]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Database%20Migration/5.%20Validation%20and%20DACPAC%20Registration.md
[Web Client]:{ndr}/Core%20Services/Web%20Client/Overview.md