Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 692205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:37:36+00:00 2026-05-14T02:37:36+00:00

We have an old SQL Server 2000 machine where a bunch of jobs run

  • 0

We have an old SQL Server 2000 machine where a bunch of jobs run overnight. Occasionally, after server maintenance is performed and the machine is rebooted, some SQL components don’t come up with the OS (even though they are configured to do so). So before our nightly jobs are supposed to run, I would like to (from a remote machine) run some checks to see if SQL Server, SQL Server Agent, and the SQL Server OLAP Service are running. I’ve found a few things that seem like they should work but I’m wondering if the experts in this community can comment to the quality & dependability of each approach. I can code this app as either a .vbs file run via Windows Scheduled Tasks or create a C# Windows Service.

Candidate 1:
Execute a query against master..sysprocesses and look in the program_name column for the respective processes I expect to find.

Candidate 2:
Execute a query against master..xpcmd_shell like so:

exec master..xp_cmdshell 'sc \\hostname query SQLServerAgent'

Then look for ‘ STATE : 4 RUNNING ‘ in the results

Candidate 3:
Using the .NET Framework, search for the process like this:
Check if a process is running on a remote system using C#

This is something that really only needs to run once a day and will send out an email alert if any of the processes that should be running aren’t.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:37:37+00:00Added an answer on May 14, 2026 at 2:37 am

    For those interested in the solution I ended up with…read on.

    I ended up going with the Candidate 1 because of the easy development time and familiarity I have with C#/ADO.NET/SQL Server. I created a C# Windows Service to call a stored proc within a Timer_Elapsed event (pretty standard stuff).

    Here is the guts of the stored proc the service is calling:

    SELECT
        RTRIM(LTRIM(hostname)) AS hostname,
        RTRIM(LTRIM(program_name)) AS program_name,
        RTRIM(LTRIM(nt_domain)) AS nt_domain,
        RTRIM(LTRIM(nt_username)) AS nt_username,
        RTRIM(LTRIM(loginame)) AS loginame
    FROM
        master..sysprocesses
    WHERE
        hostname = 'CSSMCDBSW03'
    AND
        program_name IN ('Microsoft SQL Server Analysis Services', 'SQLAgent - Generic Refresher')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an old SQL Server 2000 database that I want to get into
I have an old server with a defunct evaluation version of SQL 2000 on
We have an old SQL table that was used by SQL Server 2000 for
I imported a bunch of tables from an old sql server (2000) to my
We have an old Windows 2000 server running SQL Server 2000 Standard Edition, SP3.
I have old .prc files (SQL Server Stored Procedures) which have exported from SQL
When I run my .net app connected to SQL Server 2000, I get the
We currently have a 10 year old nasty, spaghetti-code-style SQL Server database that we
We have a Sql Server 2000 database application that needs to update our applications
I have a sql server 2000 database with some serious performance problems, as well

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.