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

Calling view on linked server from a stored procedure in another database

I'm calling a stored procedure from asp.net using a connection string that grants me permissions to the database containing the stored procedure. This stored procedure though tries to call a view that is located on a linked server, resulting in a…
-1
votes
1 answer

SQL Server linked database: Insert does not happen on local table after writing to certain remote tables

I have the following code: CREATE PROCEDURE [dbo].[USER_ARC_EXPORT_$sp] AS DECLARE @errmsg VARCHAR(255), @errno INT, @next_batch_id NUMERIC(12,0), @object_name NVARCHAR(255), …
SRev
  • 39
  • 7
-1
votes
1 answer

How to restore backup form one linked server to another linked server using C# SMO

Want to restore a database backup from linked server A to a database located on linked-server B using C#. prefer to use SMO. I can restore from my local backup to local machine. { conn = new ServerConnection { …
Farbod
  • 1
  • 2
-1
votes
1 answer

Unable to convert field data-type

I am reading the contents of a field from a linked server with an openquery statement without any problem. The field's data type is char(1). However if I try to convert to a different data-type, the openquery fails. Neither of the statements…
Leon
  • 1
  • 2
-1
votes
2 answers

SQL server linked server to SAS(Statistical Analysis System)?

has anyone ever been able to create a sql server linked server to SAS? I have created an ODBC connection (32bit) to SAS This ODBC works for e.g. QlikView, Tableau etc.. but how would set it up for SQL server? Provider? Product name? Data…
Nils
  • 516
  • 3
  • 9
  • 33
-1
votes
1 answer

How to insert to multiple table from a linked server view?

I am new to sql and hope anyone can help me with this question. we have a local database called HR-Master and a linked server called SPU . There is three tables in our local database namely EMP, REMEMP and EMPIC and one view created from the…
aryan
  • 49
  • 6
-1
votes
1 answer

How to add linkedserver in MSSql with MySQL

I have situation where my SQL Server installed in one of the server and MySql is installed in my local machine. i need to add MySql as linked server to MSSql. Because i need to query the MySql database from open query property of MSSQL. I need to…
Nandish Hosmane
  • 107
  • 2
  • 18
-1
votes
1 answer

Trigger definition is NULL when using Linked server

Following is the problem I am facing:- When I run folllowing on ServerA, I get output SELECT tbl.Name, tr.name, c.Text FROM sys.sysobjects tr Inner Join sys.sysobjects tbl On tr.parent_obj = tbl.id Inner Join…
-1
votes
1 answer

SQL-Server - Access Linked Server (Cannot initialize the data source object)

I am currently configuring a linked server connection between Microsoft SQL-Server and a Microsoft Access database in our network. To make things easy, I saved the Access db locally and tried to configure the linked server. First I created a…
-1
votes
1 answer

Using CTE vs direct query From Linked Server

I am trying to refresh some tables in our data warehouse from the live production database and I am using Merge (for transactional tables that change data per record) and Insert (for historical/log tables). I am curious to see what is the difference…
-1
votes
1 answer

Ms SQL OBDC Driver can't connect to MySQL Server

I set an OBDC Connector on my Microsoft SQL server to set up a linked server to a MySQL database. The driver worked fine, and has always worked, but just recently we upgraded the web server to an SSL connection and everything goes through HTTPS.…
Iqbal Khan
  • 363
  • 2
  • 6
  • 22
-1
votes
1 answer

Creating a linked server in SQL Server 2014 SSMS to remote DB2

I am running 64 bit SQL Server 2014 Express and have a 32 bit DB2 Express-C on the same machine. In the 64 BIT SQL Server can I create an ODBC connection to a remote DB2 system without having to install a local 64 bit version of DB2. If I could go…
I_AM_JARROD
  • 685
  • 2
  • 7
  • 20
-1
votes
1 answer

How to Use Joined Tables When querying a LinkedServer

I have a Linked Server LinkedServer1 I'd like to query using Joined tables. My query example: SELECT dds.Invoice_Tb.Store_Number, dds.Invoice_Tb.Invoice_Number, dds.Invoice_Detail_Tb.Invoice_Number AS Invoice FROM …
Shmewnix
  • 1,553
  • 10
  • 32
  • 66
-1
votes
1 answer

parse all the servers from sys.servers

Is there a nice way to parse through all the servers from sys.servers (Sql Server) and run the same query in each one? Maybe only the database will be different, but we can do without this detail. Let's suppose the database has the same name on each…
Janine
  • 293
  • 3
  • 6
  • 13
-1
votes
1 answer

Error in creating linked server

I have two SQL servers that both have a SQL login called "SQLAuditor" defined with the same password. I want to create a linked server where only that user can "make the jump" over to the other server. I try to do so through SSMS. On the security…
1 2 3
99
100