views:

215

answers:

3

I am trying to launch sql profiler 2008 from the command line launch. the syntax I used :

C:\Program Files\Microsoft SQL Server\100\Tools\Binn>profiler90 /S server /D dbname /U sa /P password /T "C:\Documents and Settings\template.tdf"

actual result: profiler opens, successful login happens but still I am forced to select a template.

Expected result: is there any other command line parameter I need to use to force profiler to take up a specified template.

Edit:

GBN: Thanks for the suggestions.

I did the following changes profiler90 changed to profiler modified the template path to : C:\Documents and Settings\myuser\Application Data\Microsoft\SQL Profiler\10.0\Templates\Microsoft SQL Server\100**templatename**

the physical folder specified above contains the template file.

still the problem persists

A: 

It's "profiler" in SQL Server 2008, "profiler90" in SQL Server 2005

The /T switch for both says

... The template name must be in either the system template directory or the user template directory. If two templates with the same name exist in both directories, the template from the system directory will be loaded. If no template with the specified name exists, the standard template will be loaded. Note that the file extension for the template (.tdf) should not be specified as part of the template_name.

So, it looks like your switch is wrong because of the path and the extension.

Edit:

Have you tried just the name?: .../T "templatename"...

gbn
A: 

GBN: Thanks for the suggestions.

I did the following changes profiler90 changed to profiler modified the template path to : C:\Documents and Settings\myuser\Application Data\Microsoft\SQL Profiler\10.0\Templates\Microsoft SQL Server\100**templatename**

the physical folder specified above contains the template file.

still the problem persists

+1  A: 

yes, it worked the correct one is /t "template name" and not the physical file name of the template. thanks!

balalakshmi