Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Keep "Active database" setting in SQL editor (not globally) #5172
Describe the problem you're observing:
There is no visual feedback that guarantees which DB the current active editor is executing against. This is critical knowledge and available in other DB tools. It is very common for a user to have multiple tabs executing against multiple databases. Switching to a prior tab should list somewhere which database it is pointing to.
Surely there are multiple ways to improve this. There was a prior discussion about this in 628. There was a concern that some existing users would not be happy with the changes proposed there.
Please consider if the following proposal might please everyone. At least one other DB tool works this way:
Another proposal is to separately show and update the current DB in the status bar lower right hand side each time as the tabs change. Still some implementation such as (4) is involved and then the purpose of the dropdown becomes confusing.
Steps to reproduce, if exist:
That option is helpful. Vote that option to be checked by default. It works well (except if there is pound sign in the database name related issue #5168).
If there was another option "Retain active database per Editor" or "Independent Editor Connections" then it would be as comfortable as SSMS or TOAD.
Here's what's strange IMO now.
So during step (6) the tool ran a hidden "use master" (even though it is a separate session) sometime before executing the select . Compared to other tools, I think that behavior is unexpected and non-intuitive, especially for a new user. Both SSMS and TOAD do not work like that.
So the recommendation is that when a new tab is selected, to not set the database but instead to just read the current DB for that session and sync the drop down value to match. This seems to be exactly how the SSMS and TOAD are working if anyone wants to see it in action using the above steps.
Anyway if it is decided not to change the behavior, hopefully the issue has been captured accurately for possible future reference.