Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Poor man's trace replay?

Author  Topic 

sureshot
Yak Posting Veteran

72 Posts

Posted - 2008-04-23 : 15:51:08

A while back I captured a large trace but only the SQL:BatchCompleted event and not the usual list of events so I'm not able to use the RML Utilities or Profiler to play it back. Really though all the queries are from the same login so there's no issue just playing them straight through I would think and using the stored duration to back calculate a start time and just play them all through. Are there any tools to do this or I am on my own having to whip something up?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-23 : 15:53:41
Just grab the TextData from each of the rows, copy and run it in a Management Studio window.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

sureshot
Yak Posting Veteran

72 Posts

Posted - 2008-04-25 : 14:06:56
That would unfortunately blast all the data across rather than pace it at the same rate as the original. Also I have 1.7GB of trace files.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-04-25 : 14:22:47
so then you can't replay them if it would blast alll your data, no?
or am i misunderstanding you?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

sureshot
Yak Posting Veteran

72 Posts

Posted - 2008-04-25 : 16:20:52
I'd be replaying in a test environment of a backup taken before the trace so I know and don't care if the data is affected. What I meant by blast is that just making one batch of all the TextData would send all the requests through as fast as possible in a sequential batch rather than playing them spaced apart at the same interval as the original trace.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-04-25 : 16:27:10
maybe this would work?

select 1
waitfor delay ...
select 2
waitfor delay ...
select 3
waitfor delay ...

etc...


_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-25 : 16:28:35
That would only work if there was only one connection performing queries in the trace.

You would need to write a program that would simulate the number of connections in the trace and then do as Mladen mentions.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -