Skip to content

A lightweight app to execute a variety of SQL queries across multiple SQL databases at different intervals.

License

Notifications You must be signed in to change notification settings

nathanthorell/dba-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dba-agent

A lightweight app to execute various SQL queries against various SQL databases on various schedules. Initial intent was to run various MaintenanceSolution commands from Ola Hallengren when there's no SQL Agent available (like in Azure SQL Database) or when you want your scheduling across many servers to be centralized.

Build and Execute

  • go build -o ./build/dba-agent .
  • ./build/dba-agent

Required Environment Variable Configuration

Database connection strings should be stored as Environment Variables. Each named variable needs to be referenced in the config.toml

Here's an example: Localhost_DBCONN="server=localhost;user id=sa;password=TestPassword;port=1433;database=MyDb"

Config Adjustments

  • This app currently is driven by the config.toml file. The included file just has placeholder values that should be modified to meet your needs.
  • The main requirements are:
    1. [[db_servers]] section containing "name" and "conn_string_variable" values.
    2. [[db_queries]] section containing "name", "query", "schedule", and "server".
  • The "server" value in db_queries needs to reference the "name" value from one of the db_servers.

About

A lightweight app to execute a variety of SQL queries across multiple SQL databases at different intervals.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages