Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [linked-server]

Linked server allows operation to multiple server as one query.

1
vote
1answer
30 views

Oracle linked server shows all tables from all schemas in sql server management studio

I have created a linked server to an oracle database ( 12c ) in sql server management studio. I am mapping the local user to a special remote user in the oracle db. Connection is working fine. The ...
1
vote
1answer
23 views

Linked Server Configuration using remote user logins

I'm trying to configure a Linked Server using remote logins reducing who has access to the linked server by taking advantage of the not be made option. For test purposes alone, I have used SA, ...
0
votes
1answer
29 views

SQL Server Linked Server sa [closed]

Should a linked server be created using the sa account as the security context? Why / why not?
0
votes
1answer
14 views

Linked Server - Map Windows Group to remote login

I have a MySQL server that I need to set up as a linked server in SQL Server 2014. I need a login from the SQL Server (which is a Windows group) to impersonate a username at the MySQL end. I can see ...
1
vote
0answers
36 views

Grant permissions over linked server

I need to grant select permissions to a sensitive table over the linked server. This table should only grant access to members of an AD group. I currently have other linked servers set up with remote ...
2
votes
3answers
60 views

Setting a variable from a statement that starts with EXEC

I am trying to get the Server Name from a LinkedServer and assign it to a variable. From this question (Get @@SERVERNAME from linked server), I found that either of these return the Server Name. ...
0
votes
1answer
42 views

SQL Server - Query Over Linked Server to IBM DB2 throws an error

We have a partner that uses a IBM DB2 iAccess database, which we connect to using a linked server on our SQL Server. It's been working great for a long time, but over the weekend they upgraded their ...
1
vote
1answer
16 views

Exist on table from linked Server giving Error 4104

I am comparing two tables on different Servers and the query I am running looks like this: Select top 100 * From [ServerA].[MyDB].[dbo].[Table1] Where Exists( Select * from [ServerB].[TheirDB].[...
1
vote
2answers
59 views

sp_blitzfirst results to table on a linked server

I have been all over looking for the solution to logging sp_blitzfirst results to table on a linked server. I see github posts where a contributor was adding this to sp_blitz, but that's been closed ...
0
votes
1answer
33 views

Apache Ignite as linked Server in SQLServer?

I tried to set up a linked server via ODBC connection in SQLServer. It seem to connect but showed all the caches as empty names in SSMS. Also I couldnt get a select query to work. Has anybody had any ...
5
votes
1answer
178 views

TLS 1.2 breaks SQL Server linked servers

As part of a recent security blitz we set up TLS 1.2 on all of our servers. Last night I flipped the "Force Encryption" flag on all of our SQL Servers and since then I've had a weird issue with linked ...
0
votes
1answer
38 views

Is it possible to limit the scope of a SYNONYM in SQL Server?

I have a series of scheduled stored procedures that need to be run against different databases that have identical schemas (think multiple instances of an application). So for instance, every database ...
0
votes
0answers
35 views

Can an Amazon RDS SQL Server link to an RDS MySQL server?

Amazon RDS for SQL Server supports linked servers, but the doc page only describes linking to other SQL Servers. I would like to link to an RDS MySQL instance, but this normally involves installing ...
0
votes
0answers
17 views

Unable to select the table result in linked Server

As I have successfully created the Linked Server in SQL Server 2012 SP4 with MYSQL Server. Some of the small tables record able to fetch from the MySQL Server. And some of the big tables records when ...
1
vote
0answers
17 views

Multiple queries to linked server (Access db) block Sql server

On a SQL server 2012 I've created a linked server pointing to Access database: It all works fine, unless we have more than one query to this server - queries that are not even related to the same ...
0
votes
0answers
52 views

Linked Server Provider Options - Do I need to restart the SQL service (or server) after modifying any of these options?

Under Server Options -> Linked Server there are the Providers that each of my linked servers use. If I right click on a specific Provider and modify the Provider Options, such as "Dynamic parameter" ...
0
votes
1answer
30 views

Linked Server along Oracle 32 and 64 bit Oracle Client

As we all know that to connect from SQL Server to Oracle we need to Install Oracle Client at SQL End. But since I am stuck in one issue which has made me wondered about how things work behind the ...
2
votes
1answer
38 views

Query involving TVF very slow on SQL Server 2008

I have a query that runs in under 1 second on SQL Server 2014. A similar query takes over 12 minutes when run against a table on a linked server running SQL Server 2008. I don't know if it's because ...
1
vote
1answer
131 views

Availability groups and Linked Servers

I have inherited an Availability Group and have found that a linked server was set up between the two nodes of the availability group. It is using sa for authentication unfortunately. Simultaneously, ...
0
votes
1answer
64 views

How do I allow non sysadmin accounts the ability to create/query linked servers in SQL Sever 2014?

I want to allow a non-admin account the ability to query a linked server. If I create a linked server with the following under a sysadmin account like below. EXEC master.dbo.sp_addlinkedserver @...
1
vote
0answers
65 views

View with OPENQUERY won't build in SSDT project

I have an existing database that I'm trying to set up as a database project. I'm not able to get the following statement to build: CREATE view [dbo].[VW_SOMEVIEW] as SELECT * FROM OPENQUERY ([...
1
vote
1answer
23 views

Is a @CATALOG argument required in linked server to connect to READ-ONLY secondary?

I have 1 primary and two secondaries. Node 3 is READ-ONLY. I created a linked server as follows (as described in Microsoft Docs): EXEC sp_addlinkedserver @server=N'Node3', @srvproduct=N'', @...
0
votes
1answer
194 views

Data Source connects but linked server cannot initialize data source object in MS SQL Server

I'm trying to create a linked server to an instance of MySQL. I've created a System DSN to the instance and that passes the connection test, but when I try to create a linked server using that data ...
1
vote
0answers
168 views

Linked Server transaction stopped by MSDTC

We've recently installed the newest Microsoft OLE DB Driver for SQL Server (msoledbsql) as it now supports multi-subnet failover capabilities (detailed here: - https://blogs.msdn.microsoft.com/...
2
votes
1answer
579 views

Could not complete cursor operation because the table schema changed after the cursor was declared

I get this error message occasionally when I execute a stored procedure that pulls information from multiple linked servers and aggregates the data. It looks similar to what I have below. DECLARE Cur ...
1
vote
0answers
134 views

Linked server from SQL server on AWS RDS to On premises Oracle database

We are planning to migrate an on-premises Microsoft SQL server database to AWS RDS SQL server. Everything is good except one roadblock, i.e this SQL server database has a linked server to on premises ...
1
vote
2answers
62 views

Running remote stored procedure with DDL locally

Sorry if my question is redundant, I searched Stack Exchange and the internet for hours but do not have a definitive answer to my question. Database: SQL Server 2017 + Azure The goal is to build a ...
3
votes
1answer
349 views

SQL Server 2016 Linked Server OPENQUERY Hangs

I've been trying to figure out this linked server problem for about a week now with no luck. The set up I have is a linked server from an instance of SQL SERVER 2016 to an instance of SQL SERVER 2016 ...
0
votes
0answers
81 views

MSOLEDBSQL Provider Linked Server

I've added the MSOLEDBSQL provider to our SQL Server 2012 server to try and create a link server that can use MULITSUBNETFAILOVER=true. The problem is creating a query, even a simple select, fails ...
0
votes
0answers
98 views

Way to link to Oracle DB from SQL Azure DB

We currently get data from our Oracle DB by creating it as a linked server from our on-premise SQL server database. We are considering moving to the Azure SQL and would still require data from on -...
1
vote
1answer
31 views

Total_worker_time over SQL 2008 linked server

I’ve come across a lengthy SP that is being recorded as generating a high amount of total_worker_time in sys.dm_exec_procedure_stats. (But I think it might be a red-herring) The SP contains cursors ...
2
votes
0answers
295 views

Very Sporadic Cannot initialize the data source object of OLE DB provider “SQLNCLI11” for linked server

OLE DB provider "SQLNCLI11" for linked server "001" returned message "Unable to complete login process due to delay in opening server connection". Msg 7303, Level 16, State 1, Line 19 Cannot ...
1
vote
2answers
221 views

Unable to update MySQL table from linked server on SQL Server 2014

I'm using SQL Server 2014, with a linked server to a MySQL database on AWS. I need to update rows on that linked server, using data that exists on another linked server. And if that wasn't complicated ...
0
votes
1answer
45 views

Creating logins mapping for a linked server without creating logins for AD users

We use windows auth, but we don't create logins for particular AD users. We create logins for AD groups and the users have access by being their members. I noticed that when I try to create a mapping ...
2
votes
0answers
122 views

why is update from a join containing zero records taking a minute and 20 seconds?

SQL Server 2008R2. I have a simple join that returns zero rows in less than a second. When I try to run an update on that join, it should also take less than a second but it is taking one minute and ...
0
votes
0answers
50 views

Make the linked server ask for password

Till today i am using the linked server with the user of sql having same username and password in both the servers. For now on i can not keep the 2 servers password same for some reason and i still ...
0
votes
1answer
34 views

Can a contained database SQL User be mapped to a remote user in a linked server?

Using SQL Server 2017 Standard CU8 on Windows Server 2016. I've create a contained database user (user defined only within a database with Containment type: partial) with type SQL user with password (...
1
vote
1answer
41 views

ORA 01861 error

I am reading a date from a linked serve and it returns the field in the datetime2 format. Here is my simplified query: select * from openquery(LinkedServer, 'select QCTL.INVC_HEADER.POST_DATE ...
2
votes
2answers
294 views
-1
votes
1answer
310 views

Oracle Linked Server in Azure SQL Database Managed Instance

I am migrating my On Premise SQL Server to Azure SQL Database Managed Instance. But I have linked server to Oracle database in my SQL Server. Can we create linked server to an On Premise Oracle ...
0
votes
0answers
135 views

Stored procedure runs fine manually but not as SQL agent job

I have a stored procedure that performs some data imports from a linked server. The linked server is on the same box as the main instance, it's just a different instance. The stored procedure runs ...
0
votes
0answers
203 views

LDAP linked server in SQL Server: what connectivity is required?

In an instance of SQL Server I have created a Linked Server for LDAP queries. EXEC master.dbo.sp_addlinkedserver @server = N'LDAP', @srvproduct=N'Active Directory Service Interfaces', @provider=N'...
2
votes
1answer
152 views

How do I encrypt data to be decrypted on a linked server? SQL

I have been searching for 2 days for the solution to this, but every solution does not apply to my situation. I have 2 SQL servers: DataServer and InterfaceServer set up as linked servers. DataServer ...
3
votes
1answer
800 views

Check if table exists on a linked server

I've had a search, but can't find a post relating to this instance specifically. We have a linked production database that I'm trying to reference from our 'sandbox' server. I want to check if a ...
1
vote
0answers
120 views

Secondary Replica Read-Only Routing via Linked Server working from one server, but not the other

I have been given the task of setting up a read-only linked server on ServerA to Availability Group listener ListnerX. ListnerX points to ServerY or ServerZ (ServerY is usually the primary). Read-only ...
0
votes
0answers
86 views

Linked server Informix driver mismatch error on driver and applciation

I tried to read all the questions here that has been asked before, but could not find any clue on my problem. I'm trying to setup a linked server to connect on INFORMIX server, I installed the driver,...
0
votes
0answers
215 views

SQL 2014 Linked Server Login Timeout

I'm having an issue where an application (MS Nav 2015) invoked query (Select) on occasion is receiving a login timeout. This issue happen sporadically, and the query itself is run at 15 minute ...
0
votes
0answers
27 views

linked server issue while synchronising logins between servers using T-SQL

I have been working on a solution to synchronise logins (using T-SQL) between 2 servers, or between AlwaysOn nodes, inspired by sqlsoldier. It requires a linked Server. this is a partial view of the ...
2
votes
1answer
103 views

Problem with data insertion in Oracle table from SQL Server table

We have SQL server and Oracle server, and have configured a linked server from SQL Server to Oracle. I'm trying to insert 10,000 rows from SQL Server into a table in Oracle. When I insert 100,000 ...
0
votes
0answers
152 views

Linked Server from SQL Server on Azure VM to On-premise Oracle Database

How to create a Linked Server from my SQL Server on Azure VM IaaS to an Oracle Database which is present on On-premise? Is it the same process as we create on on-premise SQL Server or what extra ...