Re: Replay Trace Profiler files with T-SQL code
- From: "Pat.Rick" <PatrickAlexander.email@xxxxxxxxx>
- Date: Fri, 17 Jul 2009 15:37:21 -0700 (PDT)
On Jul 17, 12:34 pm, "John Bell" <jbellnewspo...@xxxxxxxxxxx> wrote:
"Pat" <PatrickAlexander.em...@xxxxxxxxx> wrote in message
news:8d35cef6-9b4d-4972-9752-05311e6b81c8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HI Freinds,
SQL2008
I have collected trace files and need to replay them on my server only
using T-SQL
how can it be done ?
Thanks,
Pat
Hi Pat
Replaying trace files is a function of the SQL Profiler application, but you
can load the trace file into a database table (if you have saved it to a
file) using fn_trace_gettable(), then cursor through each
statement/procedure called use sp_executeSQL or EXEC to execute each
statement, although if you are using parameters this may be difficult.
Another option would be to export the profile as SQL statement which is
available on the file menu of SQL profiler and run the script it creates.
John
That worked, but how much of relastic load is when you run it as
scripts ?
.
- Follow-Ups:
- Re: Replay Trace Profiler files with T-SQL code
- From: Linchi Shea
- Re: Replay Trace Profiler files with T-SQL code
- From: John Bell
- Re: Replay Trace Profiler files with T-SQL code
- References:
- Replay Trace Profiler files with T-SQL code
- From: Pat
- Re: Replay Trace Profiler files with T-SQL code
- From: John Bell
- Replay Trace Profiler files with T-SQL code
- Prev by Date: RE: CREATE DATABASE with FILESTREAM Access Denied
- Next by Date: Re: Cannot fetch a row from OLE DB provider "BULK" for linked server
- Previous by thread: Re: Replay Trace Profiler files with T-SQL code
- Next by thread: Re: Replay Trace Profiler files with T-SQL code
- Index(es):
Relevant Pages
|