Microsoft Copilot in Azure extends capabilities to Azure SQL Database (Private Preview)
Published Mar 21 2024 11:00 AM 12.1K Views
Microsoft

We are excited to announce the introduction of new Copilot skills for Azure SQL Database! Please click here to sign up. Copilot in Azure can now help you streamline the design, operation, optimization, and health of Azure SQL Database-driven applications. It improves productivity in the Azure portal by offering natural language to SQL conversion and self-help for database administration.

 

The new Copilot skills can be invoked in two Azure portal experiences:

  • Natural language to SQL: This experience within the Azure portal query editor for Azure SQL Database translates natural language queries into SQL, making database interactions more intuitive.
  • Azure Copilot integration: This experience adds Azure SQL Database skills into Microsoft Copilot for Azure, provides customers with self-guided assistance, and empowers them to manage their databases and solve issues independently.

Additionally, the Copilot integrates data and formulates applicable responses using public documentation, database schema, dynamic management views, catalog views, and Azure supportability diagnostics.

 

Natural language to SQL

This experience within the Azure portal query editor for Azure SQL Database utilizes table and view names, column names, primary key, and foreign key metadata to generate T-SQL code. You can then review and execute the code suggestion.

 

This integration means that Copilot can answer questions with prompts like:

  • 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

To use natural language to SQL in Copilot, follow these steps:

 

In the query editor toolbar, select the Launch inline copilot button.

NL2SQL1.png

Optionally, you can narrow down your selection of table and views for consideration by Copilot. 

NL2SQL2.png

Type your question in the input box. When ready, select the Generate Query button. 

NL2SSQL3.png

This will generate, but won't actually execute, a new T-SQL code statement.  You either accept or decline the suggestion.

NL2SQL4.png

If accepted, execute the generated T-SQL query by selecting Run, or you can edit the prompt and regenerate new code. This regeneration will append, and not replace, any existing code in your Query editor window.

 

Azure Copilot integration

You can ask and receive helpful, context-rich Azure SQL Database suggestions from Microsoft Copilot for Azure within the Azure portal. Get answers with prompts like:

  • How much space is being used by this database?
  • What are the active connections running right now?
  • What are the top high CPU queries run in the last week?

For example, when you're experiencing slow performance, you could provide the prompt "My database is slow".

Copilot starts looking at your database based on your context in the Azure portal database blade. After the check, Copilot will detail specific areas that might be contributing to the issue. In this example, there was a specific query driving high CPU utilization:

 

slow-database.png

You can continue the conversation and investigation with a prompt of "How can I tune that high CPU query?"

Copilot understands that this prompt refers to the query identified earlier, and provides a new index suggestion:

 

high-cpu-query.png

Copilot integrates data and formulates applicable responses using public documentation, dynamic management views, Query Store, catalog views, and Azure supportability diagnostics.

 

Signing up for the private preview

These Copilot experiences are currently in a private preview for a limited number of early adopters. To sign up for this program, you can visit the Request Access to Copilot in Azure SQL Database: Private Preview page.

 

We hope that Copilot will help you to streamline your database management and improve your productivity.

 

Related Links

Private preview sign-up: https://aka.ms/sqlcopilot-signup

Overview: https://aka.ms/sqlcopilot-overview

FAQ: https://aka.ms/sqlcopilot-faq

Natural language to SQL and Azure portal Query editor (preview): https://aka.ms/sqlcopilot-nl2sql 

Intelligent applications with Azure SQL Database: https://aka.ms/sqlai  

 

1 Comment
Co-Authors
Version history
Last update:
‎Apr 02 2024 09:39 AM
Updated by: