سؤال

I want to change a particular entry in a trace file. How can I do it?

I have received a set of trace files which were run on the prod server. From these I was trying to get a set of RML files to replay the load on a different environment. To change the .trc files to RML files I ran readtrace.exe

However, readtrace did not output RML files. Looking at the logs I see the following error

06/06/12 15:43:20.914 [0X0000060C] SPID: 118 Seq: 50736293 [Error: 110003][State: 0][Abs Char: 233][Seq: 0] SYNTAX ERROR: String is missing proper closing quote near (Char Pos: 0x139 Byte Pos: 0x272)

It then clearly shows the entry which is causing this error. While I have sent the bug to the dev team and the fix will go out in the next release, I need to use the current trace file to generate and replay the load. Thus I want to fix the particular entry in the trace file which is causing this error.

Is it possible? I tried opening the trace file in wordpad but wordpad crashed, not surprising that given the trace file is 250MB. Trying to install Vim and see if I can open and change the trace file there, but was wondering if anyone knew of an easier method to do this.

هل كانت مفيدة؟

المحلول

I could not find a way to do this, so finally going the expected way of requesting for a new server side trace, which is taken after the fix has been put.

Before that I did try to load the trace files into a table, then load in profiler and then change the values which I needed and generate a new trace file, but crticial events needed for RML generation are lost when you load to profiler. I also opened a smaller trace file in wordpad and found that I could not edit the contents as there was binary content as well and it wasnt clear what text editing would achieve.

Thus in the end, the only way to get a trace which can generate RML files was to fix the bad query in the code and push the fix and then take the trace once again.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top