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
-1
votes
1 answer

Unable to transfer data between 2 SQL servers on the same network

I am trying to transfer data from one server to another as a one off exercise, I've setup the linked server but I am still having an issue with identity fields SET IDENTITY_INSERT Regions On INSERT INTO Regions SELECT * FROM…
Weiz_ell
  • 3
  • 6
-1
votes
1 answer

Get SQL Server remote procedure result

I have 2 SQL Server 2005, I want to pull data from A to B. I execute this code on B.: create table #res ( ValueID int, [Timestamp] varchar(32), RealValue float, Quality int, Flags int ); insert into #res(ValueId, [Timestamp],…
Zui
  • 147
  • 1
  • 12
-1
votes
1 answer

Consequences of using a Linked Server in a View

I know how to create and use a linked server with in a view, but my question is does having a linked server in a view hold the connection open and use the whole time or is the linked server only accessed and used when the view is used? I am working…
-1
votes
2 answers

Creating a linked server in SQL Server 2008 to Progress Open Edge 10.1C via ODBC?

I have a working ODBC connection to a Progress Open Edge 10.1C server (when I click "test connection" it passes) How can I create a linked server in SQL Server that uses the ODBC connection? I have tried but get this error message: I'm using SQL…
JK.
  • 21,477
  • 35
  • 135
  • 214
-2
votes
1 answer

ERROR [37000] [IBM][CLI Driver] CLI0118E Invalid SQL syntax. SQLSTATE=37000

I have a simple SQL statement query that is executed as command from C# code. It is targetting DB2. I created variables for the server/schemas as follows. It throws error. private const string DB2Query = @"SELECT Name as Name FROM…
Jasmine
  • 5,186
  • 16
  • 62
  • 114
-3
votes
1 answer

SQL Alter Sequence on remote server

On SQL Server, I'm trying to alter sequence on a remote server using this: ALTER SEQUENCE SeverName.DbName.sys.SeqName_sequence RESTART WITH 1000; Unfortunately, this does not work. Does anyone know if this is possible and the correct syntax?
Pat Hall
  • 9
  • 1
-3
votes
1 answer

Syntax error trying to use a variable in my query on a remote server

I want to query MySql database in MSSQL using linked server however I keep getting this error: Msg 102, Level 15, State 1, Procedure uspGetTimeLog, Line 16 Incorrect syntax near '+'. Here is the sql code below SELECT * FROM OPENQUERY([MYSQLCONN],…
Tund Dunt
  • 3
  • 3
-3
votes
2 answers

Must declare the scalar variable @Table when using Linked server EXEC

I'm trying to execute a EXEC connecting a Linked Server, but it does not working using a table variable. Is there any fix for that? My code: DECLARE @Table TABLE( ID VARCHAR(8), DATA DATE, DIA VARCHAR(2), MES VARCHAR(2), ANO…
saulob
  • 615
  • 1
  • 10
  • 25
1 2 3
99
100