|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2141
|
|
[12.1.279 Pro] - SQL Profiler |
|
When I try to profile anything in the SQL Profiler, I'm given an error message:
|
|
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 |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
Could you please check the result of
|
|
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 |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2141
|
|
|
|
That query yields an empty result set.
|
|
Thu Oct 20, 2022 9:55 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
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 |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2141
|
|
|
|
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 |
|
|
|
|
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
|
|
|