Friday, March 30, 2012
how to schedule sql profiler trace job
job in batch mode. From what I can find, sql profiler
can only be started manually. Any clue will be
appreciated.Wen,
See if this helps..
--SQL 2000:
INF: Job to Monitor SQL Server 2000 Performance and Activity
http://www.support.microsoft.com/?id=283696
--SQL 7.0:
INF: Job to Monitor SQL Server 7.0 Performance and Activity
http://www.support.microsoft.com/?id=286191
--SQL 6.5:
INF: How to Automate SQL Trace by Means of Scheduled Tasks
http://www.support.microsoft.com/?id=194860
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Wen Chang" <wchang@.siac.com> wrote in message
news:034c01c3465c$ebc30cf0$a501280a@.phx.gbl...
> I would like to know how to schedule a sql profiler trace
> job in batch mode. From what I can find, sql profiler
> can only be started manually. Any clue will be
> appreciated.|||Dinesh,
Thank you very much for the info.
I will try it out.
Wen Chang
>--Original Message--
>Wen,
>See if this helps..
> --SQL 2000:
> INF: Job to Monitor SQL Server 2000 Performance and
Activity
> http://www.support.microsoft.com/?id=283696
>--SQL 7.0:
> INF: Job to Monitor SQL Server 7.0 Performance and
Activity
> http://www.support.microsoft.com/?id=286191
>
>--SQL 6.5:
> INF: How to Automate SQL Trace by Means of Scheduled
Tasks
> http://www.support.microsoft.com/?id=194860
>
>--
>Dinesh.
>SQL Server FAQ at
>http://www.tkdinesh.com
>"Wen Chang" <wchang@.siac.com> wrote in message
>news:034c01c3465c$ebc30cf0$a501280a@.phx.gbl...
>> I would like to know how to schedule a sql profiler
trace
>> job in batch mode. From what I can find, sql profiler
>> can only be started manually. Any clue will be
>> appreciated.
>
>.
>
Friday, March 23, 2012
How to Run SQL Profiler with non-admin users
without assign admin rights? or Any alternative way? Thanks.Eco
I' affraid you cannot run it without being a members of sysadmin
"Eco" <eco@.hotmail.com> wrote in message
news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
>A user needs to run SQL Profiler, how can enable him to run this tool
> without assign admin rights? or Any alternative way? Thanks.
>|||Uri Dimant wrote:
> Eco
> I' affraid you cannot run it without being a members of sysadmin
>
>
> "Eco" <eco@.hotmail.com> wrote in message
> news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
> >A user needs to run SQL Profiler, how can enable him to run this tool
> > without assign admin rights? or Any alternative way? Thanks.
> >
> >
You must be a member of sysadmin fixed server role or have alter trace
permissions.
Regards
Amish Shah
http://shahamishm.tripod.com|||Sysadmin role membership is a requirement in SQL 2000. In SQL 2005, you can
grant ALTER TRACE to the user's login.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Eco" <eco@.hotmail.com> wrote in message
news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
>A user needs to run SQL Profiler, how can enable him to run this tool
> without assign admin rights? or Any alternative way? Thanks.
>|||Hi Eco
We have a tool called SQLBenchmarkPro that is designed precisely to meet
this requirement - it's a service based Trace management tool that allows
users to run traces against SQL 2000 (& SQL 2005) without needing sa
permissions. It also allows many other high-end trace management features,
such as scheduling, central collection, performance analysis etc. You can
download an eval at: www.GAJSoftware.com
Regards,
Greg Linwood
SQL Server MVP
"Eco" <eco@.hotmail.com> wrote in message
news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
>A user needs to run SQL Profiler, how can enable him to run this tool
> without assign admin rights? or Any alternative way? Thanks.
>|||ALL NOTED. Thank you very much!!
"Greg Linwood" <g_linwood@.hotmail.com> ¦b¶l¥ó
news:OrNU4IfwGHA.4968@.TK2MSFTNGP03.phx.gbl ¤¤¼¶¼g...
> Hi Eco
> We have a tool called SQLBenchmarkPro that is designed precisely to meet
> this requirement - it's a service based Trace management tool that allows
> users to run traces against SQL 2000 (& SQL 2005) without needing sa
> permissions. It also allows many other high-end trace management features,
> such as scheduling, central collection, performance analysis etc. You can
> download an eval at: www.GAJSoftware.com
> Regards,
> Greg Linwood
> SQL Server MVP
> "Eco" <eco@.hotmail.com> wrote in message
> news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
> >A user needs to run SQL Profiler, how can enable him to run this tool
> > without assign admin rights? or Any alternative way? Thanks.
> >
> >
>
How to Run SQL Profiler with non-admin users
without assign admin rights? or Any alternative way? Thanks.Eco
I' affraid you cannot run it without being a members of sysadmin
"Eco" <eco@.hotmail.com> wrote in message
news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
>A user needs to run SQL Profiler, how can enable him to run this tool
> without assign admin rights? or Any alternative way? Thanks.
>|||Uri Dimant wrote:
[vbcol=seagreen]
> Eco
> I' affraid you cannot run it without being a members of sysadmin
>
>
> "Eco" <eco@.hotmail.com> wrote in message
> news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
You must be a member of sysadmin fixed server role or have alter trace
permissions.
Regards
Amish Shah
http://shahamishm.tripod.com|||Sysadmin role membership is a requirement in SQL 2000. In SQL 2005, you can
grant ALTER TRACE to the user's login.
Hope this helps.
Dan Guzman
SQL Server MVP
"Eco" <eco@.hotmail.com> wrote in message
news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
>A user needs to run SQL Profiler, how can enable him to run this tool
> without assign admin rights? or Any alternative way? Thanks.
>|||Hi Eco
We have a tool called SQLBenchmarkPro that is designed precisely to meet
this requirement - it's a service based Trace management tool that allows
users to run traces against SQL 2000 (& SQL 2005) without needing sa
permissions. It also allows many other high-end trace management features,
such as scheduling, central collection, performance analysis etc. You can
download an eval at: www.GAJSoftware.com
Regards,
Greg Linwood
SQL Server MVP
"Eco" <eco@.hotmail.com> wrote in message
news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
>A user needs to run SQL Profiler, how can enable him to run this tool
> without assign admin rights? or Any alternative way? Thanks.
>|||Hi
With SQL 2005 there is an ALTER TRACE permission that allows you create
traces.
John
"unknown" wrote:
>|||ALL NOTED. Thank you very much!!
"Greg Linwood" <g_linwood@.hotmail.com> bl
news:OrNU4IfwGHA.4968@.TK2MSFTNGP03.phx.gbl g...
> Hi Eco
> We have a tool called SQLBenchmarkPro that is designed precisely to meet
> this requirement - it's a service based Trace management tool that allows
> users to run traces against SQL 2000 (& SQL 2005) without needing sa
> permissions. It also allows many other high-end trace management features,
> such as scheduling, central collection, performance analysis etc. You can
> download an eval at: www.GAJSoftware.com
> Regards,
> Greg Linwood
> SQL Server MVP
> "Eco" <eco@.hotmail.com> wrote in message
> news:%23uT9xFewGHA.428@.TK2MSFTNGP03.phx.gbl...
>
How to run profiler from cmd
We have a requirement to run profiler continuously to find out the
misbehaving applications/SQL in the dataserver. And we are not
interested in running it from an individuals local machine. Also we
want the profiler to start automatically whenever there are SQL Server/
Machine restarts.
Is there a way to invoke the profiler instance from cmd prompt or is
there a way to script the profiler?
Thanks in advance,
Thyagu.Here are the steps that can help you accomplish what you need:
1. Define your SQL Profiler Trace and script it. A good idea to place
restrictive filters to minimize the load on the production system. Make sure
the trace target is a file, not a table as it will have significant
performance impact. To script the trace use:
- SQL Server 2000 -File -Script Trace
- SQL Server 2005 -File -Export -Script Trace Definition
2. Modify the trace script and wrap it in a stored procedure. Add a couple
parameters to pass the target trace file, source database. etc. One of the
first statements in the generated trace script is calling sp_trace_create,
where you need to replace the target trace file as a parameter. And you can
add a call to sp_trace_setfilter (for example, EXEC sp_trace_setfilter
@.TraceId, 3, 0, 0, @.DbId) to set a filter for a specific database based on
database id that you can pass to the SP (or do not set that filter if you
want to trace for all databases). Also, the database can be one of the
preset filters in step 1 above.
3. Inside the stored procedure you can record the trace id to a table, so
later on if needed you can use the SP sp_trace_setstatus to stop the trace.
4. Create a job to schedule the stored procedure. In the schedule specify to
run automatically when SQL Server Agent starts.
BTW, this is the recommended way to run traces on production systems. If you
run a trace via the GUI you are actually running two traces: one that send
the trace to the target file, and another that sends the trace data to the
client running Profiler.
Regards,
Plamen Ratchev
http://www.SQLStudio.com