|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, February 27, 2013 1:38 PM
Points: 370,
Visits: 670
|
|
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.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 11:39 AM
Points: 2,551,
Visits: 7,205
|
|
Sounds like you already have a trace running that's outputting to your desired filename.
What are the results of: select * from sys.traces
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Monday, May 06, 2013 1:09 PM
Points: 15,439,
Visits: 9,569
|
|
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
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, February 27, 2013 1:38 PM
Points: 370,
Visits: 670
|
|
| The trace is running but it does not create the file.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 11:39 AM
Points: 2,551,
Visits: 7,205
|
|
When you run this: select * from sys.traces What is in "path" ?
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, February 27, 2013 1:38 PM
Points: 370,
Visits: 670
|
|
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.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 11:39 AM
Points: 2,551,
Visits: 7,205
|
|
I'm not familiar with that tool. I use SQL profiler to open the .trc file
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, February 27, 2013 1:38 PM
Points: 370,
Visits: 670
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, September 14, 2011 4:13 PM
Points: 16,
Visits: 41
|
|
| Can you please post the script I want to see a sample so I can modify the file size
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, October 27, 2011 1:53 PM
Points: 17,
Visits: 115
|
|
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:
SQL Performance Trace
Microsoft's articles are really good as well.
Jason
Webmaster at SQL Optimizations School
|
|
|
|