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

Access BO repository using SSIS or linked server

Does anybody know if it is possible (and how) to connect to BO repository from an "Microsoft tool"? I need to query the CI_INFOOBJECTS catalog. Ideally I would like to connect using linked servers or SSIS packages.
Diego
  • 34,802
  • 21
  • 91
  • 134
0
votes
0 answers

Fieldlength constraint when using linked server

I have a view in a Database that uses a Column that once had the length varchar 30 and is now updated to varchar 50. I can execute a select directly on the database and it returns the expected results. When I run the same query on a different server…
Mathias F
  • 15,906
  • 22
  • 89
  • 159
0
votes
1 answer

AD linked server query works on one server and fails on another?

I am getting the plain Jane list of users that I want to join to my apps security list of users. I am porting the db from one server to a new one, this code works in old and fails in new :) select * from OPENQUERY(ADSI, 'SELECT cn, company,…
SteveO
  • 477
  • 2
  • 9
  • 17
0
votes
1 answer

Access MSSQL Db from MYSQL

I have recently read a MYSQL DB in MSSQL via creating a linked server. Does it work the other way round? I need to read MSSQL DB from MySQL. Any Idea ?
0
votes
0 answers

Querying a linked SQLite DB in SSMS

I'm trying to use a SQLite database a linked server in SSMS. I've managed to get the ODBC driver installed and a linked server created, but I can't seem to find a way to get queries to work. I think it's just a matter of not understanding the proper…
Eric Andres
  • 3,417
  • 2
  • 24
  • 40
0
votes
2 answers

Insert error using Linked Server MySQL

I have created a linked server using ODBC driver with following provider string DRIVER={MySQL ODBC 5.1 Driver};SERVER=HOST;USER=uid;PASSWORD=pw;OPTION=3 My linked server is named MYSQL. If i do Select and UPDATE in that way it works right SELECT *…
Luigi Saggese
  • 5,299
  • 3
  • 43
  • 94
0
votes
1 answer

Retrieving list of tables from a linked server using odbc drivers

I have a linked server in SQL that uses ODBC drivers. If I already know the name of the table I want see I can retrieve it like so: select * from GPData..root.TableName The problem is that the only way I know to view all the tables available is to…
Brandon Moore
  • 8,590
  • 15
  • 65
  • 120
0
votes
1 answer

SQL Server passing tables Netezza

Just wondering what is best practice to achieve: We have stored procedure that runs in SQL Server and needs to do some calculations with a huge fact table to be stored on Netezza. The flow: Stored procedure will create temp tables on SQL Server…
harelg
  • 1
  • 2
-1
votes
0 answers

Linked Server with Oracle DATABASE 10g with SQL Server 2012 in Windows server 2008 64bit OR Windows Server 2012 64bit

I want to create Linked Server with Oracle DATABASE 10g with SQL Server 2012 in Windows Server 2008 64bit OR Windows Server 2012 64bit
-1
votes
1 answer

EXECUTE DYNAMIC OPENQUERY INCLUDE VARIABLE IN FUNCTION INPUT

I want to execute a function through a linked server in SQL Server. When I execute OPENQUERY, it runs successfully, but when I use execute @SQL, it throws an error. This code runs successfully: SELECT A FROM OPENQUERY([SERVER20], 'SELECT COUNT(9)…
-1
votes
1 answer

Speed up Linked Server Import

I have several processes that run nightly that imports data from a AS400 into SQL Server using Linked Server. Here is a sample: truncate table TABLENAME insert into TABLENAME ( BT_TID, BT_SEQ , BT_DES , …
-1
votes
1 answer

What could be the workaround to avoid the MERGE issue i.e. The target of a MERGE statement cannot be a remote table?

Copying data from one table to another both on different servers but similar structures. Ended up on this. declare @ClassIds table (OldClassId int, NewClassId int); merge into newDB.dbo.tblClasses as target using ( select …
-1
votes
1 answer

Update remote tables using linked server

I wanna update remote table with following code but I encounter this error: `Msg 208, Level 16, State 1, Line 12 Invalid object name 'f1'.` code: declare @temp table ( co_kargah bigint, code_ostan nvarchar(10) ) insert into…
Raymond Morphy
  • 2,464
  • 9
  • 51
  • 93
-1
votes
1 answer

How can I link a SQL Server on Windows Server to a SQL Server on Window 10?

I need to know some information if anyone can help because I'm new to this. I need to link a SQL Server running on Windows Server 2016 to another SQL Server on Windows 10. But I have no clue what tips I need to follow. I created an Active Directory…
Samaha Oum
  • 23
  • 1
  • 5
-1
votes
1 answer

COUNT(*) inaccurate on linked server query

I am running a query over a linked server in SQL Server to Oracle using the OraOLEDB.Oracle provider. When I run this query, I get a data set of 11,990 rows: SELECT * FROM OPENQUERY([ORA_LINK], 'SELECT * FROM DB1.MY_TABLE'); However, this COUNT(*)…
Paul
  • 3,725
  • 12
  • 50
  • 86