HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

I'm using the SQL Server Agent to schedule even non-database tasks - is this a bad idea?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thistheideanonsqlagentbaddatabasetasksusing

Problem

Since I'm a DBA (and in many cases, the de-facto sysadmin), SQL Server is installed on pretty much every server I have to work with regularly. I realized recently that I've been using the SQL Agent as the job scheduler in pretty much every case, rather than the native Windows Task Scheduler.

From my perspective, the SQL Agent has a number of advantages over the native Windows Task Scheduler:

  • Remote (from my workstation) start/stop/monitoring of tasks



  • Shared schedules (rather than each task on its own)



  • Multiple steps and control flow



  • Different types of tasks



  • Alerts on failure/completion



  • Can be configured to act as different users



  • (Moderately) descriptive error messages, rather than just an error code



However, I can't escape the feeling that this is bad practice - the SQL Agent should be reserved for just database-related tasks, and I should leave OS level tasks running in the Windows Task Scheduler, despite my dislike of its usability.

Is it okay to rely on the SQL Agent in this way? If not, should I consider a third-party Windows task scheduler to get some of the functionality I'm looking for?

Solution

At my previous job I did exactly this, mostly because the jobs were all run from our central, primary cluster, which was the most visible server. I could see all of our scheduled tasks in one place instead of having to go check command line stuff on a bunch of servers.

While this is largely subjective (and it's going to be hard to derive a "correct" answer in this format), I don't think there's anything inherently wrong with this approach other than it becomes a single point of failure.

That might not be relevant if all of the tasks interact with, or depend on, the database server being up and the SQL Server services running (in our case, it did).

Oh, and you need to add in error handling for cases where the server where the task tries to run is not up - something you wouldn't have to do if the task were set up on that server.

Context

StackExchange Database Administrators Q#30932, answer score: 9

Revisions (0)

No revisions yet.