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
2 answers

Linked server naming issue for a two part table name

I have a table name like reports.datasetstatus, I am trying to query it using linked server with below query: select [status] from [server name].[database].dbo.reports.datasetstatus With this query, I am getting the below error. Max prefixes…
TheGameiswar
  • 27,855
  • 8
  • 56
  • 94
0
votes
1 answer

Use table data from different sql server in a .Net application

I need to run stored procedures that make us of tables from a different sql server. The "Linked Server" or distributed transaction feature has been disabled on one of the servers; Therefore the tables cannot be joined from within the sproc. One…
Aamir
  • 791
  • 3
  • 15
  • 28
0
votes
0 answers

Problems with SQL Server 2005 linked server

We are trying to set an excel file as a linked server. We have gone through not being able to use Jet, we have installed ace. We have tried setting the Excel sheet as a datasource and using MSDASQL. We have allowed "in-process" in setting We have…
Ian W
  • 385
  • 2
  • 10
  • 30
0
votes
1 answer

mssql express 2005 linked server Invalid object name

I have created linked server using first post in this site: http://www.sqlservercentral.com/Forums/Topic340912-146-1.aspx But I cannot work on from 5. Change the Properties of the Provider MSDASQL .There is no such thing as Properties in Right Click…
babboon
  • 683
  • 3
  • 20
  • 45
0
votes
1 answer

Linked server query performance

I am trying to run a query that retrieves data from remote oracle server and then checks if the data retrieved already exists in my database then I will remove it from results. SELECT DISTINCT col1, col2, col3, …
Mo T
  • 440
  • 2
  • 9
  • 30
0
votes
0 answers

SQL Server (2012) hangs when referencing Access database (2010) via ACE provider

My SQL Server 2012 server with several linked servers hangs when i try to add a linked server to an Access database using the ACE 12 provider. Once it hangs, SQL management studio stops displaying linked server catalog objects. I have enabled…
FistOfFury
  • 6,735
  • 7
  • 49
  • 57
0
votes
1 answer

Inserted Id in linked SQL Server

I have linked together 2 Microsoft SQL servers, let's call them LinkedServer1 and Server2. I am trying to insert data from the second one using an INSERT script with OUTPUT to obtain the auto-incremented id: DECLARE @newIdHolderTable TABLE (Id…
Germstorm
  • 9,709
  • 14
  • 67
  • 83
0
votes
0 answers

SQL Server 2000 RPC inside transaction

I have created a linked server to from SQL Server 2000 to SQL Server 2008 R2. And I am making RPC call inside a stored procedures as below. --successful without transaction execute sql2008server.DBName.dbo.sp_in_sql2008 @param1...,@paramn -- end…
0
votes
1 answer

Single SELECT with linked server makes multiple SELECT by ID

This is my issue. I defined a linked server, let's call it LINKSERV, which has a database called LINKDB. In my server (MYSERV) I've got the MYDB database. I want to perform the query below. SELECT * FROM LINKSERV.LINKDB.LINKSCHEMA.LINKTABLE …
ufo
  • 674
  • 2
  • 12
  • 35
0
votes
1 answer

insert data from Dynamic SQL

I have a dynamic sql statement that runs on a remote linked server. I can run the statement like this exec (@sql) at MylinkedServer The data comes back ok, but that's where the issue starts. I can't seem to do anything locally with the result…
ErickTreetops
  • 3,189
  • 4
  • 27
  • 37
0
votes
0 answers

varchar(max) equivilent in MySQL for T-SQL varchar(max) comparison

i have the following where clause WHERE ( target.sender_name <> source.sender_name ) target aliases a table in Microsoft SQL Server while source aliases an almost identical table on a MySQL Server linked via a Linked Server Originally i had…
Memor-X
  • 2,870
  • 6
  • 33
  • 57
0
votes
0 answers

Different execution plans for remote DELETE and INSERT / same JOINs

I'm working in an environment where data exists on numerous client databases and one by one is pulled into a central data repository via sql. To automate a testing process, I've written a really nice, streamlined push-button script that backups,…
0
votes
0 answers

SQL server, linked server error with open query

I can't figure out why I am getting this error on the open query line: "Could not find server 'Server_Name' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the…
Tony
  • 133
  • 2
  • 11
0
votes
1 answer

SQL server created linked server using catalog option

I am trying to create a new linked server. I am using provider as SQL Server Native Client 11.0 I have entered Product Name and Data Source If I create connection using these settings it works just fine. But I am trying to create a linked server…
kdnerd
  • 341
  • 3
  • 10
0
votes
2 answers

How can I select data in the same query from two different servers and databases from SQL Server Management Studio?

How can I select data in the same query from two different databases that are on two different servers, one DB2 Server and the other a SQL Server?
user2478694
  • 1
  • 1
  • 3