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

Getting error "There is already an open DataReader associated with this command" when running Perfstats Analysis (post import) #116

Closed PiJoCoder closed 3 years ago

PiJoCoder commented 3 years ago

Need to investigate

image

PiJoCoder commented 3 years ago

From log

...
SQLNexus Information: 0 : End of Post-Import processing
    DateTime=2021-05-17T15:44:13.1984805Z
SQLNexus Information: 0 : Running Perfstats Analysis
    DateTime=2021-05-17T15:44:13.2034804Z
SQLNexus Information: 0 : Db name = 'sqlnexus'
    DateTime=2021-05-17T15:44:13.2064781Z
SQLNexus Information: 0 : Executing PerfStatsAnalysis.sql ...
    DateTime=2021-05-17T15:44:13.2074786Z
SQLNexus Information: 0 : Import failed.
    DateTime=2021-05-17T15:44:13.8023364Z
SQLNexus Critical: 0 : Exception: There is already an open DataReader associated with this Command which must be closed first.. Source: NexusInterfaces. Stack:    at NexusInterfaces.CSql.ExecuteBatches(String[] batches) in C:\Users\user\Documents\Visual Studio 2015\Projects\Repos\SqlNexus\NexusInterfaces\CSql.cs:line 148
   at NexusInterfaces.CSql.ExecuteSqlScript(String script) in C:\Users\user\Documents\Visual Studio 2015\Projects\Repos\SqlNexus\NexusInterfaces\CSql.cs:line 44
   at sqlnexus.fmImport.RunScript(String scriptname) in C:\Users\user\Documents\Visual Studio 2015\Projects\Repos\SqlNexus\sqlnexus\fmImport.cs:line 1198
   at sqlnexus.fmImport.DoImport() in C:\Users\user\Documents\Visual Studio 2015\Projects\Repos\SqlNexus\sqlnexus\fmImport.cs:line 974. InnerException: .
    DateTime=2021-05-17T15:44:13.8180007Z