mtxr / SublimeText-SQLTools

SQLTools for Sublime Text 3
https://code.mteixeira.dev/SublimeText-SQLTools/
GNU General Public License v3.0
177 stars 40 forks source link

[Suggestion] Way to change current database without going through "Connections"? #201

Closed sharunkumar closed 5 years ago

sharunkumar commented 5 years ago

Issue Type

Feature Request

Description

In Microsoft SQL Server it is possible to choose the connection first and then change the database without changing the connection. In the current configuration of SQL Tools, you need to add a connection entry for every database in a server.

tkopets commented 5 years ago

You can use a new feature in v0.9.12 to prompt for a database name when a connection is selected.

Here is an example connection config. Note the line "database": null,

{
    ....
    ....

    "Connection MSSQL": {
      "type"    : "mssql",
      // use either ("host", "port") and remove "instance"
      // or ("host", "instance") and remove "port"
      "host"    : "localhost",
      "instance": "SQLEXPRESS",
      // "port"    :  1433,
      // "username" and "password" are optional (remove if not needed)
      "username": "sa",
      "password": "password",
      "database": null,
      "encoding": "utf-8"
    },

    ....
    ....
}