Can profiler templates be migrated to newer versions of SQL Profiler?

淺唱寂寞╮ 提交于 2019-12-10 02:44:59

问题


Is it possible to migrate Profiler templates to newer versions of SQL Server?

In my case I want to take my SQL 2008 templates to 2012. I've tried (1) a straight file copy and (2) an export/import. In both cases the older templates run, but cannot be modified. Modifications result in the following error:

I've got a bunch of custom templates and I'm trying to avoid recreating them by hand. Although, I guess that is the fallback position. Thoughts?


回答1:


Export the template from SQL Server 2008's version of Profiler (I assume you have already done that).

Now open 2012 Profiler, go to File > Templates > Import and choose your .tdf file.

You will have a new user trace template with the name [filename] (without the .tdf). Go to File > Templates > Edit and pick the trace template you imported. You should then be able to edit the server type by pulling the dropdown :

Then you can save the template and that should be the server type when you start a new trace using that template. When you pick the different server type, the template name disappears, but if you save it does edit the selected template.

Note: this all taken from a previous question on dba.stackexchange.com.




回答2:


Yes, I managed to move mine from 2012 to 2014.

Export from 2012. Import into 2014.

At this stage the new template will only run agains 2012 instances of SQL Server, and not your local 2014 one.

Ensuring profiler is closed, you need to go to explorer and copy the file from the folder representing 2012 templates to the 2014 one:

C:\Users\YOURUSERNAME\AppData\Roaming\Microsoft\SQL Profiler\12.0\Templates\Microsoft SQL Server\120



来源:https://stackoverflow.com/questions/12538494/can-profiler-templates-be-migrated-to-newer-versions-of-sql-profiler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!