Stack Exchange Network

Stack Exchange network consists of 175 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
49 views

Linked server returned message “Query timeout expired.”

We have two separate SQL Servers. On one server we have a data warehouse (DWH), on the other we have sales information database. Now on the DWH server there is an ETL job that collects the ...
1
vote
0answers
51 views

Database not showing in sys.databases over linked server

I have a query that I can run on my server (Server1) as follows: SELECT * FROM master.sys.databases WHERE name = 'MyDB' This returns a row. I have a linked server setup on Server2 which points to ...
0
votes
0answers
16 views

SSIS DB issues when trying to run Package from SSISDB to getch ADO directoty users list

I am working on task that involves using Dev server to fetch ADO directory user information. I am connecting through SQL script i Script task and passing my User authentication. This is working fine ...
0
votes
1answer
17 views

enable the data access for the current server - is this operation logged somewhere?

I have a similar question related to the same subject: security concerns over enabling data access for the current server BEGIN TRY PRINT @@SERVERNAME PRINT DB_NAME() PRINT 'enable the ...
2
votes
1answer
27 views

Microsoft Sql Server - How to replicate a table from Linked Server?

I have an Origin Database - #1 with very restrictive access due to security. I provisioned a new Windows desktop machine with Microsoft Sql Server Management where I created a local database with all ...
1
vote
0answers
58 views

SQL Linked Server Connection Success but simple query returns Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

I linked a SQL Server in Management Studio and when I test the connection, I do get "the test connection to the linked server succeeded." However, when I try to run a simple query, I get a message ...
0
votes
1answer
36 views

Using Linked Server to store data

I have a linked server setup on my source production server. I also have a secondary server which is the linked server. What I was looking to do is to execute a stroed proc and log connections to the ...
1
vote
1answer
21 views

FILEPROPERTY not working over linked server to Azure SQL Database

FILEPROPERTY (Transact-SQL) is not working with a linked server pointing from a on-Premise SQL 2017 to a Azure SQL Database. I see the following comment in books online: Returns NULL for files that ...
0
votes
1answer
33 views

Missing data in SQL Server

I need to find the data that is present in Oracle, but missing from SQL Server. I have tried the below query, but am getting the following error: The multi-part identifier "PS.TXN_ID" could not be ...
1
vote
1answer
41 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
31 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
31 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
18 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
103 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
80 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
106 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
19 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
76 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
50 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
345 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
43 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
78 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
25 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
20 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
98 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
38 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
43 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
181 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
99 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
112 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
26 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
323 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
254 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
1k 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
228 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
128 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
498 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
115 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
128 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
506 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
285 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
51 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
123 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
53 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
43 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
58 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
367 views
-1
votes
1answer
428 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
250 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'...