|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 3:40 PM
Points: 258,
Visits: 796
|
|
Hi all,
I created a trace in Profiler GUI. I set it to save results to a table and it is working good.
But if I script trace definition, it does not provide anything to save it to table. System procedure sp_trace_create has only option to save to a file.
Is it possible to save it to table at all with script or I am missing something? My version is 2008 R2.
Thanks
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 2:19 AM
Points: 1,257,
Visits: 4,258
|
|
| I don't think you *can* do it directly to a table, no--you have to use the fn_trace_gettable function to copy the trace file into a table.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 3:40 PM
Points: 258,
Visits: 796
|
|
Thanks for advise, I did not know about this function.
So it sound like I have to create a job which on periodical basis will call this function and load trace file contents into a table, with specifying the last trace RowNumber from the table in order not to get duplicates.
Not a perfect solution, but so far I could not find better one.
Thanks again.
|
|
|
|