how to edit a sql server profile template using a text editor like notepad or ssms? I am running a trace where I need to filter the behaviour or about 50 users, and some 50 database objects.

I would like, for this purpose to create a sql server profile template and later edit it to add the events I want and the filters I want. How can I achieve that?

I have tried to save my template, but when I then try to open it using a text editor like notepad I get the result below:



On the other hand, if from inside sql server profile, I import my template, and use it to run a trace that is fine, but when I want to add my filters I would need to go through a manual process and there are too many filters and each needs to be added individually.



how can I achieve this by editing the template file?
Set up the trace for one user , start it and then on SQL Profiler File Menu

File --&gt; Export --&gt; Script Trace Definition


Though it is now recommended to use extended events instead of traces.