Questions tagged [linked-server]
The SQL Server "linked server" feature makes it possible to execute commands, such as a SELECT statement, on a remote server.
1,497
questions
0
votes
0
answers
17
views
Stored procedure parameter and linked server [closed]
I had a client that was connected using a link server. They are using application. I gave them execution privilege but they can’t execute a sp. They are receiving an error of ‘the attempt by the ...
0
votes
0
answers
33
views
SSMS Linked Server from PostgreSQL query fails when adding WHERE clause
I have Linked server from PostgreSQL 12 to my SSMS and trying to join two PostgreSQL tables and insert the result to my table with the stored procedure.
The problem I have is when adding a WHERE ...
0
votes
1
answer
49
views
Table refresh from Azure SQL database to on-premise SQL Server database
I have a similar requirement but the other way. I.e I have a table in an Azure SQL database, which we need to copy data from the Azure SQL database to an on-premise SQL Server database. The table ...
1
vote
0
answers
74
views
Linked server to Synapse Spark tables: Poor performance. Any best practices? (Aside from don't use linked servers) [closed]
Old Linked Server Setup:
Linked server from SQL Server DB, to another SQL Server DB: Worked fine for its purposes.
New Linked Server Setup:
Linked server from SQL Server DB, to 2 Synapse DBs:
DB1 - ...
0
votes
2
answers
37
views
Azure SQL linked servers with VPN to DB2
I have a Azure SQL online SQL-database. How can I create a linked server to a DB2 server with a VPN (Fortigate).
I have checked some tutorials, but my SSMS does not have a folder "linked Servers&...
1
vote
1
answer
45
views
Linked Server to Synapse Spark Tables: Queries hang if join on a STRING column is present
Setup:
AzureVM. Azure VM running SQL Server 2022
LS_CSV: Linked Server to Synapse SQL Endpoint database, which itself has Views to CSV files in Spark
LS_Delta: Linked Server to Synapse SQL Endpoint ...
0
votes
0
answers
45
views
Created a linked server using hybrid connection to onprem SQL
I have a SQL managed instance in Azure that I want to make a linked server connection to a on-prem SQL using a hybrid connection.
Every time I try to connect I get a error. This is the error
Named ...
0
votes
0
answers
30
views
How to connect Linked-serwer using domain user
There are 2 mssql servers in the environment: SQL1 and SQL2.
There is a linked server from sql1 to sql2 using the domain user ad1 (ad1 has permission to read databases on SQL1 and SQL2)
There is an ...
0
votes
1
answer
35
views
Can I change a linked server connection, but keep the name the same?
On my SQL Server instance, I have about 30-40 stored procedures.
In those stored procedures, sometimes I call a table from a linked server something like.
Select *
From Picktickets P
Left Join [JMNYC-...
0
votes
0
answers
34
views
sp_testlinkedserver kills transaction
I am trying to validate if my linked server is up:
CREATE PROCEDURE [dbo].[GET_Validate_LinkedServer]
@LinkedServer NVARCHAR(50),
@Status BIT = NULL OUTPUT
AS
BEGIN
SET NOCOUNT ON;
...
0
votes
1
answer
66
views
Creating linked server between DWH and Azure
How do I create a linked server between DWH SQL Server (which is in a service providers environment) and MS Azure.
What type of settings must I make sure is on Azure and what is the string that I ...
0
votes
0
answers
87
views
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server - WIndows 11
I am unable to connect to an oracle linked server from SSMS 19.
Its working from another machine that similar configuration with SSMS18 but downgrading to SSMS is not working on the new machine. Can ...
0
votes
0
answers
18
views
SQL Server Linked Server is getting an old view definition
I have a linked server that I am able to run views on. I have one view in particular that when I run it, the wrong data is returned. When I run sp_helptext on the view to get the definition, the ...
0
votes
2
answers
330
views
Update to Linked Server via trigger fails, but works without trigger. Unable to begin a distributed transaction
I have a SQL Linked Server setup on server #1 to access server #2.
When I run an update or insert statement in SSMS on server #1 that changes data in server #2 it works.
Now I use the exact same ...
0
votes
0
answers
49
views
ODBC link server SQL Server and PG is slow
I am trying to query Postgres database from SQL Server linked by ODBC driver.linke
The issue is a sample query takes 30 minutes, even if it's one row it takes the same time.
SELECT *
FROM [...
0
votes
1
answer
116
views
Linked Server on SQL Server Managed Instance
I have SQL Server Managed Instance. Now I want to get data from on-premises SQL Server to SQL Server Managed instance through linked server on a daily basis.
The on-premises SQL Server has only ...
0
votes
1
answer
47
views
Can't insert into linked MySQL server
I want to insert a new rows into database in MySQL server from SQL Server Management Studio. To make it possible I've created a linked server in SMSS with this guide: https://www.sqlshack.com/how-to-...
0
votes
0
answers
61
views
Union All of one linked server in a With clause of query of one linked server
In a stored procedure, I have a few With clauses, of a query executed at linked server A:
DECLARE @myQuery VARCHAR(MAX)
SET @myQuery = 'SELECT * FROM (WITH
A AS (Select ... from ...),
B AS (...
0
votes
0
answers
35
views
Can i set SSAS multidimensional model data source a database in a SQL Server linked server?
I have a SQL Server linked server called [HJNSDATAENG.DW]. I have created a SSAS multidimensional project called rh_dw.
I want to set as my SSAS project's data source the database [warehouse] located ...
0
votes
1
answer
310
views
SQL Server: Use a CSV as a linked server
I need some help in configuring an SQL Server csv linked server. I already have an Excel linked server working without any problems, but each time I try to connect to my csv, I get varying error ...
0
votes
0
answers
400
views
SQL Server login failed on linked server
In my SQL Server version 15.0.4312.2, I linked another SQL Server same version. The servers are in the same Active Directory Domain.
Unfortunately, I get a lot of errors because apparently one server ...
0
votes
1
answer
107
views
An error occurred while preparing the query
An error occurred while preparing the query
SELECT SUBSTRING(UGB,1,9) as EntityCode, SUBSTRING(FUNCIONARIO/CREDOR DESCONTADO,1,9) as NRCId, SUBSTRING(FUNCIONARIO/CREDOR DESCONTADO,11,75) as CustName, ...
0
votes
2
answers
82
views
How can I execute a SQL script when the linked server connects successfully?
How to execute SQL script when the linked server connects success.
this script from other website.
but i didn't know how to insert query below the script when connection success.
----------------------...
1
vote
0
answers
92
views
SQL Server stored procedure accessing Oracle runs in Management Studio but not in Delphi client via ADO
We have a stored procedure running on SQL Server that exchanges data with an Oracle table, through a linked server, the versions of both products are at the end of this post.
In our stored procedure, ...
0
votes
1
answer
39
views
Iterate through list of linkservers while trying to execute SQL query as EXECUTE (@SQL) at [LinkServer]
I am trying to execute the below -
DECLARE @SQL nvarchar(max), @LinkServer nvarchar(200), @min INT=1, @max INT
drop table if exists #clients;
create table #clients (Id int identity(1,1), ClientName ...
0
votes
0
answers
103
views
Trigger to Fire Upon Insert, INSERT TO Linked Server - "No Transaction is Active"
I have been tasked with linking two servers and upon data being inserted into one table on one server, it should be replicated on the other. I am currently trying to do a test of this in a small table ...
0
votes
1
answer
287
views
Insert through Linked Server from Azure VM to Managed Instance - fails when app runs it, succeeds when I run it in SSMS
I am trying to insert into a table from an on-prem app, through a SQL Server 2019 instance running in a Azure VM (Windows), that has a linked server to an Azure Managed Instance. Due to <reasons I'...
1
vote
0
answers
77
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 ...
0
votes
1
answer
278
views
Create linkied server encrypted from sqlserver 2019 to 2008r2 using Microsoft OLE DB Driver 19 for SQL Server
I have som sql server 2008 r2 that I want to connect to
it have force encryption set to NO and some expired certyficate
Now, from new sql server 2019 I want to make new linked server connection
So, I ...
0
votes
0
answers
110
views
SQL Server adding linked server using alias name
I'm trying to add my RDS SQL server database as a linked server to my on-premises database.
The RDS is not publically accessible and is only accessible via ssh.
Below are the steps I tried:
I created ...
0
votes
0
answers
149
views
Can't truncate table in linked server [duplicate]
I'm trying to truncate table on remote linked server:
truncate table [REMOTE-SRV].[FL].[tmp].[reg];
However, I get the error:
Cannot find the object "reg" because it does not exist or you ...
0
votes
1
answer
92
views
Giving error erratically : SQLServer Linked Server through MySQL Connector ODBC 8.0.28
I have a linked server on SQLServer, pointing to a MySQL server, through MySQL Connector ODBC driver
There is a job, that run several steps, each one retrieving new rows from different tables. ( ...
1
vote
0
answers
116
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 mapping that mapping list is empty, and all goes thru 'Be made using this security context' and this works fine.
I can query this linked from any ...
0
votes
1
answer
67
views
LinkedIn Marketing API
How can we Identify which post we received a comment on a LinkedIn post using a LinkedIn API?
For Example ("We have 100 Posts on are linked page now I wanted to Identify out of 100 posts which ...
1
vote
1
answer
244
views
Where are SQL Server linked server located and is it one linked server per database?
I'm looking at SQL Server linked servers and want to understand is the linked server a logical concept based on configuration files or a physical implementation and does it reside on the same server ...
0
votes
0
answers
92
views
SQL server linked server to PostgreSQL create iddle connections on PostgreSQL DB
My situation: I need to query data from postgreSQL server to SQL server. I installed odbc driver from https://www.postgresql.org/ftp/odbc/versions/msi. In SQL server I set up linked server using odbc ...
0
votes
0
answers
64
views
How do I get our SQL Linked Server to run multiple queries
We have a linked server setup between two SQL servers (Server A and Server B). We have come across and issue recently when we run a query to modify a record on Server B from Server A. The query runs ...
0
votes
1
answer
204
views
How to create a linked server in Azure SQL MI to connect IBM AS400 i series
I want to fetch some data from AS400(IBM i series) from Azure sql Managed Instance. Currentlty I am not finding any solution to do that. Please suggest if there is any way to do this.
please help me ...
0
votes
0
answers
70
views
How can I handle multiple linked server definitions that point to the same dacpac in a SQL Project?
One of the things that bugs me about SQL projects is that there are perfectly legitimate scenarios than can be done on a database server than cannot be done in a project. The latest example of this ...
0
votes
0
answers
87
views
Statement executes but cannot be inserted to a temp table
I have an Oracle linked server A_STG to my SQL Server instance, I usually use openquery approach to get data from this linked server.
But in this case my openquery character limit exceeds 8000. Hence, ...
0
votes
0
answers
69
views
Create SQL linked server with a .net class (C#)
I have a program where I used "SQLConnectionStringBuilder" and it was quite easy and handy to do use.
Now, I would like to use the linked server class from Microsoft in order to create a ...
0
votes
0
answers
261
views
Update problem via OLE DB provider MSDASQL - Linked Server
i am trying to update table via OLE DB provider MSDASQL for a linked server.
Connection is working, select statments work without problems. Update also worked until now.
Linked Server: MYSQL DB - ...
0
votes
1
answer
111
views
MSSQL avoid multiple prefixes by using alias
I am using al lot of sql queries and tyred of typing the complete prefixes of
[LINKED_SERVER_ALIAS].[LINKED_SERVER_ON_LINKED_SERVER].[DATABASEPATH].[SCHMEMA].TABLE
No way to change the serverstructure ...
1
vote
0
answers
21
views
0 Have noticed the activity reports v2 api returns updated completions data after a delay may be like a day or 2 or in hours
0
Have noticed the activity reports v2 api (https://learn.microsoft.com/en-us/linkedin/learning/integrations/learning-activity-reports) returns updated completions data after a delay may be like a day ...
0
votes
0
answers
190
views
I'm using a Linked Server to pull data from Google BigQuery to SQL Server using the Simba Driver but larger recordsets kill my SQL Server service
I'm running SQL Server 2016 (13.0.5850.14) with a linked server connection to Google BigQuery using the Simba BigQuery driver v2.4.1.1009 (64 bit). I have multiple queries that I'm using to bring ...
0
votes
1
answer
242
views
Azure MI SQL Agent cannot use Linked Server
BACKGROUND
I have created a Linked Server on an Azure Managed Instance and secured it to specific logins only.
I have a SQL Agent job that wants to use the Linked Server.
QUESTION
How do I grant the ...
0
votes
2
answers
123
views
UPDATE Azure sql table fails from onprem sql server using linked server
I have an on premise SQL Server database that is the backend for our project management software, a Azure sql table that contains limited data used for reporting with power bi and a linked server to ...
0
votes
1
answer
122
views
How to add a where clause conditioning another database to OpenQuery linked server?
I am learning about linked server in sql server and I linked the oracle database in sqlserver and ran a query successfully against the oracle linked database as below:
SELECT *
FROM OPENQUERY(DB_ORCL,'...
1
vote
1
answer
208
views
Converted data with NUMBER in Oracle to NUMERIC in SQL Server with openquery
I have a linked server to Oracle database in SQL server and retrieve data to local SQL server database every day by scheduling, the problem is: one of the Oracle database column has holding number ...
0
votes
0
answers
339
views
Linked servers (MySQL in SQL Server) brings tables without columns
I have an instance running SQL Server 2014 Express Edition (64-bit Build 19044). I have the same machine running a MySQL server (innodb_version: 5.7.33, protocol version: 10, version_compile_machine: ...