Code Makes Sure the SQL Agent Service Is Running
Many programs depend on the SQL Agent Service. This code ensures that the SQL Agent Service is running.
April 14, 2005
Many of the programs I’ve written depend on the SQL Agent Service. To make sure that no one has configured this service to run manually (I’ve encountered many idiosyncrasies in my job), I rely on the piece of code that Listing 1 shows. This code ensures that the SQL Agent Service is running. You can also transform it into a startup procedure, as Listing 2 shows.
— Andre Vigneau
[email protected]
Editor’s Note
Share your SQL Server discoveries, comments, problems, solutions, and experiences with products and reach out to other SQL Server Magazine readers. Email your contributions (400 words or less) to [email protected]. Please include your phone number. We edit submissions for style, grammar, and length. If we print your submission, you’ll get $50.
About the Author
You May Also Like