microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.5k stars 883 forks source link

Not possible to save profiler trace #20219

Open heliolino opened 1 year ago

heliolino commented 1 year ago

Issue Type: Bug

one customer is trying to use Azure Data Studio to trace application queries but wants to export/save the trace captured.

Is there a way to save the data somewhere ? the closest he got was from this page https://thewindowsupdate.com/2022/04/09/tips-tricks-2-sql-server-profiler-xevents-for-azure-sql-db/, but at the end of the process he lost all data after stopping the trace

Extension version: 0.11.0 Azure Data Studio version: azuredatastudio 1.36.1 (e56e1d931bbb110fe8f24751423c4e184bb8f22d, 2022-04-21T21:25:10.399Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 2995)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.69GB (14.22GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
smartguest commented 1 year ago

Saving is currently not supported by ADS at the moment for profiler tracing @heliolino

dapple16 commented 1 month ago

Yes, it is possible!

When creating a trace, Azure data studio will ask for a name "Enter Session name". In that box enter your session name as below and start the session.

image

image

When the session is stopped, open SSMS, connect to the database, expand the "Extended Events", the session will be there. Open the session and export as file or table.