September 3, 2008 at 5:02 am
Hi everybody!
When we create a Trace using SQL Server Profiler, we can choose to save data either to file or table. If we select Save to Table, the trace data would be directly stored on the specified table.
My question is that, when we create a trace using SQL (using sp_trace_* stored procedures) is there any way to force the trace to store the data on a table rather than a file? Or we must use fn_trace_gettable to regularly flush the data to a table?
September 3, 2008 at 5:10 am
AFAIK on a server side trace you would need to use the function fn_trace_gettable to read the trace file(s) into a table
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
September 3, 2008 at 5:28 am
Does it mean that I always should flush the trace file into a table using fn_trace_gettable function? (Using Job for example)?
Isn't there any other solution?
September 3, 2008 at 10:02 am
The server-side trace will catch all events that it is set to monitor. It is also designed to limit the impact of tracing a SQL Server which is why it doesn't log to a SQL Server table. Profiler is NOT guaranteed to catch all events. Yes, you will probably need to use a job of some sort to transfer trace info from the trace files to a SQL Server table using the function Perry indicated above.
Is there another way of doing it, possibly, but I haven't had time to research other possible methods.
😎
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply