Azure Data Studio cross platform database management tool trial

Time:2021-5-5

Recently, when struggling with azure SQL database, we found a new Microsoft database management tool: azure Data Studio. From the name, azure Data Studio seems to be specially developed for azure, but it is not. It also supports the query and management of traditional SQL server.
Azure Data Studio is a cross platform database management tool, which supports windows, MacOS and Linux. Azure Data Studio provides modern editing experience, supports intelligent prompt, code completion, source code version management and other functions. It has built-in image drawing query result set, customized home page and other functions.

install

https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15

Download the installation package of azure Data Studio from the above address for installation.

on trial


After installation, run azure Data Studio. You can see as like as two peas in vscode, you can infer that azure Data Studio is based on vscode.

To connect to the database, we first need to add a connection. Click the “Add Connection” button to open the new connection dialog box.
Fill in the server address, login method, account password, and click “connect”.

If you log in to the server successfully, a list of databases will be displayed on the left. The basic information of the server and some databases will be displayed on the right side.
As can be seen from the figure above, the OS of our server is Ubuntu 16.04, and the SQL server version is 14.0.3162.1 Developer Edition.

Click a database instance in the menu on the left to display tables, views and other folders. Continue to click to display table list, view list and so on. This is similar to SSMS. Right click a table to pop up a shortcut menu. It has some common functions, which are similar to SSMS.

Press shortcut Ctrl + n to create a new query. On this page, you can write SQL statements to query. When writing, it supports intelligent prompt, which is more powerful than SSMS. It supports intelligent prompt of middle characters, and the speed is very fast.
Click “run” to execute the query, and the query results will appear below.

widget

Azure Data Studio can also add some widgets to display some custom information. For example, display 5 slow queries.

Press Ctrl + P to open the command box and enter > Settings filtering options. Select preferences.

Find dashboard > Database: widgets
Add the following contents to the opened JSON content:

"dashboard.database.widgets": [{
        "name": "slow queries widget",
        "gridItemConfig": {
            "sizex": 2,
            "sizey": 1
        },
        "widget": {
            "query-data-store-db-insight": null
        }
    }
    ],
    "workbench.colorTheme": "Default Dark Azure Data Studio",
    "dashboard.server.properties": true,
    "workbench.enablePreviewFeatures": true,
    "workbench.startupEditor": "welcomePage"
}


Right click the database and select manage to open the widgets interface. You can see that the slow queries widget displays the latest five slow queries.

Click the three points in the upper right corner to view the details.

plug-in unit

Azure Data Studio is similar to vscode and supports the installation of plug-ins.

CTRL + Shift + X opens the plug-in search directory. You can see that there are many plug-ins to choose from. You can install language packs, themes, etc.

There is an interesting plug-in “server report” which can display the current load of the server.

summary

A simple trial of azure Data Studio. It is very lightweight and can be competent for basic query analysis tasks. It is more inclined to SQL statement editor and has good integration with GIT. It also supports plug-ins, widgets and other components, which can directly display the status of the database on the home page. But it lacks some advanced database management functions. For example, if you want to do database replication and subscription, it doesn’t support it. When you’re just looking for an SQL edit query tool, you can consider azure Data Studio, which is cross platform.

Pay attention to my official account and play with technology.