Skip to content
Documentation
Updated 10 minutes to read
Markdown

Master SQL Server Linked Server configuration for Nodinite distributed environments. This comprehensive guide covers linked server setup, RPC configuration, Always On Availability Groups (AOAG), failover clusters, security contexts, and troubleshooting common connectivity issues.

What you'll learn on this page:

✅ When linked servers are required for Nodinite deployments
✅ Configure linked servers for default instances, named instances, clusters, and AOAG
✅ Enable RPC and RPC Out for distributed transactions
✅ Set up security contexts for Windows authentication
✅ Troubleshoot common linked server connectivity and authentication issues

SQL Server Linked Servers enable Nodinite to query databases across multiple SQL Server instances. The Configuration Database uses linked servers to access Log Databases, BizTalk tracking databases, and other remote SQL resources. Even when databases reside on the same SQL Server instance, linked servers must be configured for Nodinite to function correctly.

Which Nodinite Services Use Linked Servers?

Section titled “Which Nodinite Services Use Linked Servers?”

Only specific Nodinite services access databases through linked servers:

  • ✅ Logging Service — Fetches log data from Log Databases and BizTalk tracking databases
  • ✅ Monitoring Service — Retrieves monitoring data from Log Databases
  • ✅ Log API — Accesses log data through linked servers
  • ✅ Web API — Queries databases through linked servers

A linked server is a SQL Server object that allows you to execute queries against remote SQL Server instances (or other OLE DB data sources) as if they were local. Nodinite relies on linked servers to maintain a consistent architecture regardless of database distribution.

graph TD subgraph "SQL Server Hotel" roLogDatabase2(fal:fa-database fal:fa-database fal:fa-database Log databases) end subgraph "Nodinite SQL Server Instance" roConfigDatabase(fal:fa-database Config Database) ---|"Linked Server"| roLogDatabase(fal:fa-database fal:fa-database fal:fa-database Log databases) end subgraph "BizTalk SQL Server" roBizTalkMGMTDB(fal:fa-database BizTalkMGMTDb) end subgraph BizTalk SQL Server 2 roBizTalkDTADb(fal:fa-database BizTalkDTADb) end roConfigDatabase -.-|"Linked Server"| roLogDatabase2 roConfigDatabase -.-|"Linked Server"| roBizTalkDTADb roConfigDatabase -.-|"Linked Server"| roBizTalkMGMTDB

Diagram: the Nodinite Configuration Database connects to local and historical ("SQL Server Hotel") Log Databases, and to the BizTalk databases read by the BizTalk Server Logging Agent, through Linked Servers configured with RPC and RPC Out.

  • ❌ Never — Linked servers are always required for Nodinite to function, regardless of database distribution

All linked server configurations for Nodinite must have:

  1. Server name — Exact name of the SQL Server instance (see Naming Conventions below)
  2. Security context — "Be made using the login's current security context" (passthrough authentication)
  3. RPC enabled — rpc = true
  4. RPC Out enabled — rpc out = true

Security Context: Passthrough Authentication

Section titled “Security Context: Passthrough Authentication”

Nodinite uses passthrough authentication where the Logging Service, Monitoring Service, and other Core Services maintain the identity of their service account when traversing linked servers.

Configuration: "Be made using the login's current security context"

  • ✅ Consistent security model across all linked servers
  • ✅ Windows Integrated Security with Kerberos authentication
  • ✅ No need to store SQL credentials in linked server definitions
  • ✅ Centralized service account management

Use the following template to create a linked server (replace %SERVER\INSTANCE% with your actual server name):

-- Add the linked server
EXEC sp_addlinkedserver @server = '%SERVER\INSTANCE%';
-- Enable RPC
EXEC sp_serveroption '%SERVER\INSTANCE%', 'rpc', true;
-- Enable RPC Out
EXEC sp_serveroption '%SERVER\INSTANCE%', 'rpc out', true;
EXEC sp_addlinkedserver @server = 'LOCALHOST';
EXEC sp_serveroption 'LOCALHOST', 'rpc', true;
EXEC sp_serveroption 'LOCALHOST', 'rpc out', true;
EXEC sp_addlinkedserver @server = 'LOCALHOST\BIZTALK';
EXEC sp_serveroption 'LOCALHOST\BIZTALK', 'rpc', true;
EXEC sp_serveroption 'LOCALHOST\BIZTALK', 'rpc out', true;
EXEC sp_addlinkedserver @server = 'SQL-PROD-01';
EXEC sp_serveroption 'SQL-PROD-01', 'rpc', true;
EXEC sp_serveroption 'SQL-PROD-01', 'rpc out', true;
EXEC sp_addlinkedserver @server = 'SQL-PROD-01\BIZTALK';
EXEC sp_serveroption 'SQL-PROD-01\BIZTALK', 'rpc', true;
EXEC sp_serveroption 'SQL-PROD-01\BIZTALK', 'rpc out', true;

SSMS Object Explorer with a linked server expanded to show the remote databases
Example of a linked server in SSMS, expanded to list the databases on the remote instance.

The linked server name must match the SQL Server instance name format. Use the following conventions based on your environment:

Nodinite reads the Linked Server name it uses from the LinkedServerName property of the SqlServer System Parameter, so the Linked Server you create must have exactly that name.

Environment Linked Server Name
Stand Alone localhost OR ServerName
Fail-Over Cluster localhost OR ClusterName
Always On (AOAG) ListenerName
Environment Linked Server Name
Stand Alone localhost\instancename OR ServerName\instancename
Fail-Over Cluster localhost\instancename OR ClusterName\instancename
Always On (AOAG) ListenerName\instancename

If your SQL Server environment is configured with Always On Availability Groups, additional configuration is required for linked servers.

Always use the AOAG listener name when creating linked servers for availability group databases. This ensures connections automatically fail over to the active replica without manual intervention.

-- Correct: Use listener name
EXEC sp_addlinkedserver @server = 'SQL-AOAG-Listener';
-- Incorrect: Don't use individual node names
-- EXEC sp_addlinkedserver @server = 'SQL-Node-01';

Proper Service Principal Names (SPN) registration is critical for Always On Availability Groups. You must register SPNs for:

  • ✅ AOAG listener name (with and without port)
  • ✅ Each physical node name (with instance port)
  • ✅ Each instance name on each node

If your SQL Server environment is configured with failover clustering, you need to review the following additional requirements:

Use the cluster virtual network name when creating linked servers, not individual node names. This ensures connections work regardless of which node currently owns the SQL Server resource.

-- Correct: Use cluster name
EXEC sp_addlinkedserver @server = 'SQL-Cluster';
-- Incorrect: Don't use individual node names
-- EXEC sp_addlinkedserver @server = 'SQL-Node-01';

Failover clusters require special Microsoft Distributed Transaction Coordinator (MSDTC) configuration to support distributed transactions across cluster nodes.

Before installing Nodinite, a SQL DBA must create the following linked servers on the Configuration Database SQL instance:

  1. Configuration Database → Local Log Databases — Even when on same instance
  2. Configuration Database → Remote Log Databases — If Log Databases on different SQL instance(s)

If using the Nodinite BizTalk Server Logging Agent to log BizTalk Server events:

  1. Configuration Database → BizTalk Management Database (BizTalkMGMTDb)
  2. Configuration Database → BizTalk Tracking Database (BizTalkDTADb)

If using the Nodinite Dynamics 365 Monitoring Agent to monitor Dynamics 365:

  1. Configuration Database → Dynamics 365 Database(s)

If using Nodinite to monitor custom databases:

  1. Configuration Database → Custom Application Databases (as needed)
Issue Cause Solution
"RPC remote procedure call" error RPC or RPC Out not enabled Verify sp_serveroption for both rpc and rpc out set to true
"Cannot generate SSPI context" Missing or duplicate SPNs See SPN troubleshooting guide
"Anonymous login" errors Delegation not configured See Trusted for delegation guide
Linked server fails after AOAG failover Using node name instead of listener Recreate linked server using AOAG listener name
Timeout connecting to linked server Firewall blocking ports See SQL Server Firewall Configuration
"The certificate chain was issued by an authority that is not trusted", or linked server fails after a SQL Server upgrade Old provider or options, or encryption without a trusted certificate Recreate the linked server with encryption
"Login failed for user" Service account lacks SQL rights Grant appropriate database roles on remote instance

Test a linked server query:

-- Test basic connectivity
SELECT @@SERVERNAME AS LinkedServerName;
-- Test through linked server (replace LINKEDSERVERNAME)
SELECT * FROM [LINKEDSERVERNAME].[master].[sys].[databases];
-- Test RPC is enabled
EXEC sp_helpserver;

Expected output for sp_helpserver:

The rpc and rpc out columns should show true for the linked server.

After creating linked servers, verify:

  • ✅ Linked server appears in SSMS under Server Objects → Linked Servers
  • ✅ Can expand linked server to see remote database list
  • ✅ sp_helpserver shows rpc and rpc out = true
  • ✅ Test query returns results without errors
  • ✅ Service account has login rights on remote SQL instance
  • ✅ Trusted for delegation configured (for distributed environments)
  • ✅ SPNs registered (for distributed environments)
  • ✅ Firewall ports open between SQL instances

Understanding how Nodinite uses linked servers helps troubleshoot connectivity issues. The Architecture Overview above shows the linked servers between the databases; this diagram adds the Core Services that call the Configuration Database:

graph LR subgraph "SQL Server" roConfigDatabase(fal:fa-database Config Database) ---|"Linked Server"| roLogDatabase(fal:fa-database fal:fa-database fal:fa-database Log databases) end subgraph "Application Server" roLogAPI(fal:fa-cloud-arrow-down Log API) ---|"SQL, DTC, DNS, RPC"| roConfigDatabase roWebAPI(fal:fa-cloud Web API) roWebAPI ---|"SQL, DTC, DNS, RPC"| roConfigDatabase roLoggingService(fal:fa-hard-drive Logging Service) ---|"SQL, DTC, DNS, RPC"| roConfigDatabase roMonitoringService(fal:fa-watch-fitness Monitoring Service) ---|"SQL, DTC, DNS, RPC"| roConfigDatabase end

Diagram: the Nodinite Log API, Web API, Logging Service, and Monitoring Service (each its own IIS web site on Windows Server) access the Configuration Database, which uses Linked Servers to query the Log Databases. The ports for each hop are on the SQL Server Firewall Configuration page.

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...