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

Way to speed up an insert with left outer join

I am trying to figure out a way to speed up this query...as is it takes about 40 minutes. Inserts new rows not existing in a table of a linked server. INSERT INTO [remote.server.com].[DB].dbo.Table1( Id , Barcode , Name , Address , Address2…
sds
  • 61
  • 7
0
votes
0 answers

Unexplained declaration error on dynamic sql with output executed on linked server

I'm trying to get an output value from a dynamic sp_executesql query on a remote linked server for MS SQL Server, although the query works, I keep getting the following error running query for foo Must declare the scalar variable…
Vort3x
  • 1,778
  • 2
  • 20
  • 37
0
votes
0 answers

Access 2010 SQL query works fine by itself but not when linked to access db

Access 2010 inventory db of items (item, location, qty etc...). Linked SQL server 2005 tables of orders. I've created an Access SQL query to retrieve a list of items for a particular order number. This runs fine by itself, but when I add links to my…
0
votes
1 answer

How to create linked server from SQL Server 2014 to SQL Server 2012

I have two machines one is running SQL Server 2014 (Machine A) and the other one SQL Server 2012 (Machine B). Machine A has storage limitation and hence I decided to leave all databases on the Machine B so I can connect and use data from Machine…
Espanta
  • 1,080
  • 1
  • 17
  • 27
0
votes
2 answers

Query Syntax for linked sql server

please help: I'm new to linked servers & in MS SQL I have successfully added one (from an MS Access file) as shown: I'm having trouble querying this database here. What is the syntax? Thanks.
Chagbert
  • 722
  • 7
  • 16
0
votes
0 answers

Insert row in Excel from linked server at a specified row number

I need to be able to insert a row in an Excel file at a specific row number. So far, I have the query: insert into OPENROWSET ('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=C:\Test.xls;','SELECT * FROM [Feuil1$]') SELECT * FROM…
Dominic
  • 159
  • 1
  • 3
  • 13
0
votes
0 answers

DbContext can’t insert records on a synonym in SQL

when we call SaveChanges() from DbContext to insert record it will check scope_identity to get row affected and return it, every things is ok, but if we use with link server and synonyms because scope_identiy is local and scope_identiy will return…
0
votes
1 answer

Executing an Alter Table statement generated by dynamic sql to a Linked Server

I have a situation that I need to add a field to a table over linked server. The specifications of this is dynamic and it is being done in TQL / Stored procedures and this can not change. My code is generating the statement just fine and if I copy…
0
votes
1 answer

Linking SQL Server 2014 to Informix Database Results in Architecture Mismatch

I am having quite an issue trying to create a linked server in SQL 2014 to Informix. I have downloaded the IBM Informix SDK 4.10 FC2. This allowed me to create a 32 bit ODBC in the 64 bit ODBC tool and I was able to register the ifxoledbc.dll with…
BrookeM
  • 11
  • 3
0
votes
1 answer

How to Link to sql server DB Which itself is linked to another sql server

the issue: We have a Db named for example 'DBUni' and 4 SQL servers In various cities Server1 is connected to Server 2 Server2 is connected to Server 1,3 Server3 is connected to Server 2,4 Server4 is connected to server 3 Problem: We have to have…
Hamid Shoja
  • 3,838
  • 4
  • 30
  • 45
0
votes
0 answers

Write in Excel spreadsheet from SQL Server linked server

I have a client who has a huge Excel file. They absolutely want to continue to work with this file. They asked us if we can update data in the file from a PocketPC. I created a linked server to the spreadsheet: EXEC master.dbo.sp_addlinkedserver …
Dominic
  • 159
  • 1
  • 3
  • 13
0
votes
1 answer

Updating remote view with dynamic value throws an error

I have an updatable view (vwItem) being accessed via a linked server ([sql\dev].) When I update the view with a static data, the underlying table gets updated. UPDATE ci SET CertifiedNumber = '44444' FROM [sql\dev].contact.dbo.vwItem ci…
dance2die
  • 35,807
  • 39
  • 131
  • 194
0
votes
0 answers

SQL Server Query to oracle

We have developed a set of operational reports long back ago based on the SQL server , Currently we have added a third party source which has Oracle as source and we need to modify our existing SQL queries to pull the partial data from oracle as…
NEO
  • 46
  • 4
0
votes
2 answers

Setting up a linked server to another server which isn't in a domain without using SQL authentication?

Server A (SQL2005) is in our primary domain, but server B (SQL2000) is just in a windows workgroup. We are not allowed to join it to the domain, or bad things happen... We also can't enable SQL authentication on server B. We've got domain…
CodeRedick
  • 7,346
  • 7
  • 46
  • 72
0
votes
1 answer

Linked-servers SQL Server 2012 permission?

I am trying to understand the linked-servers in SQL Server Studio 2012 that I am using to develop a big report. I have looked through some of the post but I didn't see anything related to permission or how to do it with non-default instance servers…
Thao Lil'
  • 17
  • 1