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:

enter image description here

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.

enter image description here

how can I achieve this by editing the template file?


1 Answer 1


Set up the trace for one user , start it and then on SQL Profiler File Menu

File --> Export --> Script Trace Definition

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.