December 14, 2010 at 8:34 am
I am trying to create a trace using the following where @outputfilename is "\\mycomputer\mysharedfolder\tracefilename"
exec @rc = sp_trace_create @TraceID output, 0, @OutputFileName, @MaxFileSize, @EndTime
The problem is that it does not create the file in that location and yet the trace is running on the serve
I have given full permission to "everyone" on that folder.
If I create a file named "tracefilename.trc" manually and then run the trace, it gives me a message that the file already exists.
Any ideas???
Thanks.
December 14, 2010 at 9:55 am
Sounds like you already have a trace running that's outputting to your desired filename.
What are the results of: select * from sys.traces
December 14, 2010 at 10:09 am
Did you remember to turn the trace on? sp_trace_setstatus needs to be run to turn it on. Till you do that, it won't create any files.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
December 14, 2010 at 1:14 pm
The trace is running but it does not create the file.
December 14, 2010 at 1:42 pm
When you run this: select * from sys.traces
What is in "path" ?
December 15, 2010 at 5:32 am
It is working and it is now creating the files. I have not made any changes since yesterday and this morning it is working and i have no clue why. But now when I try to open the trace file it gives me a message "There was a problem sending the command to the program". It is trying to open the file thru ATL/MFC Trace Tool. Any ideas?
Thanks for your time.
December 15, 2010 at 9:28 am
I'm not familiar with that tool. I use SQL profiler to open the .trc file
December 17, 2010 at 8:03 am
Thanks.
July 20, 2011 at 2:16 pm
Can you please post the script I want to see a sample so I can modify the file size
July 20, 2011 at 3:37 pm
You can try stopping and closing the trace. Then try again. I am not sure what your whole trace setup looks like, but you need to add events, columns, filters, etc. Here is an article that goes into the basics of tracing with SQL commands:
Microsoft's articles are really good as well.
Jason
Webmaster at SQL Optimizations School
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply