Blog Post

Azure Database Support Blog
1 MIN READ

Lesson Learned #87: Connecting from SQL Server 2008/R2 to Managed Instance using Linked Server.

Jose_Manuel_Jurado's avatar
Jun 01, 2019

 

 

Hello Team,

 

As you know, the support of SQL Server 2008 and SQL Server 2008 R2 is approaching to the end and some customers are using Linked Server to connect to Azure SQL Managed Instance for sending or retrieving data. We found a particular error message here and we explain how to fix it.

 

In this situation our customer tried to send data from SQL Server 2008 to Azure SQL Managed Instance using linked server but they got the error messages at the moment of the definition, using multiple providers Microsoft OLE DB Provider for SQL Server or SQL Server Native Client 10.0

 

  • Server name not found
  • Server name needs to be the same in the connection string
  • Server name cannot be determined. It must appear as the first segment of the server's dns name). etc..

 

 

The workaround used to be able to connect was specifying the connection string of Azure SQL Managed instance in the provider string section of the linked server definition without password parameter.

 

Enjoy!!!

Published Jun 01, 2019
Version 1.0

1 Comment

  • TonyCampney's avatar
    TonyCampney
    Copper Contributor

    I'm trying to do this as well but failing.  Any chance you'd be able to provide the details that worked in a format similar to below?

     

    EXEC sp_addlinkedserver
    server='xxxxx.yyyyyyy.DATABASE.WINDOWS.NET', --'FM-SQLSERVER01-PCC-SQL.C93B3B3DA95B.DATABASE.WINDOWS.NET'
    @srvproduct='',
    Provider='sqlncli',
    @datasrc='xxxxx.DATABASE.WINDOWS.NET',
    @location='',
    @provstr='Server=tcp:xxxxx.yyyyy.database.windows.net,1433',
    @catalog=NULL


    EXEC sp_addlinkedsrvlogin
    @rmtsrvname = 'xxxxx.yyyyyyy.DATABASE.WINDOWS.NET',
    @useself = 'false',
    @rmtuser = 'user',
    @rmtpassword = 'password'

    EXEC sp_serveroption 'xxxxx.yyyyyyy.DATABASE.WINDOWS.NET', 'rpc out', true