I have an extended event session to track deadlocks, and have the data storage set up for Event_File, max file size of 20 MB, max number of files is 5, enable file rollover is true.
It looks like I can't change the data storage, even after I stop the session. It's all grayed out. I need to be able to increase the number of files, because for some reason it's not actually going to the max file size of 20 MB. I have 4 files already for this session, and the largest size is 47 KB.
How can I increase this? Do I just need to re-create the session? I already have history in it that I want to keep.
Best Answer
To keep the history just stop the session and copy all the event files for that session to another place. You can query them like the example provided by Dan Guzman's answer. You can query those files even if the event session that created them no longer exists.
About the files never reaching the specified size, it might be related to the chosen size, as you can see on the Event File Target doc:
Also, by stopping and starting a session a new file is created even though the limit size has not been filled on the previous file.
To alter the
max_file_size
of an existing XE Session (let's say the one from the answer I linked above) it would be something like this: