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

MSSQL connection shows other databases at top level. #714

Open
mikes-gh opened this issue Oct 19, 2020 · 4 comments
Open

MSSQL connection shows other databases at top level. #714

mikes-gh opened this issue Oct 19, 2020 · 4 comments
Labels
mssql Microsoft SQL Server driver triage

Comments

@mikes-gh
Copy link

Describe the bug
Connecting to a specific database using the MSSQL driver shows all the other databases on the server.
Theses unwanted nodes contain an empty schema node and just take up screen space.

Expected behavior
Just show the database supplied in the connection properties.

Screenshots
image

Desktop (please complete the following information):

  • SQLTools Version [0.23.0]
  • VSCode Version: [e.g 1.5.0.1]
  • OS: [Mac]
  • Driver:
    • [0.2.0] MSSQL/Azure
  • Database version: [MSSQL 2008R2]
@gjsjohnmurray gjsjohnmurray added the mssql Microsoft SQL Server driver label Jul 23, 2022
@gjsjohnmurray
Copy link
Collaborator

This may have been intentional as a way for the user to discover all the databases they have access to. In PR #938 I am taking a different approach for the MySQL driver, promoting the database specified in the connection to the top of the list. That PR also allows the user to access one of the the meta-databases by naming it in the connection spec.

@mikes-gh @bherbruck do you think that approach will be acceptable for MSSQL too?

@mtxr
Copy link
Owner

mtxr commented Aug 21, 2022

@gjsjohnmurray most of the DB tools I see they list all databases. The idea of having a target database is meant just for having default queries targeting that database, that doesnt mean the database should not be seen,

In this case, I liked your proposal on #938 . I believe the majority of the users uses other DBs eventually.

In this scenario, since you will display the target DB at the top, I believe it's a good solution for this issue. Anything other than that I would point to group on "other databases" and have it all there, but that could have other implications on the current existing flow of the tool...

@xenago
Copy link

xenago commented Sep 21, 2022

I think like most other tools (SSMS, DBeaver, etc) all of the connection's accessible databases should be usable, with the user able to select which one from the active connection is used. If that is not possible then these other inaccessible databases should be hidden or otherwise indicated to be unusable, since it makes for a very confusing UI. The proposal in #938 seems close to this which is a good idea

@fzhem
Copy link

fzhem commented May 13, 2024

I have created a fork of the mssql extension that allows you to display empty dbs/schemas. These options are currently experimental. Here's the link to the extension: https://marketplace.visualstudio.com/items?itemName=fzhem.sqltools-driver-mssql-commver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mssql Microsoft SQL Server driver triage
Projects
None yet
Development

No branches or pull requests

5 participants