appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 64 forks source link

Connecting to SQL Server on Ubuntu2204 #3914

Closed Bartleby2718 closed 3 months ago

Bartleby2718 commented 3 months ago

What is the right data source to use when connecting to SQL Server ~2019~ 2017 on AppVeyor?

I'm getting the following error when I use ~@"(local)\SQL2019"~ @"(local)\SQL2017" (per the docs) as the data source on .NET (with both Microsoft.Data.SqlClient and System.Data.SqlClient) using the ~Visual Studio 2022~ Ubuntu2204 image:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Bartleby2718 commented 3 months ago

There was a typo on Windows 🤦

Bartleby2718 commented 3 months ago

However, I'm still getting the same errors on Ubuntu2204 even though https://www.appveyor.com/docs/linux-images-software/ says SQL Server 2017 15.0.4153.1-6 is installed.

I do have mssql2017 in services:.

Bartleby2718 commented 3 months ago

Never mind; I realized after this minimal reproducible example; you should not use backward slashes but use localhost instead.