• xp_ServiceControl 'QueryState', 'SQLServerAgent'

    works for both SQL 2000 and 2005.

    Good to know this xp_.