Strange Message - SQLServerAgent

  • Hi,

    As a test I disable SQLServerAgent and ran a set of nested Stored Procedures. The procs ran with out generating errors, but returned the following message, which is not custom and not in the sysmessages table:

    ‘SQLServerAgent is not currently running so it cannot be notified of this action.’

    The question I have are as follows:

    1)    Where is the message coming from? - could it be from an extended sp such as ‘xp_sqlagent_notify’ which is called by one of the procs?

    2)    Why isn’t an error code passed back to the calling procedure?

    3)    Is there any way to capture the message that is returned so I can roll back the transaction?

    Thanks

    Jon

  • This was removed by the editor as SPAM

  • This message is returned when the SQL Server Agent Service is not running on the specified computer - I guess your stored procedure was trying to run an Agent job.

    Not sure how you can program round it, you can certainly start the service from the command prompt, and therefore from 'xp_cmdshell', but it's safe to assume the service is running all the time in a production environment. It's very easy to turn it on from Enterprise Manager or the Server desktop anyway.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply