-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: Does not supports SQL Aliases #100
Comments
@gerardog - this is an interesting issue. Currently, mssql-cli does not support the SQL Alias feature. The reason being, it's not supported by .NET Core, which is what mssql-cli uses to connect to a database (via the SqlToolsService). Since SQL Alias relies on the registry, it's not a cross platform feature, so I can see why the feature was dropped in .NET Core (see issue https://github.com/dotnet/corefx/issues/2575). There are a couple of ways to address this, so I had some questions:
It's worth mentioning, SQL Operations Studio is also impacted by this (microsoft/azuredatastudio#71) since it also uses SqlToolsService. |
This is not a blocker for me. Seems reasonable that this should be fixed in the .net core platform as a whole. I honestly created this as an issue assuming mssql-cli was pure python code. |
Regarding your 2nd question. If this feature is implemented, I would expect mssql-cli on windows to behave same as SSMS. |
I have a SQL alias configured in SQL Server Configuration Manager.
The alias is named "SqlAlias" and redirects to ".\MSSQLSERVER2016"
The following line fails to connect: mssql-cli.bat -E -S SqlAlias
On the other hand, using the natural name works fine: mssql-cli.bat -E -S .\MSSQLSERVER2016
The text was updated successfully, but these errors were encountered: