microsoft / SqlNexus

SQL Nexus is a tool that helps you identify the root cause of SQL Server performance issues. It loads and analyzes performance data collected by SQL LogScout, SQLDiag or PSSDiag. It can dramatically reduce the amount of time you spend manually analyzing data.
MIT License
356 stars 101 forks source link

ReadTrace cannot find XEL files #105

Closed olegk25 closed 3 years ago

olegk25 commented 3 years ago

Hello,

it might be a silly question, but I have troubles feeding XEL files to ReadTrace:

Here is a set of XEL files in my current directory:

PS: >ls *.xel
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         2/10/2021   4:24 PM         269824 XETraceCapture_0_132574658942880000.xel
-a----         2/10/2021   4:25 PM         269824 XETraceCapture_0_132574659228590000.xel
-a----         2/10/2021   4:27 PM         269824 XETraceCapture_0_132574660470990000.xel
-a----         2/10/2021   4:27 PM         269824 XETraceCapture_0_132574660691320000.xel

And here is an attempt to parse them:

PS:> .\ReadTrace.exe -I'XETraceCapture.xel' -S'MSSSQL' -d'PP' -E -T26

02/11/21 11:19:46.074 [0X00005530] Detecting list of matching XEL files in the same directory
02/11/21 11:19:46.074 [0X00005530] ERROR: XEL file should be in the format  BaseFile_%d_%I64u.XEL
02/11/21 11:19:46.074 [0X00005530] ERROR: Attempt to determine list of .XEL files faile

Explicit file name does not work either... am I missing something here? Any help is appreciated.

suresh-kandoth commented 3 years ago

You have to point to the first file in the collection. Here are the parameter definitions:

-I File name of the first .TRC or .XEL file to process [REQUIRED]. -i If specified, indicates that the .TRC file(s) to process are present inside a CAB/ZIP/RAR file with this file name -o Full path of directory to place output files [default is current directory] -S Name of SQL Server 2005 server to connect to when loading performance analysis data [default is (local)] -d Database to use when loading performance data [default is PerfAnalysis]. User specified below must have CREATE DATABASE permission (if DB doesn't exist) or be part of the db_owner role if the database already exists. -E Connect to SQL using Windows Authentication [default] -U Connect to SQL using this user name -P Password for the user specified in -U option -a Disable performance analysis -f Do not produce .RML output files for each Session and Request -Q Do normalization parse using quoted_identifier OFF symantics. (Default is ON) -F File name containing the normalize filter matches -r# Read at most this # of files (including the first) [default is all files until a break in the rollover file sequence is detected]. -M Mirror trace events by Session to the specified output directory (All Sessions will be output even if Session filter is specified) -MF Mirror trace events by Session to the specified output directory (Only Sessions matching filter parameters will be output) -MS Mirror trace events to a single .TRC file in the specified output directory. -M[FS] or -M[SF] Combine mirror filtering with single .TRC file output NOTE: The mirroring option may be overwritten because the source metadata information indicates such a change. -A 'INCLUDE or EXCLUDE' events with Application Names -C 'INCLUDE or EXCLUDE' events with Database Names when possible -H 'INCLUDE or EXCLUDE' events with Host Names -s# 'INCLUDE or EXCLUDE' events from specified Sessions -X# 'INCLUDE or EXCLUDE' events based on Event Class value -x# 'INCLUDE or EXCLUDE' events based on SubClass value -B### Time bias: Adjusts the start and end times, as read by (+-)### minutes. -b Provide a designated start time in required format 2000-05-25 11:46:20:060 -e Provide a designated stop time in required format 2000-05-25 11:46:20:060 -D Skip date on log file output -L Integer value representing the language id -Y Optional scratch path used by Expander when handling compressed files. If you processing lots of files from a nested archive this can increase performance. -? Show usage of command line parameters

EXAMPLES: ReadTrace -Iserver__sp_trace.trc -ic:\temp\traces.cab -oc:\temp\output -f ReadTrace -I"c:\my traces\80AllEvents.trc" -o"c:\my output" ReadTrace -Ioutput\SQLSRV1__sp_trace_20.trc -ic:\temp\pssdiag.zip -oc:\temp\breakout -f -r2

ram2ybabu commented 3 years ago

Please let us know if the issue is resolved with above explanation ?

olegk25 commented 3 years ago

Hello,

Yes, specifying the very first file in the sequence did the trick. Thank you very much!

olegk25 commented 3 years ago

Closing as resolved