Re: SQL Profiler - error saving trace file

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: David Gugick (davidg-nospam_at_imceda.com)
Date: 10/07/04


Date: Thu, 7 Oct 2004 12:41:47 -0400

Andrew J. Kelly wrote:
> Liz,
>
> I assume you mean you ran the trace in the Profiler Gui and then are
> attempting to save the trace to disk from there? I can't actually
> say why it isn't working other than you are probably running out of
> memory. But in any case you should never run a long trace like that.
> Use sp_Trace_Create and the associated stored procedures to create a
> trace that will dump directly to disk without using Profiler at all.
> This is the least intrusive way to run a trace and will not suffer
> from your current issues. YOU can create a trace script that will do
> basically what I described from your current trace definition in
> Profiler. Go to the "File" menu and choose "Script Trace" at the
> bottom and then select "SQL 2000". That will allow you to save a
> trace script that you can run against your server and send the
> results directly to a file and avoid all this mess. You can then use
> the fn_trace_gettable function to import the data into a table when
> you are ready.
>
>
> "liz" <anonymous@discussions.microsoft.com> wrote in message
> news:1ab701c4ac6b$1b4b89f0$7d02280a@phx.gbl...
>> My trace won't save to disk. It starts to saves, but after
>> about 3 hours it returns the message - cannot save file,
>> with the path. I've got plenty of disk space. I've tried
>> saving to different local drives to no avail. I've also
>> tried to save to a table. I know this file is large. I
>> tracked everything possible for 3 db in a test environment
>> for several hours. One final bit of info - when saving the
>> file it saves to about 3.1 gigs then dies.
>>
>> I did find some info on Microsoft\support but we already
>> have SP 3 applied for our Enterprise Version of SQL
>> running on Win 2000, with 4 Gigs of Ram, 4 processors and
>> 2 drives of 100 Gigs free space. I really need this trace
>> and hope someone can shed some light on this
>> issue........thanks in advance. Liz

I agree with Andrew. In fact, even if you run a server-side trace from
Profiler, the Profiler application actually kicks off two independent
traces: one for the server-side trace and another that ships rowsets
across the network to the Profiler client - this just adds unnecessary
overhead.

You can easily script the server-side trace from Profiler, since the
code can be a bit messy.

-- 
David Gugick
Imceda Software
www.imceda.com


Relevant Pages

  • Re: Trace To Table Error MSG 568
    ... I tried stopping the trace but that did not help. ... It sounds like you are using rollover files. ... question if you are using Profiler for this. ... You'll have better control using a server-side trace. ...
    (microsoft.public.sqlserver.programming)
  • Re: Profiler Bug viewing trace flat file?
    ... The TextData column is definitely populated when I query resulting trace ... selected in Profiler and run from Profiler. ... declare @TraceID int ...
    (microsoft.public.sqlserver.tools)
  • Re: Profiler Bug viewing trace flat file?
    ... exec PostAvailableContractsCache_sp ... The TextData column is definitely populated when I query resulting trace ... selected in Profiler and run from Profiler. ...
    (microsoft.public.sqlserver.tools)
  • Re: Application Trace Profiler
    ... I have my debug event handling loop in a background thread, ... I tried this article and I was able to profile the Trace messages from my ... there any way to detach from the application so that the profiler can exit ... intercept the Trace statements of another running .NET application. ...
    (microsoft.public.dotnet.general)
  • Re: Profiler temp file
    ... Yes you are missing the whole point. ... Trace to a file without running profiler at all. ... shows how to create a script from scratch but if you follow my instructions ...
    (microsoft.public.sqlserver.tools)