Skip to main content

Questions tagged [linked-server]

Linked server allows operation to multiple server as one query.

Filter by
Sorted by
Tagged with
0 votes
0 answers
54 views

Unable to select "other data source" when creating linked server

I am unable to select the option for Other data source when creating a linked server in SSMS, because the option is completely grayed out. I have installed Microsoft OLE DB Driver (MSOLEDBSQL) for SQL ...
Travis Dean's user avatar
0 votes
0 answers
52 views

Communication link error when Running a stored procedure that hits a a separate server via linked server

I’ve ran into an issue where we’re trying to execute a stored procedure from server A which fetches data in a variable from server B. The SP calls a linked server that exists on server A. However, ...
Joe Sequel 's user avatar
3 votes
2 answers
277 views

How to create stored procedure in remote server using linked server

I tried to create an stored procedure in a remote server using this way EXECUTE (N'USE [master]; EXEC sp_executesql N'+ @sqlCommand) AT [LinkedServer] However I received this error Msg 111, Level 15,...
lego con tsijiari's user avatar
0 votes
0 answers
33 views

How to execute the [sp_removedbreplication] using linked server

I tried this way EXEC [linkedServer].[MASTER].[sys].[sp_removedbreplication] 'databasename' However I received this message Msg 18482, Level 14, State 1, Line 76 Could not connect to server '...
lego con tsijiari's user avatar
0 votes
1 answer
50 views

SQL Server 2017 not recognizing Oracle driver for Linked server

I would like to connect from my SQL Server 2017 to an Oracle database via Linked server. I installed the Oracle driver from Oracle-Client-for-Microsoft-Tools-64-bit.exe, but the driver does not appear ...
Balazs Kiss's user avatar
0 votes
1 answer
63 views

MSSQL Linked server login timeout

I have SQL running on several servers and I want to create DB links between the main server "A" and several other "child" servers (each one with their own SQL instance). I've ...
Daniel's user avatar
  • 11
0 votes
1 answer
55 views

Linked Servers on SQL Server AGs

When setting up Linked Servers in an Availability Group, do I need to set up the Linked Servers on the AG Listener as well as the AG Nodes? I've inherited a 2 node AG that currently has a set of ...
Wayne Cochran's user avatar
0 votes
1 answer
54 views

Can SQL Server contained database users use linked servers with login mappings? [duplicate]

Using SQL Server 2022 Standard Edition and contained database users (which means no corresponding SQL login at the instance level). I would like to have the contained database users be able to use a ...
M Herbener's user avatar
1 vote
1 answer
40 views

SQL Server: Linked Server connections: Scripting

I was looking for a way to script existing linked server connections for reference and migration to other servers. I have over 150 of them pointing to Azure SQL Databases used to gather reports.
TheL0grus's user avatar
3 votes
2 answers
244 views

MS SQL Server: How to alias a linked server

This is regarding MS SQL Server. I have two DB servers for my application named Torch TorchProd and TorchTest are the db servers. There is also a data mining server DataMineProd and DataMineTest I ...
user avatar
2 votes
1 answer
54 views

What factors influence choice between executing remote query using linkedserver via sp_executesql vs using 3 piece identifier

I'm writing a stored procedure that should insert into a local table values from a remote query. The remote server is setup as a linked sever. I have two options: Option 1 is: INSERT INTO ...
variable's user avatar
  • 3,476
1 vote
1 answer
50 views

SQL Server Linked Server PAGEIOLATCH_SH / CXPACKET

I have an agent job that runs a very simple "select max(date) from table" against a linked sql server. The linked server is part of an AG and the link from remote uses a listener to get to ...
user avatar
1 vote
0 answers
79 views

SQL script to run from batch jobs

I have a sql script that truncates the table and insert into database from a linked server.Since the server is SQL express I will need to use batch jobs to schedule the jobs. Below is a snippet of the ...
SQL_NoExpert's user avatar
  • 1,061
0 votes
1 answer
448 views

Communicating from a SQL Server 2022 to a SQL Server 2008 over linked server

I'm doing a proof of concept to assess whether we can upgrade some our servers piecemeal to SQL Server 2022. Unfortunately we still have a SQL Server 2008 which holds an old version of Microsoft ...
Jamie's user avatar
  • 101
2 votes
4 answers
638 views

SQL Server linked server query to Postgres not filtering rows

When I run this query on a SQL Server 2022 server with a linked server connection to PostgreSQL: SELECT TOP 1 * FROM PGSTACK.stackoverflow.[public].users WHERE Id = 1; SQL Server fetches the entire ...
Brent Ozar's user avatar
0 votes
1 answer
639 views

Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"

I have the task of migrating our databases from a Windows 2012 R2 server with SQL Server 11.0.7507 (2012) to a Windows 2019 server with SQL Server 16.0.1110.1 (2022). I am having issues with opening ...
Chris's user avatar
  • 1
2 votes
1 answer
99 views

Problems getting SQL Server linked server to work in web-based admin utility on Windows Server 2022

I have an ASP classic web application based on an SQL Server database, with an admin component. The database has a linked server with Microsoft.ACE.OLEDB.12.0 provider to allow bulk import of records ...
user1207313's user avatar
1 vote
1 answer
55 views

Can a server outside the Windows domain connect to a 2nd SQL instance via a linked server?

I have the infrastructure shown in the diagram below. Web Server 1 is outside the Windows Domain. Web Server 2 is inside the Windows Domain. SQL Server 1 and 2 are both inside the domain. There is a ...
ktakmn's user avatar
  • 25
0 votes
1 answer
215 views

How to use transaction in different server SQL Server

I have more than one server with SQL Server database. I want to do a begin transaction on both databases so that when there is an error it will automatically roll back. I have tried linked servers ...
stevanus billy's user avatar
0 votes
0 answers
42 views

Distributor_Admin Changing Linked Server "Data Access" Property to False

Why is the system changing the "Data Access" property on my linked server? How can I change that? See SQL Server linked server's DATA ACCESS property changes to false. I have the same ...
Abraham's user avatar
  • 101
0 votes
1 answer
2k views

unable to begin a distributed transaction database linked server

I have a problem with my Linked Server. I have a Linked Server set up and when I select or insert it works great. The problem starts when I run a transaction to overwrite simple data in tables. begin ...
Jan Kůst's user avatar
1 vote
0 answers
193 views

There was a recoverable, provider-specific error, such as an RPC failure. SQL to MySQL linked server no longer working

I have been searching all day and trying every manner of solution that I come across, yet nothing has resolved this issue. Here is my was working code: delete RemoteTable from OPENQUERY (LIGHTSAIL, '...
Yourguide's user avatar
1 vote
1 answer
160 views

SQL Server Jobs - fail on connection timeout

We have a LIVE set of 3 SQL Server instances on one network and a DEV set of 3 SQL Server instances on another. Being on different networks; LIVE cannot talk to DEV however the instances can talk to ...
Drees's user avatar
  • 11
0 votes
0 answers
944 views

Problems with DB linked server

My db link on DEV environment is working fine. But for the test I have windows without a GUI environment. With the help of my colleagues, I managed to set it up precisely like on DEV. The DB link ...
Jan Kůst's user avatar
0 votes
0 answers
43 views

Linked server view Select query doesn't execute on production server

I've build one view. I can run sys.databases from the linked server. However, when I tried to execute the following view. It is not retrieving any data from the linked server. USE [SSISDB] GO /****** ...
James's user avatar
  • 1
3 votes
2 answers
461 views

Using Kerberos Constrained Delegation with an ADSI Linked Server

I am attempting to utilize Kerberos delegation in order to allow Active Directory queries using a Linked Server configured for ADSI to be filtered according to the end-user's Active Directory security ...
DamonDCD's user avatar
0 votes
0 answers
136 views

Linked service: SQL Server-2019 to Cosmos DB

I have created linked service for importing data from Azure cosmos DB to on-prem MS-SQL-2019. Services created from SSMS and test connection is successful, but query is getting error. Query: select * ...
maverick_1's user avatar
0 votes
2 answers
223 views

Linked Servers and Application Intent

I'm attempting to improve performance of a set of views that we have on a local server, pulling data from another set of views on a remote Azure database. Our system provider advised us to use ...
Paul's user avatar
  • 188
5 votes
1 answer
376 views

SQL Server linked server's DATA ACCESS property changes to false

I have a SQL Server instance that includes an agent job that accesses a second instance via a linked server. Occasionally, and seemingly randomly, the DATA ACCESS property of the linked server ...
pvallero's user avatar
1 vote
1 answer
603 views

Linked server and promotion of distributed transaction

Background - Main server is Microsoft SQL Server 2019 and linked server is PostgreSQL 15. Main reason for the linking is the duplication of records. All other DML operations are good from SQL Server ...
gobsek2 Altsgamer's user avatar
1 vote
0 answers
906 views

Linked Server query to Oracle fails on very wide table - adjusting FetchSize doesn't resolve the problem

We're using a Linked Server connection to Oracle 19c, using the 21.3 Oracle Client (64 bit). We're running on SQL 2019. This connection works fine for all the tables we want to query except one, which ...
Mike's user avatar
  • 658
1 vote
0 answers
184 views

Linked server query occasionally returns results slowly

I have an unfortunate situation where I need to pull a next-number from a table from both a local and a linked server. To do so, I've created a stored procedure to return the result. When I execute ...
Dave.Gugg's user avatar
  • 304
0 votes
0 answers
92 views

two servers have linked to the same server - one connection is encrypted and second not - why?

I have some old SQL Server 2008r2 instances that do not have client certificate set up and force encryption is set to FALSE. It is on Windows 2008 r2 and really hard to upgrade - for now it must stay ...
Dorian's user avatar
  • 103
0 votes
0 answers
210 views

what permissions does user need to have to use linked server and its default remote user mapping

i have some linkedserver and for it created default maping that mapping list is empty and all goes thrue 'Be made using this seciurity context' and this works fine - i can querry this linked from any ...
Dorian's user avatar
  • 103
0 votes
1 answer
589 views

Unable to create linked server to Power BI XMLA endpoint in SSMS

Unable to create linked server to Power BI XMLA endpoint in SSMS and getting below error: The test connection to the linked server failed. Additional information: An exception occurred while ...
Khanjan Shah's user avatar
1 vote
1 answer
262 views

Filtering in Queries using Linked Servers in SQL Server 2012

My colleague told me that any query that uses a linked server first transfers the data from the remote server to the server the query is running on and then applies filters. For example, if I have the ...
RobMartin's user avatar
  • 149
0 votes
1 answer
428 views

SQL not connecting to Linked Oracle Server

We have SQL Server 2014, with the latest CU, running with Oracle client version 11.2.0.1.0 installed. We have about 25 linked Oracle servers connected on it. The servers are running of mix of Oracle ...
Depth of Field's user avatar
0 votes
0 answers
120 views

SQL Server Linked Server Impersonate error

I'm trying to configure LinkedServer to use Impersonate. All Servers and PC are connected to the same Domain. What I've configured already: SQLServer1 - First/Middle server: Configured SPNs for ...
Mr.Kal's user avatar
  • 1
5 votes
1 answer
1k views

Update fails on linked server after upgrading to SQL Server 2022

After upgrading SQL Server from 2019 to 2022 the following query with linked server has started to fail (I've omitted some column names and details for simplicity): UPDATE [<remote server>].[<...
Sergey Rybalkin's user avatar
0 votes
0 answers
166 views

Linked Server using domain accounts suddenly stopped working (…for a while)

**Issue Last week (Monday, afternoon), we ran an Alter Procedure to change dbo.mySpToRead and it worked. Last week (Tuesday, late morning), we ran an Alter Procedure again to change the same dbo....
DBASurvivor's user avatar
2 votes
2 answers
788 views

SQL Server: How to query data between linkedservers, with index visibility to both?

I'm green with linked servers so forgive some of my nomenclature ignorance. But my understanding & experience is that it's far more efficient to query a table on the server itself vs. a remote ...
user45867's user avatar
  • 1,683
0 votes
1 answer
57 views

Why does this seemingly equivalent SQL have such vastly different run times? [closed]

A little set up: I have a SQL Server, and that SQL Server has a linked server connection to an Oracle database. All the queries presented here are being run in SSMS against the SQL Server (and from ...
Sam Axe's user avatar
  • 183
0 votes
0 answers
67 views

Append Data from 1 Table to Another with Image Column Across Linked Server

MSSQL - I am trying to append data from Table 1 that doesn't exist in Table 2. The tables have the same columns. One of the columns is image format and is not 'comparable'. Table 2 is across a ...
tjking45's user avatar
0 votes
0 answers
101 views

My linked server from as400 disconnects every time SQL Server is restarted

Every time I restart SQL Server, my linked server which is linked with AS400 gets disconnected. Every time it gets disconnected, I simply refresh the provider and I'm good to go. But, sometimes if I'm ...
user avatar
1 vote
1 answer
455 views

ETL table from one SQL Server to another SQL Server

I would like to ETL a table from one instance of SQL Server to another instance of SQL Server. I do not want to create an SSIS package. I have tried to extract the data using an External Table on the ...
xhr489's user avatar
  • 819
0 votes
1 answer
213 views

Unable to remove local login for linked server

I have added a linked server that was working fine. After this I added a local login to within properties > security on the linked server. After doing this I get an error when trying to run a query ...
chrispykill's user avatar
9 votes
2 answers
932 views

Why SQL Server scans all rows when updating bit column even for primary key via linked server

I am using simple update statement for specific primary key for SQL linked server as follow UPDATE t SET processed = 1, processed_on = GETDATE() FROM [LINKED\SERVER].DATABASE.dbo.FileQueue t ...
supervisor's user avatar
0 votes
1 answer
1k views

Server 'repl_distributor' is not configured for DATA ACCESS

I have enabled my repl_distributor linked server for data access in both publisher_server and distributor_server. Both servers are also configured to allow remote connections On both servers I have ...
Marcello Miorelli's user avatar
0 votes
0 answers
228 views

T-SQL: Slow performance on Stored Procedure Sending Data to LinkedServers

I am new to T-SQL and I am facing an issue with a slow processing stored procedure. The purpose of this procedure is to transfer table data from child databases up to their corresponding parents. The ...
Drees's user avatar
  • 11
0 votes
1 answer
239 views

Allow external users to access my DB through Linked server

What do i need to configure to allow external users from different domain to access a few tables in my SQL DB? I've created in the past a connection to external linked server by one of our clients who ...
SAKA UK's user avatar
  • 100

1
2 3 4 5
13