Skip to content
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

Closed
gerardog opened this issue Dec 13, 2017 · 3 comments
Closed

Windows: Does not supports SQL Aliases #100

gerardog opened this issue Dec 13, 2017 · 3 comments

Comments

@gerardog
Copy link

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

@gerardog gerardog changed the title Windows: Does not supports SQL Aliase Windows: Does not supports SQL Aliases Dec 13, 2017
@pensivebrian
Copy link
Member

@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:

  1. How import is the SQL Alias feature. Is blocking any important scenarios for you in anyway?
  2. If added, are you expecting a Windows only feature that works with the registry that works with SSCM? Or a more general cross platform solution that does not work with SSCM?

It's worth mentioning, SQL Operations Studio is also impacted by this (microsoft/azuredatastudio#71) since it also uses SqlToolsService.

@gerardog
Copy link
Author

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.

@gerardog
Copy link
Author

Regarding your 2nd question. If this feature is implemented, I would expect mssql-cli on windows to behave same as SSMS.
A more general cross platform solution that does not work with SSCM is not of much use to me, because SQL Aliases add value only if they are a standard that many applications adhere to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants