SELECT * FROM master.sys.sysprocesses WHERE program_name = N'SQLAgent - Generic Refresher' not returning any results though SQL Server Agent is running

  • Hi,

    SELECT * FROM master.sys.sysprocesses WHERE program_name = N'SQLAgent - Generic Refresher'

    is generally used to check whether SQL Server is running. This works fine for all other servers except two servers... In these two servers there is no column having Program_Name as SQL Server Agent but the Agent is running fine... Any ideas why it is not listed?

    But once SQL Server Agent is re-started, then I'm able to see the program name 'SQLAgent - Generic Refresher' in sysprocesses... Any thoughts are welcome...

    Regards,
    Sakthi
    My Blog -> http://www.sqlserverdba.co.cc

  • From BOL about sysprocesses:

    Contains information about processes that are running on an instance of Microsoft SQL Server

    So if it ain't running it shouldn't be there

  • Hi Jack,

    Buy my case is SQL Server Agent is running but the entry is not there in sysprocesses...

    Regards,
    Sakthi
    My Blog -> http://www.sqlserverdba.co.cc

  • Sakthivel Chidambaram (12/17/2008)


    But once SQL Server Agent is started, then I'm able to see the program name 'SQLAgent - Generic Refresher' in sysprocesses... Any thoughts are welcome...

    Based on this you say when it is started you can see it.

  • oh.... that was a big type error... I have edited my post... Thanks for that...

    Actually I was trying to say that after restarting SQL Server now it is visible in sysprocesses....

    Regards,
    Sakthi
    My Blog -> http://www.sqlserverdba.co.cc

  • Hello Sakhti,

    Did you restart SQL Server, or SQL Server Agent?

    Maybe the problem is that you are confusing two things - one is whether SQL Server as such is running, another one is whether SQL Server Agent is running. Server can be running, while Agent is stopped - maybe that was the reason the entry was missing?

    PS. Maybe you should remove the bold from your signature, this way it looks that your main question is whether we are using Google :w00t:

  • Hi,

    Let me put it this way...

    Server Name : SQL001

    Instance Name: SQLSRV

    Running since: 15 days

    Now I connect to the server using Management Studio and run below query

    "SELECT * FROM sysprocesses WHERE Program_Name like '%Agent%Refresher'

    It does'nt return any output, but when I go to Services.msc, I'm able to see that SQLSERVERAGENT is running in this instance but not getting listed in above query.

    Now I Restart the SQLSERVERAGENT of this instance and run the same query I get result...

    What has gone wrong? How though SQL Server Agent is running it is not listed in sysprocesses?

    Regards,
    Sakthi
    My Blog -> http://www.sqlserverdba.co.cc

  • Sakthi,

    I have the same problem as you describe. Did you ever get a resolution to the problem?

    Regards,

    Steve.

  • Nope... 🙁

    Regards,
    Sakthi
    My Blog -> http://www.sqlserverdba.co.cc

  • Not sure if this could be the problem.

    If I run this query I do not get a result:

    select * from master.sys.sysprocesses

    WHERE Program_Name like '%Agent%Refresher'

    But if I run this query i do get a result:

    select * from master.sys.sysprocesses

    WHERE Program_Name like '%Agent%Refresher%'

    The "%" on the end seems to make a difference.


    Thanks,

    ToddR

  • SELECT * FROM sysprocesses WHERE Program_Name like '%Refresher%' will give you the correct result..:-)

  • I know this is a 3+ year old thread, but I just started having this problem last night. I have a job that runs on a server and checks [servername].master.dbo.sysprocesses for a record like 'SQLAgent%' to verify that they are running.

    All of a sudden several servers are showing it as running in the services mmc tool, and jobs are successfully running as scheduled, but no record in sysprocesses.

    Did anyone happen to figure out why this behavior happens? (SQL Server 2005)

    The Redneck DBA

Viewing 12 posts - 1 through 11 (of 11 total)

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