azuredatastudio icon indicating copy to clipboard operation
azuredatastudio copied to clipboard

Server Reports Top 10 DB Space Usage does not work on case sensitive instance

Open LitKnd opened this issue 8 years ago • 5 comments

  • SQL Operations Studio Version: 0.31.4 (mac)
  • Server Reports version: 0.1.2

Steps to Reproduce:

  • Install Server Report extension on an instance using case sensitive collation, then open the tab.
  • The 'Top 10 DBA Space Usage' graph will be blank, instead of showing data.
  • Click ...'Run Query'
  • The query will fail with multiple errors:

Msg 2812, Level 16, State 62, Line 10 Could not find stored procedure 'sp_msforeachdb'. Msg 2812, Level 16, State 62, Line 25 Could not find stored procedure 'sp_msforeachdb'. Msg 2812, Level 16, State 62, Line 39 Could not find stored procedure 'sp_msforeachdb'.

Thoughts on fixing this:

  • The proper case of this built in procedure is: sp_MSforeachdb. A quick fix would be to fix the case of the statement.
  • This built in procedure is officially unsupported and has been found to be unreliable by many users, so a longer term fix would be to use a different mechanism to loop between the databases. (Example post talking about the problems by Aaron Bertrand is here.)

case sensitive instance bug

LitKnd avatar Jul 24 '18 20:07 LitKnd

Hi @LitKnd, thanks for bringing this up and the nice gif.

It looks like @vickyharp opened this same issue: https://github.com/Microsoft/sqlopsstudio/issues/1799 She also suggested the same change.

I can check with engineering team to see if we can make an update. In the short-term, we can make this fix, but long term we can discuss a better approach.

yualan avatar Jul 25 '18 00:07 yualan

Thanks! Just realized I was only searching for open issues, so I missed it.

LitKnd avatar Jul 25 '18 14:07 LitKnd

I think this should already be fixed. I'll push an extension update later today.

kburtram avatar Jul 27 '18 19:07 kburtram

I published Server Reports 0.1.3 which should fix this. Please reactive if this problem persists with the latest extension. Thanks for reporting!

kburtram avatar Aug 01 '18 02:08 kburtram

Yes, it's beautiful now! Thanks.

LitKnd avatar Aug 01 '18 13:08 LitKnd