skip to Main Content

I closed Azure Data Studio with a blank query tab open. When I reopened the app the blank query tab opened with it. I wrote a query in the tab then realised there appears to be no way to set the connection. There is no menu bar at top of the window and right-clicking on the tab doesn’t offer any way to connect that I can see:

enter image description here

An I missing something? Is there a way to connect this window to a database? Or is the only option to open another query tab and copy the query I wrote to the new tab?

2

Answers


  1. Chosen as BEST ANSWER

    The only way I managed to get the Connect and other controls to display at the top of the old window was to save it as a .sql file. Once saved the appropriate controls became visible at the top of the window.

    I guess that Azure Data Studio must use the file extension of a window to determine if it's a SQL window or not, at least when it opens an old, unsaved, window from the previous session.

    When reopened the window retained the previous title it had before it was closed: "SQLQuery_1", without a file extension. When the window was created in the previous session Azure Data Studio had recognised it as a SQL window, and had displayed the Connect and other controls at the top. But when it was reopened after Azure Data Studio restarted it looks like Azure Data Studio no longer recognised it as a SQL window, presumably because it had no file extension.


  2. I missing something? Is there a way to connect this window to a database? Or is the only option to open another query tab and copy the query I wrote to the new tab?

    Open your Azure data studio and open setting by pressing ctrl+, and make menu bar and activity bar visible

    enter image description here

    enter image description here

    Then Create a SQL serverbconnection by going Connections >> New Connection >> Fill the appropriate details anbd connect.

    enter image description here

    Then you will see the bow option to connect appropriate database.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search