Questions tagged [linked-server]

Linked server allows operation to multiple server as one query.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Creating Linked Server Object to same instance

I'm trying to create a Linked Server Object back to the same SQL Express 2014 server instance (see below for the context), but I'm hitting the following error... Cannot initialize the data source ...
0
votes
1answer
37 views

Unable to use undeclared variable

DECLARE @LINKEDSERVER VARCHAR(20)= 'LS_CMT'; DECLARE @ODS_DBNAME VARCHAR(20)= ''; SET @ODS_DBNAME = DB_NAME(); DECLARE @OCS_DBNAME VARCHAR(20)= ''; SET @OCS_DBNAME = '...
0
votes
0answers
11 views

Linked server created but failed connection test

When creating the linked server I am choosing the "Be made using this security context" on the security tab and I am trying with a domain account which is failing. I could of sworn in the ...
1
vote
1answer
48 views

Query is failing

I am running a query from SQL Server 2019(64bit) SSMS to PostgreSQL on AWS through Linked Server. Other queries are working fine but this particular query is failing due to message column. My query is ...
0
votes
1answer
24 views

SQL Server Linked Server to Azure SQL using Azure AD

I am trying to set up a linked server from an on-prem SQL Server to an Azure SQL instance. The Azure SQL instance uses Azure AD for authentication. When we attempt the connection we get this error ...
0
votes
0answers
115 views

“New request is not allowed to start because it should come with valid transaction descriptor” using linked server

I have a simple query in a stored procedure that LEFT JOINs a local temp table with several tables across a linked server (the same linked server). This query is resulting in the following error: ...
0
votes
0answers
57 views

SQL Login can access Linked Server w/ impersonation, but Windows Login cannot

In SQL Server 2017 I have a Linked Server defined to use a fixed remote SQL Login for all local users. EXEC master.dbo.sp_addlinkedserver @server = 'RemoteServer', @srvproduct='SQL Server'; EXEC ...
0
votes
0answers
25 views

How to remove linked servers provider?

I installed an Oracle OraOLEDB.Oracle provider. Now I want to remove that provider from the list. How can I do that?
0
votes
0answers
33 views

OPENQUERY giving wrong result on linked server

I have setup linked servers on my SQL Server and choose Oracle as a linked server. SOMETIMES, When I run the query below under the SA username, I get different result. However when I run under my own ...
1
vote
1answer
48 views

SQL Server Linked Servers not connecting

I have configured linked servers with "connections will be made using the login's current security context", but can only make use of them when logged on to the server, not from another machine... ...
0
votes
0answers
27 views

ODBC convert postgres citext column in SQL Server linked server

I am trying to connect a PostgreSQL to SQL Server server as a linked server. On the SQL Server, I have installed the ODBC driver for PostgreSQL (psqlodbc_09_02_0100-x64). I created a system DSN to a ...
0
votes
1answer
29 views

views restored from backup in a different server referring to linked servers

I have 3 SQL servers X, Y, Z and 2 databases X.A and Y.B. There are (many) view in X.A that uses 4-level naming in their definition: SELECT ... FROM Y.B.SCHEMA.TABLE From this I infer that X ...
0
votes
0answers
18 views

How can we correlate linked server queries running to their source instance?

We have multiple versions of SQL Server from 2008R2 (I know) to 2016. There are many linked server queries. I'm trying to build a tool that will tell me the queries executing on a target server that ...
0
votes
2answers
94 views

Linked Server from On-Premise to Azure SQL Database

I am using: SSMS-18.4 SQL Server-SQL 2019 CU3 Windows 10 I was able to create a linked server successfully from on-premise SQL 2017 to the Azure SQL database without exposing my password. --Read ...
0
votes
0answers
44 views

MSSQL Express: linked server from Access database on network path

I run Microsoft SQL Server Express 64-bit version 14.0.2027.2 (X64) on Windows 10 Pro 10. I have trouble to set the appropriate network UNC path and other settings for the linked server. My ...
1
vote
1answer
42 views

Database diagram for linked server tables

I run Microsoft SQL Server Express 64-bit version 14.0.2027.2 (X64) on Windows 10 Pro 10. I created a linked server connecting tables from a Microsoft Access (mdb) database to Server Objects/Linked ...
0
votes
0answers
22 views

How to force SQL Server to write partial query set to table during select

I'm trying to run a select query to extract a data set from a linked server, to be stored on SQL server. It seems that SQL server is storing the rows of the partial data set in memory and writing it ...
0
votes
1answer
143 views

How to insert into temp table on Server A results from dynamic SQL open query stored proc call to remote server B via Remote Query showplan operator?

I have to call a stored procedure on server B from server A using open query via dynamic SQL, and insert the results into a temp table created on server A. I noticed in the execution plan, it's using ...
0
votes
1answer
35 views

How to have a fail-over resilient SQL Server view over linked mirrored database table

Say I have a set of servers with mirrored application databases and a set of statistics servers where a couple of the tables are exposed from the application database as views (with some tenant ...
-1
votes
1answer
143 views

Lock differences between Insert Into vs Select Into while using Openquery

Using SQL Server 2014. My DBA said I should be using Insert Into instead of Select Into when using Openquery because Select Into will create a lock on the linked server table. Is this true? linked ...
1
vote
1answer
65 views

Is it possible to force a query to ignore the server option “remote proc transaction promotion” so it doesn't promote remote proc transaction?

I have a specific query that executes a stored procedure on a remote linked server and inserts the results into a local temp table. I don't want it to promote a remote procedure transaction but I can'...
0
votes
0answers
21 views

Sql Server with S4 HANA linked server queries with table variables [duplicate]

This is a relatively simple question that may not have an answer, but I have a SQL 2017 instance that has a Linked S4 HANA server connected through the HDODBC drivers. I have done many OPENQUERY ...
1
vote
1answer
40 views

Linked server not working after AWS RDS failover

Linked servers created on AWS RDS to other instances is not working after RDS instance failover. Error we get is "An error occurred during decryption". This is similar issue reported, but no ...
0
votes
1answer
46 views

connect two sql server and import to CSV file (ETL)

I have two servers, both has a sql server . Let's say srv1 has a sql-srv1 and srv2 with a sql-srv2 , i want to get some informations within sql-srv2 but making requests from sql-srv1. my project is ...
0
votes
1answer
329 views

SQL Server add a linked server to postgres database

I am trying to connect a PostgreSQL to SQL Server server as a linked server. On the SQL Server, I have installed the ODBC driver for PostgreSQL (psqlodbc_09_02_0100-x64). I created a system DSN to a ...
1
vote
1answer
49 views

SQL Server linked server from on premises to SQL Server instance on Windows in Amazon EC2

I am trying to create a SQL Server linked server from on premises to SQL Server instance on Windows in Amazon EC2 (2 different domains) and getting: Login timeout expired. I am using sa account ...
1
vote
0answers
77 views

Does SQL Server 2017 Express support Linked Server connections to Oracle DB

Is there any restrictions with "Linked Servers" with SQL Server 2017 Express? Vs using SQL Server 2017 Standard. Only in regards to "Linked Servers".
3
votes
1answer
358 views

Column length error querying SQLite via SQL Server Linked Server

I am attempting to query SQLite to copy data into corresponding tables in SQL Server. This is the first stage of an ETL process I'm putting together. Windows 10 Pro, SQL Server 2017 Developer Edition,...
1
vote
0answers
808 views

What are the risks if you rename a server that hosts a named instance of SQL Server (2005) and skip updating the system metadata?

My apologies as this is the last SQL 2005 instance we have and it's pretty urgent or I wouldn't go through all this trouble asking. Questions What is the risk to leave things as they currently are, ...
1
vote
1answer
54 views

Storing linked server in stored procedure variable

I have following setup: Server 1: CGENMONOSAMP01 Server 2: CGENMONOSAMP02 I have Server 2 linked to Server 1 and link works, I can do queries like this on Server 1: SELECT * FROM [CGENMONOSAMP02]....
2
votes
2answers
260 views

Can the FORCESEEK query hint be used on tables being queried against on a linked server? (I.e. as part of a distributed query)

I have a query that uses the FORCESEEK hint and runs fine on the server where the database I'm querying lives. If I try to run the same exact query remotely from a different server (targeting the ...
3
votes
1answer
308 views

SQL Server Linked Server Best Practices - Step by Step

Hello and thanks for stopping by. I'm an accidental DBA looking for some guidance in creating Linked Servers the correct way. MS provides complete descriptions of the datatype and descriptions of ...
0
votes
0answers
398 views

Oracle Linked Server Issue

I am having a Linked Server from SQL Server 2012 to Oracle 11G. TNSPing and Test Connection to the Linked Server is working fine. But when using the Linked Server to run a stored procedure or when ...
1
vote
2answers
240 views

Oracle to T-SQL OPENQUERY special character conversion issues

I'm struggling to figure out where the character encoding issue on my Linked server may be coming from here. The ZPDT_PAT_ALPHA column should have a degrees symbol at the end, as shown by the DUMP. ...
1
vote
1answer
77 views

Best way to speed up a linked server query - 49 columns plus two calculated columns and 170 mill rows

I am trying to speed up at linked server query. The source table has 170 mill rows, and we need to retrieve all of them. Trying to insert this query in a table on destination server takes over 2 ...
3
votes
1answer
587 views

Linked Server: An error occurred during decryption

We're running a SQL Server instance on AWS RDS. I believe this is a 2017 instance. We also have a couple of Linux EC2 instances running SQL Server (not sure the version, but I assume 2017) Our RDS ...
2
votes
1answer
297 views

Linked Server Timeout - Not Queried

I have a job that runs for multiple regions across the globe. Depending on what region is running and what time zone it's in, the job might not run. It uses GOTO to get to the end and reports that it ...
0
votes
1answer
125 views

Linked server to DB2 table locks

I have a problem with a SQL linked server connected to a DB2 database on an AS400 IBM iSeries. I configured an ODBC connection from the ODBC Data Source utility. Once configured the ODBC, i created ...
1
vote
0answers
56 views

Check linked server database status registered in the DBConfig Database

I am working with the Code below to check all the entries in the XXX Database of all the databases linked to the instance Server- XXX DB _YYY However when i run the Code, it throws an error i ...
1
vote
0answers
37 views

Linked server in Sql Server 2014 invalid path

I am trying to create a linked server to foxpro tables using vfpoledb, but it gives me the error of "Invalid path or file name" when trying to put as source \\xxx.xxx.x.x\same_names\abc (xxx.xxx.x.x ...
0
votes
1answer
195 views

check linked servers database status

I want to find out if all SQL databases registered in the database XXX on the YYY instance are available on the respective linked server and if they are online or offline. I have the below Code, ...
0
votes
0answers
38 views

Linked Server using Impersonation fails SSMS GUI Connection test but sp_testlinkedserver succeeds

I have a linked server (Server B) set up on Server A with permissions set as follows: This means that there are five Windows Logins (of which my windows account is one) who can access the linked ...
2
votes
0answers
1k views

Linked server from Azure managed instance

I have my Managed Instance (MI) setup and can connect from SSMS on-premises. There is limited functionality this way (you only see databases and security) - so I have a VM in the v-net where I can ...
0
votes
0answers
94 views

Error if iseries table name is not qualified within openquery

I have a linked server to an AS/400 using the IMBDASQL OLEDB provider. I am avoiding hard-coding library names so the linked server's connection string includes: Default Collection=;Naming Convention=...
0
votes
1answer
595 views

Executing a stored procedure inside another stored procedure from a linked server

I'm having a problem and I don't know how to solve it, I have searched the web and found good advice but I can't work it out. This is the problem: I have a SQL Server instance running on my PC, and I ...
1
vote
2answers
665 views

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

We are planing to migrate an on-premises SQL Server db to AWS RDS SQL Server. My only concern is how can I create a linked server from AWS RDS SQL Server to on-premises SQL Server db? Is it possible? ...
0
votes
0answers
33 views

Linked server query fails when using an Alias after a schema change

Recently we added a new column [NewColumn] in a table [OurTable]. After that, a query from linked server referencing this table failed with error: The multi-part identifier "[OurTable].[NewColumn]"...
-1
votes
1answer
77 views

Query Plan for a linked-server query getting cleared from plan cache after every execution

I have linked server query which runs of a view created in the remote server. Whenever i run the query i can see that a Prepared plan gets created in the plancache. But that gets removed from the plan ...
2
votes
0answers
97 views

BulkAdmin Role Doesn't Work

There is a query that our BI team use. They can not execute the query because of the error below. Ad hoc access to ole db provider 'MSDASQL' has been denied. You must access this provider ...
0
votes
2answers
230 views

Performance of a linked server between two instances of SQL Server on the same virtual machine

I would like to set up log shipping between SQL Server 2014 (main) and SQL Server 2016 (secondary). The thing is I want to set the secondary DB in STANDBY. Unfortunalely this setup is not supported by ...

1
2 3 4 5
11