Server Reports Top 10 DB Space Usage does not work on case sensitive instance
- 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.)

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.
Thanks! Just realized I was only searching for open issues, so I missed it.
I think this should already be fixed. I'll push an extension update later today.
I published Server Reports 0.1.3 which should fix this. Please reactive if this problem persists with the latest extension. Thanks for reporting!
Yes, it's beautiful now! Thanks.