Error in Application Log

BokaBoka Posts: 17 Silver 3
edited June 29, 2017 7:40AM in SQL Search
Starting SSMS produces error in application log with following message:
SessionStartedUsageApiClient:Error during collection of environmental data for usage reporting
System.ArgumentException: The native call to get the monitor DPI returned a non-success exit code. Returned exit code was -2147024846
at RedGate.Usage.Client.Payload.SessionStarted.MonitorDpiInfoHelper.GetDpi(Screen screen, MonitorDpiType dpiType)
at RedGate.Usage.Client.Payload.SessionStarted.MonitorDpiInfoHelper.GetRawDpi(Screen screen)
at RedGate.Usage.Client.Payload.SessionStarted.DisplayDataSource.<>c__DisplayClass3_0.<GetDisplay>b__2()
at RedGate.Usage.Client.Payload.PayloadDataSourceBase.GetDataSafely[T](Func`1 getData)

I tried reinstalling Search and Framework but it doesn't help.

I'm working on vmware virtual desktop over thin client.
OS: Win 10 Enterprise, version 1703
SSMS: 13.0.1606.4
SQL Search: 2.4

In addition, maybe related to this error, after waking up desktop, SSMS is not responding and it'd be restarted.


  • Jessica RJessica R Posts: 950 Rose Gold 1
    Thanks for your post and so sorry to hear you're running into issues!

    From the error message, it looks like we are having some trouble getting your machine's DPI settings to include in our usage reports. Just to confirm- does that "SessionStartedUsageApiClient:Error during collection of environmental data for usage reporting" error in the Application Log actually cause SSMS to crash? Does it make any difference if you run SSMS as administrator?

    Regarding the issue of SSMS not responding after waking up your desktop, can I please first check--do you have any other Redgate tools installed aside from SQL Search and the SSMS Integration Pack Framework 1?

    Product Support Engineer | Redgate Software
  • BokaBoka Posts: 17 Silver 3
    Hi there,

    I'm not able to reproduce the problem but still have SSMS crashes from time to time. I'll run SSMS as administrator in the future to see if it makes a difference.
    Toolbelt is installed so aside SQL Search I have also SQL Prompt, Tab, Source Control and Test integrated in SSMS. As well as Compare, Data Compare,...
  • Jessica RJessica R Posts: 950 Rose Gold 1
    Thank you @Boka. I'd like to take a look at some of your log files, starting with SQL Prompt. Can you please locate these in %localappdata%\Red Gate\Logs\SQL Prompt 8? We have a support ticket open for you (#93028) and I will be in touch via the ticket so that you can reply with the logs.

    Thank you!
    Product Support Engineer | Redgate Software
  • BokaBoka Posts: 17 Silver 3
    Hi Jessica,
    Please find attached file with logs. Once again, please keep in mind very specific environment. I set it up just a few weeks ago. SSMS is producing problems from the very first moment (upgrade Win7 to Win10). And I'm not sure it is related to Red Gate products. Sometime I'm getting SQL Prompt error but very often SSMS is getting stacked without Red Gate error or warning.
    And finally, from tomorrow I'm on holiday and will be out of office until 7th August. If there is anything that I can do today I'm ready to answer asap.

    Kind regards
    Nebojsa Ilic (Boka), DBA, National bank of Serbia
  • Jessica RJessica R Posts: 950 Rose Gold 1
    Hi Boka,

    Ah I see, can I just check--what exactly is the problem on SSMS startup? Do you mean it's slow to start?

    I unfortunately didn't see any logged errors in the SQL Prompt log files. Do you recall the SQL Prompt error message that sometimes comes up?

    Could you please send your SQL Source Control and SQL Test log files also in %localappdata%\Red Gate\Logs\?

    (In case I've missed you today, have a great holiday!)
    Product Support Engineer | Redgate Software
  • BokaBoka Posts: 17 Silver 3
    Hi Jessica,
    I'm back from holiday so for the first moment check log files that you can find attached
Sign In or Register to comment.