Introducing Copilot in Azure SQL Database (Preview)

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

We are excited to announce that Copilot in Azure SQL Database is now in limited public preview! Copilot in Azure SQL Database experiences are designed to 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.

 

Copilot in Azure SQL Database provides 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, customers with self-guided assistance, empowering them to manage their databases and solve issues independently.

Copilot in Azure SQL Database 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 in Azure SQL Database, 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 in Azure SQL Database. 

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 in Azure SQL Database integrates data and formulates applicable responses using public documentation, dynamic management views, Query Store, catalog views, and Azure supportability diagnostics.

 

Signing up for the preview

Copilot in Azure SQL Database is currently in a public 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: Limited Access Public Preview page.

 

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

 

Related Links

Preview sign-up: https://aka.ms/sqlcopilot-signup

Copilot in Azure SQL Database overview: https://aka.ms/sqlcopilot-overview

Copilot in Azure SQL Database 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  

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.