Azure Data Studio - Scope set to master. No results returned.

I recently installed the SQL Search extension in Azure Data Studio, but I can't get any results to return. It seems like the scope is set to just the master database. I've tried to use the Reindex Active Connection command while connected to by database server, but it doesn't seem to have any affect. I don't see any configuration options anywhere. What should I do to get this to work. Thanks. 
Tagged:

Best Answer

  • AdrianBAdrianB Posts: 46 Silver 1
    Hi Mike,

    I've dug into this a bit more. It looks like a bug related to what context is chosen when the search is run. I suspect it is related to a bug in ADS that has yet to be fixed (we've reported it to Microsoft).

    Changing the database via the dropdown menu in the query window doesn't always change the context for the search (it appears to keep the context of the original database). Opening a new query from the right-click menu on the database in the tree does seem to make it work correctly, so I'd suggest you do that as a workaround for now.

    Adrian

    Software Engineer
    Redgate Software

Answers

  • Hi Mike,

    Could you check what version of the extension you have installed? Also, if you change the database of the current query and do another search, does the scope change at all?

    Adrian
    Software Engineer
    Redgate Software
  • Mike_KubalaMike_Kubala Posts: 5 New member
    edited April 15, 2020 4:32PM
    I'm on version 0.4.0. I've tried several databases and different servers and it the same. It just searches master. I've tried highlighting my connection, hitting CTRL + SHIFT + P and then select SQL Search Active connection. I've tried several searches and only master shows up. I've tried the same highlighting the database and get the same results. I tried the Reindex active connections command and re-ran the search and it still only searches master. 

    Also I've verified that .NET CORE 3.1 is installed. I saw that was a requirement. 
  • Mike_KubalaMike_Kubala Posts: 5 New member
    Ah ok so opening a query window first with the DB I want to search, then running SQL Search works. That's a fine work around. Thanks. 
  • RedshiftRedshift Posts: 31 Bronze 3
    I've opened a new query window against the database I want to search and selected SQL Search Active Connection but the scope is still master.
    I have .net core 3.1.4 installed
Sign In or Register to comment.