SQL Search - Database Selection Reverting to All Databases
rldawg
Posts: 35 Bronze 3
in SQL Search
I've noticed that when I flip over to another app and flip back to SSMS that the database selector changes from the one DB I have selected to All Databases. Ans so my search results are skewed of course.
Anyone else have this issue?
Anyone else have this issue?
Tagged:
Comments
As discussed via the ticket we have logged for you, I am continuing to try to reproduce this issue. So far I'm not seeing the same behavior. I will continue to work with you on this within the ticket.
Dan Jary | Redgate Software
Have you visited our Help Center?
I'm sorry you are both also seeing this issue.
Would you both mind confirming what versions of SQL Search and SSMs you are using?
Dan Jary | Redgate Software
Have you visited our Help Center?
SQL Search 3.6.3.3612
Steps to reproduce:
Open SSMS
Select a server
Open SQL Search
Change "All databases" to one database
Search for something
Click "Connect" in Object Explorer to open a second server
As the dropdown becomes visible, SQL Search switches back to "All databases" and starts to reindex.
There are other cases where it switches to "all databases" as well, but this one is the most easily reproducible.
I recorded a video of the issue. Happy to assist further if I can.
https://cleguardians.box.com/s/j2lpf69znk0ei5f3km4sqj681fi0m0d3
It happens if I haven't selected a particular database on the left panel. I can pick a DB from the search dropdown but if I haven't highlighted a DB in the left panel, any time I expand something the search dropdown reverts to "All databases". If I do have a DB highlighted, but select a different DB in the dropdown, then expand any tree item in the left panel the dropdown reverts to the highlighted DB.
SQL Search 3.6.3.3612
Several on our team are also experiencing this same issue Its very disruptive to our workflow. Our environment consists of around 30 separate databases with mostly identical schemas and object names. These database also have custom elements and share data workflows with application databases on linked SQL database servers.
Typical use case for us involves using SQL Search on a select single database by making selections from the "Server" and "Database" dropdown options inside the SQL Search menu. We then use the succinct list of relevant objects making it easier for us to spot custom or atypical objects for review and discovery.
This process is derailed because Search will now update the "database" and "Server" dropdown options automatically to match whatever Server and Database you have selected in the Object explorer. When search defaults back to "all databases" our results go from from 10 to 300+ as an example.
Also, since search results are no longer persistent and always change depending on what object you last clicked on in Object Explorer, it makes it functionally impossible to inspect search results that were purposely applied to more than one database. As soon as you double click on a line in the search results SSMS will navigate you to that object in Object Explorer and the search results will be discarded to only show the results for the database of that object you are currently inspecting.
If you are connected to more than one SQL server in the SSMS Object Explorer, Search will take liberty to apply an irrelevant earlier search query for a different server and database on whatever server you happen to be looking at in that moment.
SSMS 18.12.1
SQL Search 3.6.4.3768
PLEASE modify SQL Search to make it stop automatically selecting All Databases in the database dropdown list when I change servers. If I select a specific database and then change to another server with the same database, leave my selection as it was. It negatively impacts my productivity to have to wait while SQL Search to automatically reindex all databases every time I switch between servers.
At the very least, please provide a user preference setting for which behavior to apply.
I'm pleased to advise that a fix for this issue was released in version 3.6.6 of SQL Search. This version can be downloaded directly from here: https://download.red-gate.com/checkforupdates/SQLSearch/SQLSearch_3.6.6.3856.exe.
Alternatively, you can update to the latest version of SQL Search (v.3.6.7) here: https://download.red-gate.com/checkforupdates/SQLSearch/SQLSearch_3.6.7.3908.exe.
If you could please let us know that this does indeed resolve this issue for you, that would be greatly appreciated.
Dan Jary | Redgate Software
Have you visited our Help Center?
If there happens to be a search term in the search bar when you switch servers (not shown in the video), it begins re-indexing automatically (something that takes 5 minutes on my production server, something I would always want to trigger myself)
Video: https://cleguardians.box.com/s/3qjks5wj5p005s06bi7jxhf6fkotdgwm
Thank you for highlighting these issues. Just to advise that these have been escalated to our development team for their input. I will come back to you via this thread as soon as I have an update.
Dan Jary | Redgate Software
Have you visited our Help Center?
Just to confirm on the points raised:
- SQL Search still reverting to All Databases when clicking the server drop down - our development team are looking into this, I will update as soon as I know more on this.
- SQL Search reindexes when selecting another server - It is expected behavior that selecting a different server triggers a reindex. It isn't currently possible to stop this happening. The size and contents of the server will impact the time the process takes to complete.
- SQL Search reverts back to the database selected in Object Explorer - We haven't so far been able to reproduce this behavior. When selecting a database in Object Explorer SQL Search will search that database, however selecting All databases from the drop down does then persist for us. @GaryH, are you possibly able to enable Verbose logging, reproduce the issue and provide the resulting log file?
Dan Jary | Redgate Software
Have you visited our Help Center?
@MattTag - regarding indexing when selecting another server, I enquired with our development team around adding a checkbox so that you can control when SQL Search indexes, however unfortunately this isn't something they are able to implement in to the product at this time.
@GaryH - many thanks for the information you have provided in your DM. I have responded to your message.
I am continuing to work with the team here on the other points raised and will provide an update as soon as I have one.
Dan Jary | Redgate Software
Have you visited our Help Center?
The latest version of SQL Search contains some minor improvements (related to the feedback received from this forum thread) to database selections within SQL Search.
For example, when choosing a selection of databases to search over, SQL Search will now retain those selections, even if you were to click on a database in Object explorer.
@GaryH, I also tested the scenario you DM'd me about. That also appears to have been fixed.
The latest version of SQL Search can be downloaded here: https://download.red-gate.com/checkforupdates/SQLSearch/SQLSearch_3.6.13.4316.exe
I hope this helps!
Dan Jary | Redgate Software
Have you visited our Help Center?
I just wanted to follow up to confirm on whether the new version of SQL Search has resolved the issue you were seeing?
Dan Jary | Redgate Software
Have you visited our Help Center?
Thanks for your update on this, I'm glad the database selections are now retained, however I'm sorry you're now seeing a new issue!
I've searched high and low for an installer for SSMS 18.10 so that I can try and reproduce the issue you are seeing, however the only version I can find available is for v.18.12. I've tested SQL Search in this version of SSMS and don't experience any crashes.
Is updating to a newer version of SSMS an option for you?
Dan Jary | Redgate Software
Have you visited our Help Center?
Very interesting timing indeed!
Thanks for your update on this. I'm glad this is now resolved!
Dan Jary | Redgate Software
Have you visited our Help Center?
To reproduce, do a SQL Search on Database A. Close SSMS. Reopen. Browse Object explorer to Database A. Do a SQL Search, and it'll default to All Databases.
I'm using SSMS 19.3
Would love a fix... as I need to cancel reindexing all the time (too many databases).