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

SQL DB2 sql error INCORRECT SYNTAX

What am I missing in this code below that will cause the error: Msg 170, level 15, line 113 line 113: Incorrect syntax near 'actual_completion_date'. update #Loss_mit_step set [STEP924_COMPL_DATE] = Case when step_code ='924' then…
JMS49
  • 263
  • 1
  • 8
  • 18
0
votes
1 answer

DB2 error on TSQL

I am getting this error: [OLE/DB provider returned message: [IBM][CLI Driver] [DB2 / linuxx8664] SQL0206N "LS_SCHEDULED_DATE" is not valid in the context where used. SQLSTATE=42703) OLE DB error trace [OLE /DB Provider 'MSDASQL' IColumnsInfo:…
JMS49
  • 263
  • 1
  • 8
  • 18
0
votes
1 answer

Missing Linked Server Provider on SQL Server 2014

I need to create Linked Server to MS Analysis Services, but my server does not have this provider installed. How to install it? Can't find any article about this.
DNac
  • 2,663
  • 8
  • 31
  • 54
0
votes
1 answer

sp_reset_connection error in SQL Azure Linked Server RPC

I have a problem calling a remote Stored Procedure (RPC) on my SQL Azure, passing through a Linked Server (build on a Sql Server 2008 R2 instance: 10.50.2550.0 - x64 - Enterprise Edition). This issue is not difficult to reproduce, and it's not…
MAXE
  • 4,978
  • 2
  • 45
  • 61
0
votes
1 answer

Lnked server in sql azure db

I have read many articles but i cannot be confirmed if linked server is supported in SQL Azure DB(PAAS)environment? I read somewhere that it is applicable only in hybrid environments. Can anyone please confirm if linked server can be used with…
devdey
  • 24
  • 3
0
votes
0 answers

Can't select column name from Eloquence database that has a forward slash in it (from a linked server in SQL Server)

My SQL Server instance has a linked server to an Eloquence database. I need to select data from one of the tables in the Eloquence database, but I need to do it with SQL syntax, since I'm running the code from SQL Server Management Studio…
Stan Shaw
  • 3,014
  • 1
  • 12
  • 27
0
votes
0 answers

Insert statement to update destination database using linked server

I'm trying to insert/update all the 25 tables in destinationDB in SQL Server 2014 from sourceDB which is on SQL Server 2000 based on the recid. I saw few examples on single table insert using the linked server. Can I update/insert all the tables in…
0
votes
1 answer

sql linked server 2008 with sybase 15.5 limits rows to 100

The following query always gives a resulset of 100 records (although there are many more). select * from openquery (SybaseLinkedServer, 'SELECT F1, F2 FROM db.dbo.table where F1 in (120, 125, 126, 127) and F2 in (4,6,8)') I tried to add TOP 10000…
0
votes
1 answer

SQL Server Linked Server Issues

I have installed SQL Server 2000 on two different laptops (laptop 'A' and laptop 'B'). 'A' should connect to 'B' after creating a linked server connection on 'A'. This step goes well but when I open the query analyzer trying on 'A' to do a select…
Bilal Harb
  • 29
  • 6
0
votes
3 answers

Update linked SQL server with parameters

I have two linked SQL servers and i am trying to issue an update on the other server but am getting an error "Statement(s) could not be prepared.", followed by "Must declare the scalar variable "@Shipper_Nbr"" The syntax i am using is: update…
Josh
  • 1,001
  • 9
  • 18
0
votes
2 answers

Linked Server Query Runs But Doesn't Finish?

June 29, 2010 - I had an un-committed action from a previous delete statement. I committed the action and I got another error about conflicting primary id's. I can fix that. So morale of the story, commit your actions. Original Question - I'm trying…
Clint Davis
  • 451
  • 1
  • 12
  • 29
0
votes
1 answer

How to update linked table column from local SQL Server table

I have a local SQL Server table and a remote linked MySQL table. I need to pull email addresses from the local table to update the remote. This T-SQL statement works for a single update: UPDATE openquery(SKYCOMLINK2, 'select tng_id, tng_account,…
Xi Vix
  • 1,381
  • 6
  • 24
  • 43
0
votes
1 answer

How make use of Bulk Insert API?

I have a pair of linked SQL servers: ServerA and ServerB. I have the following statement I wish to execute: INSERT INTO [ServerB].[data_collection].[dbo].[table1] SELECT * FROM [ServerA].[data_collection].[dbo].[table1] However, as I was informed in…
Karasu
  • 15
  • 5
0
votes
1 answer

Stored procedure taking Backup of data files stored on a linked server

I have a stored procedure which will be taking backups of data files stored on linked servers on the same linked server. The linked server name is retrieved from a table for each company. So the linked server name is saved in a variable. So in my…
0
votes
0 answers

How to use OpenDatasource() to connect to a remote SQL Server?

I want to SELECT some data from a remote SQL Server database which has "Ad Hoc Distributed Queries" enabled. The remote server is not a linked server to my local instance and its not in my ODBC data sources. I didn't think it had to be…
volume one
  • 6,800
  • 13
  • 67
  • 146