February 23, 2009 at 5:07 am
Hello, everyone!
I am writing a batch of code that will allow my co-workers that have "sa" access to enable, configure and several SQL server functions automatically on each server, like Database Mail, Jobs for backups, mail account & profile, etc..
Since the script will be aimed at newly-installed SQL Servers, that do not auto-start SQL Server Agent automatically (shoot me if I'm wrong..:) ), I need to read some registry key or perform some "status check" command to warn them that they need to enable SQL Server Agent first.
I know that only experienced DBAs should perform this kind of configurations, but I don't have time for training them or making manual pages...
Any ideas?
It is not mandatory for the script to auto-start SQL Server Agent, at least it would be good for it to warn them that they must enable it first.
(In other words, tell them how to do their job 🙂 )
Thanks in advance,
Ivo Pereira
IT Consultant
Portugal
February 23, 2009 at 2:43 pm
Have you tried "sp_get_sqlagent_properties" stored procedure residing under msdb database. Execute it and you will see one column named "auto_start". Make use of it if useful.
MJ
February 25, 2009 at 4:38 am
Hello there!
Thank you very much for your help, indeed the sp you showed me returns a first row, auto_startup, that I can indeed use inside T-SQL to determine if the Agent is auto-starting.
Thanks in advance,
Ivo Pereira
IT Consultant
Portugal
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply