Sunday, February 19, 2012

Concurrent executions of "fn_trace_gettable" function are failing.

Hi,
While executing
select * from fn_trace_gettable('C:\Program Files\Microsoft SQL
Server\MSSQL.10\MSSQL\DATA\log.trc', default);
query simulateneously from multiple clients, only one
of them succeeds and all others give the following error message:
File 'C:\Program Files\Microsoft SQL Server\MSSQL.10\MSSQL\DATA\log.trc'
either does not exist or is not a recognizable trace file. Or there was an
error opening the file.
Seems like the "fn_trace_gettable" function is locking the trace log file
internally during it's execution. I do not have any alternative other than
executing the query simulateously from multiple clients. Can anyone suggest
a workaround for this problem?
Thanks,
NileshI haven't tested this myself, but definitely seems like a locking issue on
the file, and can see why that would be the case.
Can you load the file into one table first, and then use DTS to parallelly
copy that table to multiple locations?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Nilesh" <nilesh.oswal@.gmail.com> wrote in message
news:%23rXnKvzjEHA.3664@.TK2MSFTNGP12.phx.gbl...
Hi,
While executing
select * from fn_trace_gettable('C:\Program Files\Microsoft SQL
Server\MSSQL.10\MSSQL\DATA\log.trc', default);
query simulateneously from multiple clients, only one
of them succeeds and all others give the following error message:
File 'C:\Program Files\Microsoft SQL Server\MSSQL.10\MSSQL\DATA\log.trc'
either does not exist or is not a recognizable trace file. Or there was an
error opening the file.
Seems like the "fn_trace_gettable" function is locking the trace log file
internally during it's execution. I do not have any alternative other than
executing the query simulateously from multiple clients. Can anyone suggest
a workaround for this problem?
Thanks,
Nilesh|||Narayana,
I am firing this query from two datasets for generating a report (to be
deployed on SQL Reporting server). Unable to think of any workaround for
that. Any help would be greatly appreciated.
thanks,
Nilesh
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:eOsdGr1jEHA.384@.TK2MSFTNGP10.phx.gbl...
> I haven't tested this myself, but definitely seems like a locking issue on
> the file, and can see why that would be the case.
> Can you load the file into one table first, and then use DTS to parallelly
> copy that table to multiple locations?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "Nilesh" <nilesh.oswal@.gmail.com> wrote in message
> news:%23rXnKvzjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> Hi,
> While executing
> select * from fn_trace_gettable('C:\Program Files\Microsoft SQL
> Server\MSSQL.10\MSSQL\DATA\log.trc', default);
> query simulateneously from multiple clients, only one
> of them succeeds and all others give the following error message:
> File 'C:\Program Files\Microsoft SQL Server\MSSQL.10\MSSQL\DATA\log.trc'
> either does not exist or is not a recognizable trace file. Or there was an
> error opening the file.
> Seems like the "fn_trace_gettable" function is locking the trace log file
> internally during it's execution. I do not have any alternative other than
> executing the query simulateously from multiple clients. Can anyone
suggest
> a workaround for this problem?
> Thanks,
> Nilesh
>
>

No comments:

Post a Comment