Connection string is not valid [87] when trying to connect to the managed instance through ODBC

Taha Souri 20 Reputation points
2024-08-20T19:50:53.5366667+00:00

Hello,

I have an issue connecting to the Azure Managed Instance through OBDC SQL Server Driver 18. The error message is posted below. I was only able to connect using two of the computers, which happen to be used be admins but could connect to it using non-admin users who have the other computers. I couldn't connect using any of the other computers in the company. I can connect through MSSMS, PowerBI, and Excel on all computers. I still need to connect through ODBC to continue working on the Access Databases connected to the on-premises (We are in a middle of database migration). I am using the public endpoint. I changed the TLS version on the Azure portal and it didn't make a difference. I tried different versions of the ODBC Driver (17, 18.3,18.4).

error message:

Attempting connection [Microsoft][ODBC Driver 18 for SQL Server]SQL Server Network Interfaces: Connection string is not valid [87].  [Microsoft][ODBC Driver 18 for SQL Server]Login timeout expired [Microsoft][ODBC Driver 18 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to tcp:adbggspublic.3729dfbe4356.database.windows.net,3342 . Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

Azure SQL Database
{count} votes

Accepted answer
  1. Oury Ba-MSFT 18,616 Reputation points Microsoft Employee
    2024-08-22T21:40:09.54+00:00

    @Taha Souri Thank you for sharing your solution with the community. I am happy the issue got resolve.

    Issue: I have an issue connecting to the Azure Managed Instance through OBDC SQL Server Driver 18. The error message is posted below. I was only able to connect using two of the computers, which happen to be used be admins but could connect to it using non-admin users who have the other computers. I couldn't connect using any of the other computers in the company. I can connect through MSSMS, PowerBI, and Excel on all computers. I still need to connect through ODBC to continue working on the Access Databases connected to the on-premises (We are in a middle of database migration). I am using the public endpoint. I changed the TLS version on the Azure portal and it didn't make a difference. I tried different versions of the ODBC Driver (17, 18.3,18.4).

    error message:

    Attempting connection [Microsoft][ODBC Driver 18 for SQL Server]SQL Server Network Interfaces: Connection string is not valid [87].  [Microsoft][ODBC Driver 18 for SQL Server]Login timeout expired [Microsoft][ODBC Driver 18 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to tcp:adbggspublic.3729dfbe4356.database.windows.net,3342 . Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections.

    Solution: Customer shared - "When copying the server name from the connection string from Teams it adds more invisible characters that probably have to do with formatting. I copied the server name to a sticky note then I copied it again into ODBC and it worked".

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.