SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Extended Events Export to table


Extended Events Export to table

Author
Message
DominantDBA
DominantDBA
SSC Veteran
SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)

Group: General Forum Members
Points: 248 Visits: 463
Hi All

I kicked off a queries detail tracking(using an event file as data storage) extended events on my pre-prod environment yesterday which I ran for 5-6 hours yesterday amd then stopped it. Quite a lot of data was created(30gb) in *.xel files which was fine as it was being put on a large backup drive

Before I left work yesterday I wanted to export all this information to a table in order for me to do some tuning analysis. So I went right click->view target data then locked my computer and went home.

I came in this morning and was alarmed to find the c:\ drive out of space! Awesome Smile

When you perform the above action SSMS creates a file on the folder C:\Users\[username]\AppData\Local\Temp\2 that is holding temporary results of what is on the view target data window.


I cant find a way to import the extended events xel files into a table in SSMS without doing the view target data thing?

Is there an easy way to do this?

Thanks
Chris
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)

Group: General Forum Members
Points: 99303 Visits: 33014
Instead of opening it up within the GUI, just run a query directly against it using sys.fn_xe_file_target_read_file

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
DominantDBA
DominantDBA
SSC Veteran
SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)

Group: General Forum Members
Points: 248 Visits: 463
Thanks Grant. Meant to get back to this but have been swamped

It seems Im going to have to get my hands dirty with XQuery to get what I want which isnt a bad thing.

Thanks for pointing me in the right direction

Another alternative i found was that you can open up individual files
and then export those to tables. This will mimize the size of the temp file that gets created. It isnt really ideal as it wil always created the temp file on the c:\ drive
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search