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

Create linked server with instance name that contains special characters using c#

I have a stored procedure that creates a new linked server. The problem is that my InstanceName is "my-pc" (contains "-"), and therefore the LinkedServer is not generated correctly. My guess is that there is a problem in the way I pass the…
Inbal
  • 909
  • 2
  • 28
  • 46
0
votes
0 answers

able to connect to linked server but i cannot select from any table

I have a linked server to a pervasive sql 11 database from my sql server 2012 64bit using ODBC I am able to see the databases on this server, but when I select * from any table I am getting this error: OLE DB provider "MSDASQL" for linked server…
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
0
votes
0 answers

"Data source name not found" when adding linked server

I am trying to add a linked server to a sql server 2012 database using ssms 2012. the linked server is pervasive sql. here's how i am trying to do it: EXEC sp_addlinkedserver @server = 'kslap208', @provider = 'MSDASQL', @datasrc =…
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
0
votes
4 answers

How can "order by" change my results here? Using T-SQL, OPENQUERY, SELECT INTO

I have a scheduled AM process on SQL Server 2008 that imports data from Oracle using a linked server. I am overwriting the imported data from Oracle using drop table, then select into pattern Apparently, the presence of the "order by" affects my…
anon
0
votes
1 answer

Configure LinkedServer to FileStream in DataBase

Assume this Table in SQL Server 2008 that used FILESTREAM type: CREATE TABLE MyFsTable ( fId INT IDENTITY PRIMARY KEY, fData VARBINARY(MAX) FILESTREAM NULL, fName NVARCHAR(300), RowGuid UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL UNIQUE DEFAULT…
Saeid
  • 13,224
  • 32
  • 107
  • 173
0
votes
0 answers

Simple stored procedure with linked server select query inside works only once from .NET app

I am playing a few days with annoying problem with stored procedure with linked server usage. On the server I have shared DB. The server is running MS SQL Server 2008 EE sp3. As new user I cannot put images so I will try without So assume that I…
MartinM
  • 61
  • 1
  • 2
  • 6
0
votes
1 answer

MySQL: Selecting data from MS SQL Server

How do I select data from a MS SQL Server from MySQL? We have a system of linked server in SQL Server. I have also heard that you can do a linked server to Mysql from sql server. But I want to know the reverse. The mssql server is what we use mainly…
deostroll
  • 11,661
  • 21
  • 90
  • 161
0
votes
1 answer

How can define linked server to be accessible from every username?

I have a view in sql server 2008 that selects from a linked server. I am able to select from the view only if I open SSMS as administrator . If I do not open SSMS as admin and try to select from the view, I get the error unspecified error Here's my…
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
0
votes
0 answers

How to see Attunity drivers MSORA as a provider for SQL Linked Server

I want to see the MSORA driver for Attunity Oracle SSIS 1.2 drivers for SQL Server 2008. I have installed the x64 drivers, and installed the VC++ Redistributable Runtime before hand (as this seems to prevent some errors during installation)....But…
smackenzie
  • 2,880
  • 7
  • 46
  • 99
0
votes
1 answer

SQL Server Excel Linked Server Remote Server Execution Issues

This is the first time I've had to work with an Excel sheet as a linked server, and after a whole ton of struggling with it and solving one issue only to hit another I've decided to reach out. Long story short I have a SP that pulls data from an…
Steve
  • 355
  • 4
  • 15
0
votes
1 answer

Row cannot be located for updating

I'm trying to delete some rows from an events table using the following. DECLARE @PRODUCTION_ID int = 13811 DELETE openquery(TEST, 'SELECT p.id as production_id FROM EVENTS ev LEFT JOIN production_seasons ps ON ev.production_season_id = ps.id…
Abs
  • 56,052
  • 101
  • 275
  • 409
0
votes
1 answer

EXECUTE AS vs SELECT FROM linked server

I've got an Oracle server integrated with MS SQL as a linked server. Currently I'm working on the query optimization. I've found out that queries that written as following: SELECT colName1, colName2, .. FROM ORACLE.TBL_TBLENAME WHERE something…
Georgy Smirnov
  • 391
  • 3
  • 10
0
votes
2 answers

The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "DB_PROD_04" was unable to begin a distributed transaction

I have two servers: SQL_UAT_01 DB_PROD_04 Both of these servers have the same database name and same tables: SQL_UAT_01.Database_01.TestTable DB_PROD_04.Database_01.TestTable There is a trigger on each of these two tables. When the trigger…
JJ.
  • 9,580
  • 37
  • 116
  • 189
0
votes
1 answer

Catching Errors through a linked server with severity < 20

I've got a similar problem to this question: TRY CATCH with Linked Server in SQL Server 2005 Not Working I'm running this try catch: Declare @command nvarchar(100) SET @command = 'SELECT column FROM table' BEGIN TRY BEGIN TRY …
sixshift04
  • 329
  • 4
  • 8
  • 19
0
votes
1 answer

Query to Linked Server never stops executing

I have created a linked server in SQL Server 2005 to an Oracle DB. When I run a query, The query never stops executing, and never returns results. When I cancel the query, it never completes cancelling. I have to close the window to get it to…
Nathan DeWitt
  • 6,511
  • 8
  • 46
  • 66