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.

Use this tag for any questions related to SQL Server's linked server feature.

A linked server configuration enables SQL Server to execute commands against OLE DB data sources on remote servers. Linked servers offer the following advantages:

  • Remote server access.
  • The ability to issue distributed queries, updates, commands, and transactions on heterogeneous data sources across the enterprise.
  • The ability to address diverse data sources similarly.

An OLE DB provider is required for this functionality to work.

See MSDN for more information.

1493 questions
0
votes
1 answer

how to query linked server

I'd appreciate your help with this issue. I have a linked server pointing to an access database. But, when I want to query something from linked server I notice the following behavior: Intellisense doesn't recognize linked server name.…
Dani Aya
  • 133
  • 8
0
votes
0 answers

SQL Server 2012 Linked Server Connection Issue

I have a local SQL Server 2012, and a vendor has a remote SQL Server 2012 setup for us with a read only SQL user. The vendor will do nothing except provide this read only login. I can login and query with remote credentials all day long. But, when…
glitzsfa
  • 353
  • 1
  • 2
  • 14
0
votes
1 answer

Reading from Linked Server and deleting on local DB

I have 2 similar tables on different databases. I already linked the remote DB and set it's data access to 'True'. However I can't get the following query to work GO USE LOCALDB GO DELETE from [dbo].[TableA] WHERE [dbo].[TableA].[UniqueField] =…
Eton B.
  • 6,121
  • 5
  • 31
  • 43
0
votes
0 answers

Parameters user defined tabla type between linked server

I have two SP each one into database correspondingly, one Sp recieve parameters user-defined table types but doesnt work. Display the following error: The attempt by the provider to pass remote stored procedure parameters to remote server [linked…
Slinker
  • 379
  • 1
  • 4
  • 14
0
votes
1 answer

Linked Server Error for PDW

I am trying to connect to a PDW instance from an SMP server. The linked server is established and I can view the PDW databases from SMP. But when I try to select data from PDW, here's the error that I get: OLE DB provider "SQLNCLI11" for linked…
0
votes
0 answers

How to use linkedserver

How can I link two server using query in SQL? I want to remotely query the table of this Server (BL4/SQLEXPRESS) to my Server (BLSVR11). Can you show me how to do it in SQL? This is how I did it but it giving me an error.. EXEC…
0
votes
0 answers

join the local DB inside a pass-through query(openquery) on a linked server

I am querying a linked Oracle server from a local SQL Server instance using openquery. The issue is that I want to limit the results returned based on a table in the local DB (about 10k rows) while executing in the linked instance. Normally I would…
JWheeler
  • 320
  • 4
  • 14
0
votes
1 answer

Moving from 32-bit to 64-bit, how to make linked server (sp_addlinkedserver) work

Here is some sample code that worked fine in a 32-bit machine (SQL server 2005) and needs to be updated for a 64-bit... I know this is a common problem but have not been able to find how to fix it! DECLARE @sourceFile varchar(255), @testRows…
Amy
  • 23
  • 4
0
votes
0 answers

INSERT Using a SELECT Does Not Appear To Work for Top(n) Where 'n' > 1

I am using MS SQL Server 2014. For simplicity, suppose I have a linked server 'LinkSrvr' with database 'LinkDB', and table 'LinkTbl', as well as a local server 'LocalSrvr' with database 'LocalDB' and table 'LocalTbl'. Assume both tables have…
Eric
  • 53
  • 9
0
votes
1 answer

JDBC connection to linked server

I'm trying to connect from a Java application to a Linked Server I created with MSSQL Server. The URL string is jdbc:sqlserver://172.15.230.11 and the query is SELECT * FROM OPENQUERY(172.15.230.11,'SELECT * FROM myTable WHERE myCode =…
0
votes
0 answers

Informix Parser Stacks Full

I have established a linked database connection with AVAYA thru Informix and SQL server. And the connection works fine, also I have made web apps that gets data from it and moves it a mirror table so I can work with those data. I also made some apps…
0
votes
1 answer

Running query on a linked server

I have a local database server which has an associated sa account and on a cloud instance where we have another server I have added it to the local database server as a linked object. When I attempt to query on the database using the…
Jay
  • 3,012
  • 14
  • 48
  • 99
0
votes
2 answers

Microsoft SQL server: copy table from linked server to current database using a stored procedure

I am using Microsoft SQL server. the following code works if run from a QUERY: SELECT * INTO mydatabase.dbo.atable FROM linkedserver.sandbox.dbo.atable but it does not if inserted into a stored procedure: SET ANSI_NULLS ON GO SET…
user1536396
  • 489
  • 2
  • 7
  • 22
0
votes
0 answers

Linked server working with three dot notation, but not with 4 part name in SQL Server?

Linked server working with three dot notation, but not with 4 part name in SQL Server. For example: when I run SELECT top 1 * FROM [POSTGREFGH]...DEPARTMENT I am getting results, but when I try this: SELECT top 1 * FROM…
user3583912
  • 1,302
  • 1
  • 17
  • 23
0
votes
1 answer

SQL Server Linked Server, Error running query firebird

I'm doing a query on the firebird external database from SQL Server (2008, 2012). The server connects seamlessly to the linked server, but to consult the following error. ADDITIONAL INFORMATION: Object reference not set to an instance of an object.…
Carlos Lopez
  • 117
  • 2
  • 2
  • 9