Skip to content

lolopop01/msdbctl

Repository files navigation

msdbctl

Cross-platform GUI for SQL Server Agent administration. Built for Linux and macOS where SSMS doesn't run, and usable on Windows too.

What it does today

  • Manage multiple SQL Server connections
  • Browse, create, edit, and delete SQL Server Agent jobs
  • Manage steps with T-SQL command bodies and on-success / on-failure flow (next / quit success / quit failure / goto step)
  • Create, attach, detach, and edit shared schedules (daily, weekly, monthly, on agent start, on CPU idle)
  • Enable / disable / start (optionally at step N) / stop jobs
  • Live job status and paginated run history
  • Server-side T-SQL syntax check (parse-only) for the step editor

Platforms

Linux, macOS, Windows.

(Not tested on macOS, but should work; Open an issue otherwise)

Building from source

Prerequisites:

git clone https://github.com/lolopop01/msdbctl.git
cd msdbctl

# GUI (dev)
pnpm install
pnpm tauri dev

# CLI
cargo run -p msdbctl-cli -- --help

CLI

msdbctl is a thin wrapper over the same core crate the GUI uses. Connections added in the CLI show up in the GUI on the next launch and vice versa.

msdbctl connection list
msdbctl connection add --name prod --host db1 --port 1433 --username sa --trust-cert
msdbctl connection test prod

msdbctl job list prod
msdbctl job status prod nightly_backup
msdbctl job history prod nightly_backup --limit 50
msdbctl job start prod nightly_backup [--at "Step 2"]
msdbctl job stop prod nightly_backup
msdbctl job enable|disable prod nightly_backup

Connections and jobs accept either the full UUID or a unique name (case- insensitive, prefix-match for connections).

Testing

cargo test --workspace          # unit tests, offline
scripts/itest.sh                # integration tests against a local SQL Server

itest.sh spins up the docker-compose SQL Server, applies tests/fixtures/seed.sql, and runs the #[ignore]'d integration suite under the test-support feature. See crates/msdbctl-core/tests/common/mod.rs for env overrides.

Minimum SQL Server permissions

  • Read-only views: SQLAgentReaderRole
  • Run/stop jobs: SQLAgentUserRole (own) or SQLAgentOperatorRole (any)
  • Create/modify/delete jobs: SQLAgentOperatorRole or sysadmin

See Microsoft's fixed msdb roles docs for specifics.

License

Apache License 2.0 — see LICENSE and NOTICE.

Trademarks

msdbctl is an independent open-source project and is not affiliated with, endorsed by, or sponsored by Microsoft Corporation. "Microsoft", "SQL Server", "SSMS", and "Windows" are trademarks or registered trademarks of Microsoft Corporation. Any use of those names here is purely nominative, to describe the product this tool interoperates with.

About

Cross-platform GUI and CLI for managing SQL Server Agent jobs - built with Rust, Tauri, and Svelte 5.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors