Azure Data StudioAzure Data Studio 中使用深入解析小工具,管理伺服器和資料庫Manage servers and databases with Insight widgets in Azure Data StudioAzure Data Studio

深入解析小工具會擷取您用來監視伺服器和資料庫的 Transact-SQL (T-SQL) 查詢,並轉換成富有洞察力的視覺效果。Insight widgets take the Transact-SQL (T-SQL) queries you use to monitor servers & databases and turns them into insightful visualizations.

深入解析是您可以新增至伺服器和資料庫監視儀表板的可自訂圖表和圖形。Insights are customizable charts and graphs that you add to server and database monitoring dashboards. 檢視您伺服器和資料庫的摘要深入解析,然後鑽研更多詳細資料,並啟動您所定義的管理動作。View at-a-glance insights of your servers and databases, then drill into more details, and launch management actions that you define.

您可以建置絕佳的伺服器和資料庫管理儀表板,如下列範例所示:You can build awesome server and database management dashboards similar to the following example:


若要立即開始建立不同類型的深入解析小工具,請參閱下列教學課程:To jump in and start creating different types of insight widgets, check out the following tutorials:

SQL 查詢SQL Queries

Azure Data StudioAzure Data Studio 會嘗試避免推出另一種語言或龐大的使用者介面,因此會嘗試盡可能使用需要最少 JSON 設定的 T-SQL。tries to avoid introducing yet another language or heavy user interface so it tries to use T-SQL as much as possible with minimal JSON configuration. 使用 T-SQL 設定深入解析小工具時,會利用無數個現有的實用 T-SQL 查詢來源,全部都可以轉換成富有洞察力的小工具。Configuring insight widgets with T-SQL leverages the countless number of existing sources of useful T-SQL queries that can be turned into insightful widgets.

深入解析小工具是由一個或兩個 T-SQL 查詢所組成:Insight widgets are composed of one or two T-SQL queries:

  • 「深入解析小工具查詢」 是必要的,而且查詢會傳回小工具中所顯示的資料。Insight widget query is mandatory, and is the query that returns the data that appears in the widget.
  • 只有在您想要建立深入解析詳細資料頁面時,才需要「深入解析詳細資料查詢」 。Insight details query is only required if you are creating an insight details page.

此深入解析小工具查詢會定義資料集來轉譯計數、圖表或圖形。An insight widget query defines a dataset that renders a count, chart, or graph. 您可以使用深入解析詳細資料查詢,在深入解析詳細資料面板中,以表格格式列出相關的深入解析詳細資訊。Insight details query is used to list relevant insight detail information in a tabular format in the insight details panel.

Azure Data StudioAzure Data Studio 會執行深入解析小工具查詢,並將查詢結果集對應至圖表的資料集,再加以轉譯。executes insight widget queries and maps the query result set to a chart's dataset then renders it. 當使用者開啟深入解析的詳細資料時,會執行深入解析詳細資料查詢,並在對話方塊中以格線檢視列出結果。When users open up an insight's details, it executes the insight details query and prints out the result in a grid view within the dialog.

基本概念是將 T-SQL 查詢撰寫成計數、圖表和圖形小工具的可用資料集。The basic idea is to write a T-SQL query in a way so it can be used as a dataset of a count, chart, and graph widget.


T-SQL 查詢及其結果集會決定深入解析小工具的行為。The T-SQL query and its result set determine the insight widget behavior. 針對圖表類型撰寫查詢或對應至現有查詢的正確圖表類型,都是在建置有效的深入解析小工具時的重要考量。Writing a query for a chart type or mapping a right chart type for existing query is the key consideration to build an effective insight widget.

其他資源Additional resources