Azure SQL 資料庫中的 Microsoft Copilot 技能(預覽版)

適用於:Azure SQL 資料庫

Microsoft Azure Copilot 是一種 AI 助理,其設計目的是簡化 Azure SQL 資料庫驅動應用程式的設計、作業、最佳化和健康情況。 它藉由為資料庫管理提供自然語言到 SQL 轉換和自助服務,來提高 Azure 入口網站的生產力。

若要深入了解 Azure SQL 資料庫中 Microsoft Copilot 技能的目前預覽版,請觀看下列影片:


注意

Azure SQL 資料庫中的 Copilot 技能目前為面向少數早期採用者的預覽版。 若要註冊此程式,請造訪要求存取 Copilot in Azure SQL Database:預覽版

Copilot 提供使用者問題的相關解答,利用資料庫內容、文件、動態管理檢視、查詢存放區和其他知識來源來簡化資料庫管理。 例如:

  • 資料庫管理員可以獨立管理資料庫並解決問題,或深入了解資料庫的效能和功能。
  • 開發人員可以詢問有關資料的問題,就像在文字或對話中一樣,以產生 T-SQL 查詢。 透過所產生查詢的詳細說明,開發人員還可了解如何快速撰寫查詢。

Azure SQL 資料庫體驗

目前的預覽包含兩個不同的體驗

  • Microsoft Azure Copilot 整合:這項體驗會將 Azure SQL 資料庫技能新增至具有自我引導協助的 Microsoft Azure Copilot 客戶,讓他們能夠獨立管理其資料庫並解決問題。

  • 自然語言到 SQL 轉換:這項體驗在 Azure 入口網站查詢編輯器內,它會將自然語言查詢轉譯成 SQL,讓資料庫互動更直覺化。 如需 Azure SQL 資料庫中的 Copilot 的自然語言到 SQL 轉換功能的教學課程和範例,請參閱 Azure 入口網站查詢編輯器中的自然語言到 SQL 轉換(預覽版)

Copilot 會整合資料,並使用公用文件、動態管理檢視、目錄檢視和 Azure 可支援性診斷來制定適用的回應。

自然語言轉換為 SQL 查詢

這項體驗在Azure 入口網站查詢編輯器中,它會利用資料表和檢視名稱、資料行名稱、主索引鍵和外部索引鍵中繼資料來產生 T-SQL 程式碼。 然後,您可以檢閱並執行程式碼建議。

此整合表示 Microsoft Azure Copilot 可以使用下列提示回答問題,例如:

  • Which agents have listed more than two properties for sale?
  • Tell me the rank of each agent by property sales and show name, total sales, and rank
  • 甚至進階案例,例如 Show me a pivot summary table that displays the number of properties sold in each year from 2020 to 2023

如需 Azure SQL 資料庫中的 Copilot 的自然語言到 SQL 轉換功能的教學課程和範例,請參閱 Azure 入口網站查詢編輯器中的自然語言到 SQL 轉換(預覽版)

Microsoft Azure Copilot 增強案例

您可以在 Azure 入口網站內向 Microsoft Azure Copilot 詢問並接收實用且內容豐富的建議。

警告

Microsoft Azure Copilot 是一組由大型語言模型 (LLMs) 提供的預覽體驗。 Copilot 所產生的輸出可能包含錯誤、偏差或其他非預期內容。 如同任何升成式 AI 模型,人類應該先檢閱 Copilot 所產生的輸出,再進行使用。

Microsoft Azure Copilot 的一些範例案例:

  • 當您使用緩慢的 Azure SQL 資料庫時,您可以提供提示 My database is slow

    Microsoft Azure Copilot(預覽版)會根據您的 Azure 入口網站內容開始查看您的資料庫。 檢查之後,Copilot 會詳細說明可能導致此問題的特定區域。 在此範例中,有一個導致高 CPU 利用率的特定查詢:

    顯示查詢提示和產生的關於高 CPU 利用率的範例查詢的螢幕擷取畫面。

  • 您可以繼續對話和調查並顯示提示 How can I tune that high CPU query?

    Copilot 了解此提示是指稍早識別的查詢,並會提供新的索引建議:

    顯示對話中第二條查詢提示和產生的關於高 CPU 利用率的範例查詢的螢幕擷取畫面。

範例提示

您可以為不同功能區域提供 Microsoft Azure Copilot 的提示,例如:

技能名稱 技能描述 範例提示
作用中的使用者連線 顯示資料庫作用中使用者連線。 Who are currently actively connected to the database?
反模式查詢分析 識別具有反模式的查詢,及其對效能的潛在影響。 Show me all the queries in my workload that have anti-patterns in them.
自動調整分析 調查自動調整失敗和潛在解決方案。 Why is automatic plan correction failing?
基本資料庫資訊 擷取關於資料庫的基本資訊。 What is the name of the logical server for this database?
封鎖的工作階段分析 識別和分析封鎖的工作階段。 Check top blocking sessions.
相容性層級 提供資料庫相容性層級的相關資訊。 What's the compatibility level of this database?
連接字串產生 為資料庫產生適當的連接字串。 Which connection string should I use to connect to my DB?
副手輔助說明 提供 Azure SQL 的一般協助和指導。 What can you do related to Azure SQL?
資料同步處理分析 針對資料同步問題進行疑難排解,特別是次要方面的問題。 Why do my secondaries not have the latest data?
資料庫和資料表大小 提供資料庫和資料表大小的相關資訊。 What's the size of this database?
資料庫效能分析 分析整體資料庫效能,並建議改善方式。 Why is my database slow?
資料庫權限清單 列出使用者資料庫權限和存取層級。 Which users have access to master database?
鎖死分析 調查鎖死並建議解決方案。 Why am I getting deadlock errors? How can I fix it?
已卸除連線分析 調查已卸除資料庫連結的執行個體。 Show me all the instances where my database had a dropped connection.
片段索引分析 識別片段索引及其對效能的影響。 Help me find fragmented indexes.
一般反模式資訊 提供常見 SQL 反模式的一般資訊。 What are the most common SQL anti-patterns?
取得伺服器的資料庫名稱 列出特定伺服器上的所有資料庫。 List all the databases on this server.
高 CPU 取用查詢分析 識別和分析高 CPU 使用量的查詢。 Why is the CPU usage high on this database?
索引清單 顯示資料庫中的所有索引。 What are all the indexes?
特定資料表的索引建議 提供一或多個資料表的索引建議。 Should I add an index on this table?
最新的備份資訊 提供最新資料庫備份的相關資訊。 When was the most recent backup of my database created?
MAXDOP 最佳化 分析並建議 MAXDOP 設定的最佳化。 What's the current MAXDOP and how to optimize?
記憶體授與分析 分析記憶體授與問題和潛在原因。 Why am I having memory grant issues?
遺漏索引建議 建議遺漏索引,提升查詢效能。 Missing index suggestion for improving query performance?
時間點還原保留 提供時間點還原保留期間的相關資訊。 How far back in time can I go for a point-in-time restore?
查詢效能分析 調查並建議查詢執行緩慢的解決方案。 Why is this query running so slow?
查詢存放區 - 尋找強制方案 在指定的時間範圍內顯示具有強制方案的查詢。 Show me all the queries from the past 2 days that have forced plans.
查詢存放區 - 尋找高執行時間變化 識別執行時間變化高的查詢。 Which queries on my database have a high variation in execution time?
查詢存放區 - 尋找最高的 I/O 查詢 顯示具有最高 I/O 使用量的查詢。 What queries on this database use the most I/O?
查詢存放區 - 依 ID 取得查詢文字 根據提供的查詢 ID 顯示查詢文字 What is the query text for Query ID 1333?
查詢存放區 - 最新執行的查詢 顯示最近執行的查詢。 What are the most recently executed queries in my database?
查詢存放區 - 執行時間最長的查詢 顯示指定時間範圍內執行時間最長的查詢。 What are the longest running queries in the past day?
查詢存放區 - 等候時間最長的查詢 識別等候時間最長的查詢。 Which queries have had the highest wait times?
查詢存放區 - 具有多項方案的查詢 檢查具有多項執行方案的查詢。 Show me the queries that have had more than one execution plan.
查詢存放區 - 迴歸查詢 識別效能迴歸的查詢。 Have any of my queries gotten significantly slower recently?
查詢存放區 - 具有方案變更的迴歸查詢 顯示具有效能迴歸之方案變更的查詢。 Are there any queries that had plan changes and regressed in performance?
查詢存放區 - 顯示每個查詢的執行次數 顯示每項查詢的執行次數。 What queries are being executed most often?
查詢存放區 - 最消耗資源的查詢 識別和分析資源使用量最高的查詢。 What are the most expensive queries in my workload?
查詢存放區模式疑難排解 調查處於唯讀模式的查詢存放區並提供解決方案。 Why is Query Store in read-only mode? How can I fix it?
相關文件 根據使用者的查詢提供相關文件連結。 What does database compatibility level mean?
資源使用狀況分析 分析資源使用狀況和潛在瓶頸。 Is the database hitting resource limits? Which limits?
資料表清單 列出資料庫中的所有資料表。 What are the names of all the tables?
等候統計資料分析 分析等候統計資料和潛在的效能瓶頸。 What do the wait statistics look like for my database?
工作負載增加和縮放分析 評估工作負載增加和潛在縮放需求。 Has increased workload or traffic caused performance issues?

負責 AI

如需 Microsoft 如何在 Microsoft Azure Copilot 中實作負責任 AI 工具的更多資訊,請參閱適用於 Microsoft Azure Copilot 的負責任 AI 常見問題(預覽版)