microsoft / vscode-mssql

Visual Studio Code SQL Server extension.
Other
1.53k stars 455 forks source link

Object Explorer Connections Disappear #17237

Open dbrocha opened 2 years ago

dbrocha commented 2 years ago

Steps to Reproduce:

  1. Set up "mssql.connections" connection profiles in settings.json
  2. Go to the "SQL Server" tab on the left -- Profiles appear as they should.
  3. Go to the Explorer tab.
  4. Close VSCode
  5. Open VSCode
  6. Open/Create a .sql file from the Explorer tab.
  7. In the editor, hit F1 and select MS SQL: Connect
  8. Connect to a server.
  9. Click the "SQL Server" tab on the left. -- All profiles are gone. Only the currently connected server shows and the context is database specific instead of letting you browse all DBs on the server.
  10. Close VSCode
  11. Open VScode
  12. Go to the SQL Server tab - Profiles have reappeared.
BenGinders commented 2 years ago

I am facing exactly the same issue:

Exactly the same steps as @dbrocha, My configuration only contains 2 databases, however when connecting to one of them the other disappears until I restart Vscode or connect to the missing database via the Command Palette .

Initially on opening VsCode and after connecting to both databases I see: BothDatabases visible

After connecting to one database using the same method as @dbrocha I see: image

When opening up the command palette I see: Command Pallette

And in my settings I have 2 databases set up: 2Databases In Settings

dnhartzel51 commented 1 year ago

Hi, I am still experiencing the same issue. Slightly updated versions but otherwise same steps to reproduce as the users above.

MSSQL Extension Version: v1.16.0 VSCode Version: 1.73.0 OS Version: Windows 10 x64