0

We have a Sage Line 50 Reports application located on one of our servers. This has been setup on our server as ODBC System DSN (Screenshots attached)

Now Im trying to set up a linked server from this SageLine50 to SQL Server Express 2019 using the following programatically:

EXEC sp_addlinkedserver

@server='SageLine50Reports',

@provider='SQLNCLI',

@datasrc='ChrisSQL,1433',

@catalog='SageLine50Reports',

@srvproduct='';

GO

So catalog refers to the System DSN created which is SageLine50Report

I then add a user to this linked server.

Now, I then refresh my linked servers and see the SageLine50Reports linked server (see attached screenshot)

However when I try to connect to it, I get the following error message:

Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

TCP Provider: The wait operation timed out.

What am i doing wrong here?

enter image description here

Samuel Lelièvre
  • 3,212
  • 1
  • 14
  • 27
ChrisAsi71
  • 41
  • 4
  • Just a guess but you probably need to provide some authentication username/password. According to [this search result](https://help-sage50.na.sage.com/en-us/2019/Content/Getting_Started/COMPANY/Connecting_to_your_data_using_ODBC.htm) you should use 32-bit odbc DSN and the username is always "Peachtree" – Stu Jul 13 '22 at 15:04
  • Guessing some more: you probably need a 64-bit DSN, and you should probably use the newer MS ODBC driver, rather than SQLNCLI. See also https://www.sqlshack.com/how-to-configure-a-linked-server-using-the-odbc-driver/ – Charlieface Jul 13 '22 at 15:06

0 Answers0