Toad World® Forums

capture & replay

When i used benchmark factory to capture workload from SQL server production, i don’t know how replay this capture file against test environment

please help me in details how do this?


Hi - Here is a link to the online documentation which explains how to replay a SQL Server capture. Let us know if you have additional questions.…/capture-and-replay-sql-server-workload

thanks for your reply

when i read i found that we can replay against source database as shown below:

To test the captured workload against the database from which it was captured, select The capture will be tested against source server.

but i want to replay capture workload against test database not source database, How i can do that?

The easiest way to replay a capture is to use the New Job Wizard. When in the wizard you will set up a connection to your target database (the one you want to replay the capture against) and then choose Capture/Replay Test on the Workload screen under the “Select the type of test to run” area. If it’s a SQL Server connection, you will see options for SQL Server which will include Capture and Replay SQL Server Workload.

thanks for your efforts with me

when i using new job wizard with connection to target database which want to replay capture against. I choose Capture/Replay Test on the Workload screen.

after that navigate to another window to choose existing capture or new capture

I choose the existing capture…what the next step to me to replay this capture?

what is the difference between capture/replay test and replay load from SQL server trace table test?

To create the replay of the capture just, after selecting the existing capture, click the Import Test button.

The Capture/Replay performs automatically for you several other steps, like the backup/restore, which are needed to perform a successful replay. The import from SQL Server Trace table just create a replay from data stored in a SQL Profiler table and does not have the other steps. You will want to do the capture replay.

I did this steps but I get error that the trace file is invalid

do you know why?

What is the error message you are receiving? It may be that you did not actually capture any activity based on your capture criteria so no trace file was generated.


So from the BMF console machine can you access “C:\directory share\test” directory and the sub-directory for the capture as shown in the error message? Does the capture directory contain any trace files?

If I would capture a trace from a production environment of a ERP system for example ordering parts. If I would play that back onto a test environment that doesn’t have the same data of parts wouldn’t these fail. We use ID’s to look up many items with our stored procedures and I am trying to understand how this would work to recreate this load when the ID’s may not exist.

Yes it would fail if the test system didn’t have the same data. During the capture BMF records all the SQL as well as all bind values. That way when the captured workload is replayed, it will replay with the same data as well all relative timings between sessions and their SQL statements.