I was assigned to make sure our new disaster recovery solution based
on a VMWare virtual machine is feasible these days. By now we have
tested everything that need to be recovered on that vm and it went
terrific. The only issue that botheres us is performance, we need some
real data.
I googled a while and found Microsoft SQL Support team provied two
utilities read80trace and ostress. Read80trace could be used to
extract log records from sql profiler, ostress can be used to replay
those operations. It took me quite a few hours today to get hands on
them, well, for I am just a plain developer, not a professional
database administrator. And below is what I got.
1. Run SQL Profiler on the first server
And following events have to be selected.
Performance:
Show Plan Statistics
Stored Procedure:
RPC: starting
SP: stmtStarting
SP: stmtCompleted
TSQL:
batchStarting
2. Use read80trace to transform .trc files into .rml files
You've to be database administrator to create PerfAnalysis database in advance.
The syntax is: read80trace -IYourTrace.trc
Even though your trace files are many, here mention the first one is enough.
3. Use ostress to replay the operations.
The syntax is,
ostress -S ServerName -U username -P password -m replay -c sample.ini
-i c:\rml\output\*.rml
Here sample.ini is the control file provided by MS team, and
c:\rml\output is where my *.rml are stored. A weird point to mention,
if we don't type "-i" in the above command line, ostress will still
run and say successfully, I was completely fooled then.
Nevertheless, I am still confused at how to comprehend the testing
result, well, let me call it a day.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment