Top Queries is not displayed for the specific DB instance

Hi,

I'm unable to see Top Queries for one of the DB instance but other things are displayed. I tried to restart Redgate client but that didn't work. Can someone please help?


Answers

  • HMaedaHMaeda Posts: 1 New member
    Hello.

    I am using SQL Monitor 9.0.13.21542 and I am also getting the "An error occurred while attempting to display this data" for TOP QUERIES. 

    It only happens when there are bad data in RedGateMonitor Database, since if I change the startTime QueryString in the URL it works fine. 

    By the way, in the Chrome DevTools, the HTTP response is 500 and URL starts with https://localhost/TopQueries/base/localhost/GetTopQueries?.........

    Also, here is the complete Response from the call when it fails.
    "RedGate.SqlMonitor.Common.Networking.Client.Exceptions.RpcNoResultException: System.ArgumentException was thrown by method Query on service DataPresenterService:\nSystem.ArgumentException: An entry with the same key already exists.   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)   at System.Collections.Generic.TreeSet`1.AddIfNotPresent(T item)   at System.Collections.Generic.SortedDictionary`2.Add(TKey key, TValue value)   at RedGate.SqlMonitor.Channels.Data.ChannelInstanceDataBuilder.AddInstancePropertyValue[TValue](PropertyName propertyName, DateTime collectionDate, Option`1 instanceValueOrNone)   at RedGate.SqlMonitor.Channels.Data.ChannelInstanceDataBuilder.AddPropertyValue[TValue](PropertyKind propertyKind, PropertyName propertyName, DateTime collectionDate, Option`1 valueOrNone)   at RedGate.SqlMonitor.Channels.Data.ChannelInstanceDataBuilder.WeakAdd(PropertyKind propertyKind, PropertyType propertyType, PropertyName propertyName, DateTime collectionDate, Option`1 weakValueOrNone)   at RedGate.SqlMonitor.Engine.Monitoring.Core.Repositories.Sql.SqlDataRepositoryDataPresenter.DeserializeNonKeyPropertyValues(ChannelInstanceDataBuilder channelInstanceDataBuilder, IDataReader reader, QualifiedChannelName qualifiedChannelName, PropertyMap`1 propertySchemas, IEnumerable`1 nonKeyPropertyNames)   at RedGate.SqlMonitor.Engine.Monitoring.Core.Repositories.Sql.SqlDataRepositoryDataPresenter.GetPropertyValues(IDbConnection connection, IDictionary`2 channelInstanceRefToChannelInstanceDataBuilder, QualifiedChannelName channelName, PropertyMap`1 propertySchemas, IDataRepositoryQuery query)   at RedGate.SqlMonitor.Engine.Monitoring.Core.Repositories.Sql.SqlDataRepositoryDataPresenter.GetChannelInstanceDataUnderChannelInstanceRef(IDbConnection connection, ChannelTree`1 rootQueryTree, QualifiedChannelName qualifiedChannelName, ChannelQuery channelQuery)   at RedGate.SqlMonitor.Engine.Monitoring.Core.Repositories.Sql.SqlDataRepositoryDataPresenter.\u003c\u003ec__DisplayClass9_1.\u003cQuery\u003eb__0(QualifiedChannelName qualifiedChannelName, ChannelQuery channelQuery)   at RedGate.SqlMonitor.Channels.Data.ChannelBuilder.\u003c\u003ec__DisplayClass0_0.\u003cBuildChannel\u003eb__0(QualifiedChannelName a, ChannelQuery b)   at RedGate.SqlMonitor.Channels.Data.ChannelBuilder.BuildChannel(Channel rootChannel, QualifiedChannelName qualifiedChannelName, ChannelTree`1 channelQueryTree, Func`3 channelInstanceDataCollector)   at RedGate.SqlMonitor.Channels.Data.ChannelBuilder.BuildChannel(Channel rootChannel, QualifiedChannelName qualifiedChannelName, ChannelTree`1 channelQueryTree, Func`3 channelInstanceDataCollector)   at RedGate.SqlMonitor.Channels.Data.ChannelBuilder.BuildChannel(Channel rootChannel, QualifiedChannelName qualifiedChannelName, ChannelTree`1 channelQueryTree, Func`3 channelInstanceDataCollector)   at RedGate.SqlMonitor.Channels.Data.ChannelBuilder.BuildChannel(Channel rootChannel, QualifiedChannelName qualifiedChannelName, ChannelTree`1 channelQueryTree, Func`3 channelInstanceDataCollector)   at RedGate.SqlMonitor.Channels.Data.ChannelBuilder.BuildChannel(ChannelTree`1 rootQueryTree, Func`3 channelInstanceDataCollector)   at RedGate.SqlMonitor.Engine.Monitoring.Core.Repositories.Sql.SqlDataRepositoryDataPresenter.Query(Unit queryContext, IStatusLogger statusLogger, ChannelTree`1 rootQueryTree)   at RedGate.SqlMonitor.Channels.DataPresenters.Logical.TransformDataPresenter`1.Query(TQueryContext queryContext, IStatusLogger statusLogger, ChannelTree`1 logicalRootQueryTree)   at RedGate.SqlMonitor.Engine.Monitoring.Core.Repositories.SecureDataPresenter.Query(Unit queryContext, IStatusLogger statusLogger, ChannelTree`1 rootQueryTree)   at RedGate.SqlMonitor.RPC.DataPresenterServiceBase.Query(ChannelTreeMessage`1 rootQueryTreeMessage)   at RedGate.SqlMonitor.Common.Networking.Client.RpcSynchronousChannel.CallMethod(String serviceName, MethodInfo method, Object[] args)   at RedGate.SqlMonitor.Common.Networking.Client.RpcProxyGenerator.RpcChannelInterceptor`1.Intercept(IInvocation invocation)   at Castle.DynamicProxy.AbstractInvocation.Proceed()   at Castle.Proxies.IDataPresenterServiceProxy.Query(ChannelTreeMessage`1 rootQueryTreeMessage)   at RedGate.SqlMonitor.RPC.RpcDataPresenter`1.Query(ChannelTree`1 rootQueryTree)   at RedGate.SqlMonitor.Engine.Monitoring.Core.DataPresenters.RepositoryDataPresenterExtensions.GetChannel(IEnumerable`1 propertyNames, ChannelQueryTreeBuilder channelQueryTreeBuilder, IRepositoryDataPresenter dataPresenter)   at RedGate.SqlMonitor.Engine.Monitoring.Core.DataPresenters.RepositoryDataPresenterExtensions.GetSqlServerChannelForMachine(IRepositoryDataPresenter dataPresenter, QueryOptions queryOptions, String clusterName, String machineName, String sqlServerName, IEnumerable`1 propertyNames)   at RedGate.SqlMonitor.Engine.Monitoring.Core.DataPresenters.RepositoryDataPresenterExtensions.GetSqlServerChannel(IRepositoryDataPresenter dataPresenter, QueryRange queryRange, String clusterName, String sqlServerName, IEnumerable`1 propertyNames)   at RedGate.SqlMonitor.UI.Website.Controllers.TopQueriesController.IndexData(String clusterName, String sqlServerName, String databaseName, DateTime minDate, DateTime maxDate, Int32 maxResults)   at RedGate.SqlMonitor.UI.Website.Controllers.TopQueriesController.GetTopQueries(String clusterName, String sqlServerName, String databaseName, Int64 startTime, Int64 endTime, String selectedWait, Nullable`1 maxResults)   at lambda_method(Closure , ControllerBase , Object[] )   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)   at System.Web.Mvc.Async.AsyncControllerActionInvoker.\u003c\u003ec.\u003cBeginInvokeSynchronousActionMethod\u003eb__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.\u003c\u003ec__DisplayClass11_0.\u003cInvokeActionMethodFilterAsynchronouslyRecursive\u003eb__0()   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.\u003c\u003ec__DisplayClass11_2.\u003cInvokeActionMethodFilterAsynchronouslyRecursive\u003eb__2()   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.\u003c\u003ec__DisplayClass11_2.\u003cInvokeActionMethodFilterAsynchronouslyRecursive\u003eb__2()   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.\u003c\u003ec__DisplayClass11_2.\u003cInvokeActionMethodFilterAsynchronouslyRecursive\u003eb__2()   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.\u003c\u003ec__DisplayClass11_2.\u003cInvokeActionMethodFilterAsynchronouslyRecursive\u003eb__2()   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.\u003c\u003ec__DisplayClass11_2.\u003cInvokeActionMethodFilterAsynchronouslyRecursive\u003eb__2()   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)   at System.Web.Mvc.Async.AsyncControllerActionInvoker.\u003c\u003ec__DisplayClass3_6.\u003cBeginInvokeAction\u003eb__4()   at System.Web.Mvc.Async.AsyncControllerActionInvoker.\u003c\u003ec__DisplayClass3_1.\u003cBeginInvokeAction\u003eb__1(IAsyncResult asyncResult)   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)   at System.Web.Mvc.Controller.\u003c\u003ec.\u003cBeginExecuteCore\u003eb__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState)   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)   at System.Web.Mvc.MvcHandler.\u003c\u003ec.\u003cBeginProcessRequest\u003eb__20_1(IAsyncResult asyncResult, ProcessRequestState innerState)   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean\u0026 completedSynchronously)"


Sign In or Register to comment.