Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

SELECT * FROM master.sys.sysprocesses WHERE program_name = N'SQLAgent - Generic Refresher' not returning any results though SQL Server Agent is running Expand / Collapse
Author
Message
Posted Wednesday, December 17, 2008 10:55 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, March 27, 2014 11:17 PM
Points: 309, Visits: 814
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
Post #621784
Posted Thursday, December 18, 2008 7:37 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:45 AM
Points: 11,316, Visits: 13,106
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




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #622074
Posted Friday, December 19, 2008 12:28 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, March 27, 2014 11:17 PM
Points: 309, Visits: 814
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
Post #622646
Posted Friday, December 19, 2008 6:15 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:45 AM
Points: 11,316, Visits: 13,106
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.




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #622842
Posted Sunday, December 21, 2008 4:57 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, March 27, 2014 11:17 PM
Points: 309, Visits: 814
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
Post #623563
Posted Monday, December 22, 2008 1:40 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, May 5, 2011 1:38 AM
Points: 1,636, Visits: 604
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



Post #623766
Posted Monday, December 22, 2008 6:18 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, March 27, 2014 11:17 PM
Points: 309, Visits: 814
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
Post #623894
Posted Monday, July 6, 2009 2:56 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, April 9, 2014 7:08 AM
Points: 3, Visits: 191
Sakthi,

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

Regards,
Steve.
Post #747571
Posted Monday, July 6, 2009 4:32 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, March 27, 2014 11:17 PM
Points: 309, Visits: 814
Nope...

Regards,
Sakthi
My Blog -> http://www.sqlserverdba.co.cc
Post #747598
Posted Wednesday, July 7, 2010 9:04 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, September 10, 2014 5:41 AM
Points: 545, Visits: 254
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
Post #948609
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse