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

Error In ReadTrace Importer When Importing Trace Files #71

Closed danbo0001 closed 3 years ago

danbo0001 commented 6 years ago

Hi,

I have a feeling this is due to some version conflicts, but have gone as far as i can in troubleshooting and now need some help.

Steps to reach issue:- Created a set of data collection config files using sqldiag config manager (latest version from github, v13.0.1600.32-public) that includes profiler traces. Ran the data capture on a SQL Server 2016 instance. Installed all versions of dependencies linked to from the current installation page links on this sqlnexus github site (https://github.com/Microsoft/SqlNexus/wiki/Installation) with the exception of sqlclrtypes for which i downloaded the sql server 2016 version instead of the 2014 one linked. Ran sql nexus 6.0.0.8 and started an import of the captured files. The import succeeded all the way up to the second last item - *.trc Message was "(Importer:ReadTrace (SQL Profiler TRC files). Import failed. (2 sec, 0 rows inserted)"

Please let me know if i have missed off detailing any info e.g. versions etcand i will add to this post asap.

I saw a message on this board mentioning that the linked version of rmlutilities has a version of readtrace which is not compatible with sql 2016. i followed the instructions to get hold of the newer versions of the 4 required files via the Database Experimentation Assistant, but the subsequent import failed in exactly the same way :(

Can anyone help?

Thanks Dan

danbo0001 commented 6 years ago

I just realised there is an rml utilities log file and have found more details on the error in there, here is a snippet containing the relevant bits:-

07/05/18 15:03:44.087 [0X000012AC] * ERROR: Attempt to initialize trace file reader failed with operating system error 0x80070005 (Access is denied) 07/05/18 15:03:44.087 [0X000012AC] Reads completed - Global Error Status 0xffffffe6 07/05/18 15:03:44.089 [0X000012AC] Signaling worker threads to complete final actions. 07/05/18 15:03:44.090 [0X000012AC] Waiting for the worker threads to complete final actions. 07/05/18 15:03:44.091 [0X000012AC] Performing general cleanup actions. 07/05/18 15:03:44.092 [0X000012AC] Total Events Processed: 0 07/05/18 15:03:44.093 [0X000012AC] Total Events Filtered: 0 07/05/18 15:03:44.094 [0X000012AC] ============================================== 07/05/18 15:03:44.095 [0X000012AC] WARNING: A significant portion of the events where filtered. 07/05/18 15:03:44.095 [0X000012AC] You may want to check the filtering criteria. 07/05/18 15:03:44.096 [0X000012AC] ============================================== 07/05/18 15:03:44.096 [0X000012AC] *****

so it sounds like a file access issue, but i gave "Everyone" modify access to the output folder and it still failed in the same way.

danbo0001 commented 6 years ago

I wonder if this is still supported.... It would be a shame if it isn't as it has helped me huge amounts over the years and I don't think there is anything else available that gives this kind of detail and analysis (feel free to shoot me down on this as long as you tell me what other stuff there is ;-)

Anyways, if anyone comes across this issue, I found the resolution - in desperation coz there was nothing else to try, I launched the sqlnexus exe as an administrator and the import of the trace files finally worked :)

PiJoCoder commented 3 years ago

Hello @danbo0001 . Thank you for reporting this. We apologize for such a long delay in responding to these issues. What you reported above is a RML Utilities issue, not strictly SQL Nexus. @suresh-kandoth for awareness. Yes, it appears that this is your core error "ERROR: Attempt to initialize trace file reader failed with operating system error 0x80070005 (Access is denied)" - file access issue. Is it possible that the account you are logged in with in the console and with which RML (Readtrace.exe) is exacuted does not have access to the folder/drive where those files are located? Also, I have seen Access Denied errors when Anti-virus locks files for scanning.