Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the trace templates saved to?

I recently created a profiler template, and I was wondering where it is saved to? The reason that I'm asking is because sometimes when I log to another instance of SQL Server my template is not there for use. I know this could be because of the SQL server version, but I was wondering if the template is saved on the server where the SQL instance is located or is it on my local computer?

like image 822
ZeRaTuL_jF Avatar asked Aug 05 '14 16:08

ZeRaTuL_jF


1 Answers

SQL Profiler Trace Templates are specific to the SQL Server version... templates for 2008 will not work for 20012 and vice-versa.

The way you need to deal with this is to either manually create one for each server version, or export/import the trace templates.

To move a template from one instance to another, just export the source, and then import it into the destination. This works more reliably than trying to find the template files on disk and then copying them around.

Just open SQL Profiler, and go to File->Templates, and use the Export and Import functions there.

As for where the files are stored, they're tucked away in your hidden AppData folder at this approximate location (varies depending on version, and you'll need to enable the display of hidden folders before you'll see it):

C:\Users\UserName\AppData\Roaming\Microsoft\SQL Profiler\10.0\Templates\Microsoft SQL Server

The "UserName" will vary with your logged in user, and the "10.0" will vary with your version of SQL Server. But this really shouldn't be how you manipulate the trace templates... you should use the Export/Import facility to move templates around.

like image 186
pmbAustin Avatar answered Sep 23 '22 16:09

pmbAustin