Re: how to write sql to use Profiler to capture sql and sp running longer than 5 sec

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Uri Dimant (urid_at_iscar.co.il)
Date: 02/02/05


Date: Wed, 2 Feb 2005 10:46:04 +0200

Hi
In the subject you write "how to write sql to use Profiler to capture sql
and sp running longe" but when you ask the question you wrote
 i don't want to use Profiler.

Look up system stored procedures in the BOL that you can run to capture the
DML.
sp_trace_create for example

"Mullin Yu" <mullin_yu@ctil.com> wrote in message
news:uP5CJ%23PCFHA.2676@TK2MSFTNGP12.phx.gbl...
> hi,
>
> i have two db, say db1 and db2. i want to create a sql statement to
capture
> those sql statement and sp running longer than 5 sec.
>
> any hints? i don't want to use Profiler.
>
> thanks!
>
>



Relevant Pages

  • Re: Capturing SQL code that generates error
    ... Profiler to capture the statement and the error. ... Installer .MSI schema into a SQL database. ... the error message is produced. ...
    (microsoft.public.sqlserver.server)
  • Re: find out how often is a table get updated/inserted
    ... You can use profiler, capture the data to a file or table... ... The event should be SQL Statement Ending. ... Wayne Snyder, MCDBA, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: Auditing SP Execute.
    ... I want to capture the user name and the time (using sql). ... i dont want ... to run profiler for ever. ...
    (microsoft.public.sqlserver.security)
  • RE: How can I get the last login date for a login ????
    ... You could capture it using SQL ... Profiler and output the information to a SQL table, ... triggers on user tables to track this. ...
    (microsoft.public.sqlserver.security)
  • Re: SQL Profiler
    ... > ich verwende SQL Server 2000. ... > die mir mit SET STATISTICS ON; ... > Ich habe im SQL Profiler unter "Leistung" Execution Plan, ...
    (microsoft.public.de.sqlserver)