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?
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. 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 :. The "UserName" will vary with your logged in user, and the " But this really shouldn't be how you manipulate the trace templates The second step is to copy the files inside the aforementioned folder to match your new version.
Export and import succeeded, but the templates were not listed in the dropdown. The solution is open this folder:. Then open each folder other than which is the version , such as and , and copy files inside those folders to the folder, like so: in command line, if the above folder is current working folder.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. The "General" tab shown below is where you can enter a template name and, as we did above, select an existing template to base this template on.
Notice it also give you the option to make this template the default when you start SQL Profiler. Below is a screenshot of this tab with all the information entered. The other tab in this window is the "Events Selection" tab which I won't go into any detail here as we've seen this tab many times before.
Once you are done configuring your template click save and your template will be saved onto the file system. Now if we start a new trace session and expand the template dropdown we should see both of the templates we created above. The screenshot below shows this is indeed the case.
It's also easy to tell which templates you created as the template name is suffixed with " user ". The default template is specific for a given server type. Changing the default for one server type does not affect the default template for any other server type. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode.
Is this page helpful? Please rate your experience Yes No. Any additional feedback? Note In addition to traces from predefined templates, SQL Server Profiler also allows you to create them from a blank template, containing no event classes by default. Note The default template is specific for a given server type. Submit and view feedback for This product This page.
View all page feedback. In this article. Generic starting point for creating a trace. Captures all stored procedures and Transact-SQL batches that are run.
0コメント