Skip to content

Skip running jobs collector when login lacks msdb access#661

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/656-msdb-access
Mar 20, 2026
Merged

Skip running jobs collector when login lacks msdb access#661
erikdarlingdata merged 1 commit into
devfrom
fix/656-msdb-access

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Closes #656

Summary

  • Add HAS_DBACCESS('msdb') check to the connectivity probe so we detect msdb permissions at connect time
  • Gate the running_jobs collector via IsCollectorSupported() — collector is silently skipped instead of failing
  • Show a yellow warning message on the Running Jobs tab: "Running Jobs requires msdb access. Grant the login access to msdb to enable this feature."

Changes

  • ServerConnectionStatus.HasMsdbAccess — new property, defaults to true
  • ServerManager.cs — connectivity probe query adds HAS_DBACCESS(N'msdb') column
  • RemoteCollectorService.csIsCollectorSupported() gates running_jobs on hasMsdbAccess
  • ServerTab.xaml / .cs — warning TextBlock, collapsed by default, shown when !hasMsdbAccess
  • MainWindow.xaml.cs — passes status.HasMsdbAccess to ServerTab constructor

Test plan

  • Connect with sa login — Running Jobs tab works normally, no warning
  • Connect with a login that lacks msdb access — warning shown, no collector errors in log
  • Azure SQL DB / AWS RDS — existing gates still skip running_jobs before msdb check

🤖 Generated with Claude Code

- Add HAS_DBACCESS('msdb') check to the connectivity probe in ServerManager
- Store HasMsdbAccess on ServerConnectionStatus (defaults to true)
- Gate the running_jobs collector on HasMsdbAccess in IsCollectorSupported()
- Show a warning message on the Running Jobs tab when msdb access is denied

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit d493203 into dev Mar 20, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/656-msdb-access branch April 9, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant