SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[12.1.279 Pro] - SQL Profiler

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[12.1.279 Pro] - SQL Profiler
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post [12.1.279 Pro] - SQL Profiler Reply with quote
When I try to profile anything in the SQL Profiler, I'm given an error message:
Quote:

Unable to create server trace
Msg 19068, Level 16, State 1, Proc "sp_trace_create", Line 1, The trace file path is not valid or not supported.
Msg 50000, Level 16, State 1, Can not create SQL trace. SQL Server returned error status 18

DECLARE @rc INT, @trace_id INT, @msg NVARCHAR(max), @maxfilesize BIGINT = 5, @stoptime DATETIME = DATEADD(year, 1, getdate())
EXEC @rc = sp_trace_create @trace_id OUTPUT, 2, N'sa-20221017-134726-table', @maxfilesize, @stoptime, 10
IF @rc != 0
BEGIN
SET @msg = 'Can not create SQL trace. SQL Server returned error status ' + CONVERT(VARCHAR, @rc)
RAISERROR(@msg, 16, 1)
END
ELSE
SELECT @trace_Id AS trace_id.


Any hints on how to fix this?
Mon Oct 17, 2022 7:57 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Reply with quote
Could you please check the result of

Code:
SELECT [path] FROM sys.[traces] WHERE is_default = 1


To figure out path for temporary trace files, it searches for location of the default trace, and uses the same path. In the error message I see that trace file name is N'sa-20221017-134726-table' without path, which makes me think it's unable to locate the default trace, or maybe a permissions issue.
Mon Oct 17, 2022 7:25 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post Reply with quote
That query yields an empty result set.
Thu Oct 20, 2022 9:55 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Reply with quote
That explains it. It appears that the default trace is not enabled, and the server is not configured to have default path for trace files, which prevents SA from starting a SQL Profiler trace session.
Thu Oct 20, 2022 4:15 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post Reply with quote
I see. How does the SQL Server Profiler work? Why it is not impeded by the lack of this configuration being set?
Fri Oct 21, 2022 9:17 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.