Export or query for all requests SQL in DW database in Azure Synapse

2024-04-17T14:41:03.0833333+00:00

Hi,

I need to analyse the quantity of SQL requests in views of DW database in Azure Synapse. In the tool there is a monitor of SQL requests, but not is possible export the data. There is a table where I can see this data, or other way to consult the quantity of SQL requests and export?

Att.

João Felipe Carvalho

Azure SQL Database
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,378 questions
0 comments No comments
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 30,911 Reputation points Microsoft Employee
    2024-04-19T08:03:05.2+00:00

    Hi João Felipe Barbosa Cerqueira Carvalho ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your query here.

    It seems direct export option is not present for SQL queries in synapse workspace , unlike pipeline monitoring where export to csv option is present in the UI.

    You can enable log analytics for Azure synapse workspace , select your sql pool as scope and see the data via available metrics like 'Active queries', 'Queued queries' etc .

    You can additionally write your own Kusto query to get additional data as required.

    User's image

    For more details, kindly check : Monitor Azure Synapse Analytics

    Log Analytics with Azure Synapse Analytics

    https://www.youtube.com/watch?v=r_n3D22GBhw&list=PLsJW07-_K61KkcLWfb7D2sM3QrM8BiiYB&index=26

    Hope it helps. Kindly accept the answer by clicking on Accept answer button. Thankyou

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Amira Bedhiafi 15,446 Reputation points
    2024-04-18T09:42:08.33+00:00

    The Export-AzSynapseSqlScript cmdlet exports an Azure Synapse sql script to a SQL Server query(.sql) file. If you specify the name of a sql script, the cmdlet exports the specified sql script. If you do not specify a name, the cmdlet export all sql scripts in the workspace.

    Since Azure Synapse Analytics does not provide a direct export feature from the monitoring tools, you would typically export the data using one of the following methods:

    • SQL Server Management Studio (SSMS) or Azure Data Studio
    • PowerShell or Azure CLI
    • Integration with Power BI

    You can also opt for the Automated Export via Azure Functions.


  2. 2024-04-19T11:48:59.5766667+00:00

    I found a sys table what resolved my problem. The sys.dm_exec_requests_history contains the same result of monitor of SQL request to Synapse Analytics.

    Source: https://stackoverflow.com/questions/76873537/does-azure-synapse-serverless-sql-pool-database-support-query-store
    Att,

    João Felipe

    0 comments No comments