Home Dashboard Directory Help
Search

SQL Profiler "Failed to restart a trace" by Philip Kelley


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


2
0
Sign in
to vote
Type: Bug
ID: 271520
Opened: 4/17/2007 2:37:14 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Working with SQL Server 2005 Profiler on sp2a, I "drilled down" (run trace, observe, stop, reset, run trace, observe...) on a particular set of events and columns in a particular aggregation that I wanted to study. At a certain point, when I try to run the trace, all I get is a small dialog window saying "Failed to restart a trace". I can find no quick info on this on the web. This has happened to me a few times now. I've poked at things a bit to try and get it to run (including saving the trace, closing Profiler, and starting it up again) , but I'm not going to burn time trying to second-guess what column needs to be re-added for this to start working again.

I scripted out the trace and copied it here:

/****************************************************/
/* Created by: SQL Server Profiler 2005             */
/* Date: 04/17/2007 04:34:11 PM         */
/****************************************************/


-- Create a Queue
declare @rc int
declare @TraceID int
declare @maxfilesize bigint
set @maxfilesize = 5

-- Please replace the text InsertFileNameHere, with an appropriate
-- filename prefixed by a path, e.g., c:\MyFolder\MyTrace. The .trc extension
-- will be appended to the filename automatically. If you are writing from
-- remote server to local drive, please use UNC path and make sure server has
-- write access to your network share

exec @rc = sp_trace_create @TraceID output, 0, N'InsertFileNameHere', @maxfilesize, NULL
if (@rc != 0) goto error

-- Client side File and Table cannot be scripted

-- Set the events
declare @on bit
set @on = 1
exec sp_trace_setevent @TraceID, 51, 24, @on
exec sp_trace_setevent @TraceID, 51, 51, @on
exec sp_trace_setevent @TraceID, 51, 12, @on
exec sp_trace_setevent @TraceID, 52, 16, @on
exec sp_trace_setevent @TraceID, 52, 24, @on
exec sp_trace_setevent @TraceID, 52, 51, @on
exec sp_trace_setevent @TraceID, 52, 12, @on


-- Set the Filters
declare @intfilter int
declare @bigintfilter bigint

set @intfilter = 50
exec sp_trace_setfilter @TraceID, 12, 0, 4, @intfilter

-- Set the trace status to start
exec sp_trace_setstatus @TraceID, 1

-- display trace id for future references
select TraceID=@TraceID
goto finish

error:
select ErrorCode=@rc

finish:
go
Details
Sign in to post a comment.
Posted by Microsoft on 1/31/2008 at 1:51 PM
From the build you have mentioned in this bug, it looks like you are using RTM version. We could not repro this on latest service pack(SP2). If you run into this issue after installing SP2, feel free to reactivate this bug.

Thanks
Posted by Microsoft on 10/15/2007 at 11:44 AM
We could repro this in-house. Thanks for reporting this.

We will evaluate this bug and consider it for future release.

Thanks
Posted by Microsoft on 10/15/2007 at 11:19 AM
Thanks for taking time to open bug to track this issue.

We tried on dev edition and could load the trace successfully. We will try against Enterprise edition and if it repros we will consider addressing it for next release.

Thanks,
Gops Dwarak
Posted by Microsoft on 10/15/2007 at 11:19 AM
Thanks for taking time to open bug to track this issue.

We tried on dev edition and could load the trace successfully. We will try against Enterprise edition and if it repros we will consider addressing it for next release.

Thanks,
Gops Dwarak
Sign in to post a workaround.