Thursday, February 16, 2012

"File not created" from sp_trace_create

I am getting a return code of 12 (""File not created"") from sp_trace_create.

I have checked to ensure that the path is valid. I am using Windows Authentication and the Windows Administrator account.

SQL Server is using the Windows userid that I created for SQL Server. I have verified (at least tried to verify) that the user for SQL Server has access to the folder containing it.

The following is the relevant portion of what I am attempting.

DECLARE @.RC int, @.TraceId int
Exec @.RC = sp_trace_create @.TraceId OUTPUT, 0, N'C:\TraceFile'


I have tried other paths that also do not work.I used a path that was for a FAT partition and that worked, so it was a file permission problem. I don't know how to determine what path would be valid for the SQL Server account but that is a different question.

No comments:

Post a Comment