SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL agent question


SQL agent question

Author
Message
Kelsey Thornton
Kelsey Thornton
SSC Eights!
SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)

Group: General Forum Members
Points: 881 Visits: 282
come on, Derek. Wink
Why would you try running a query about system objects in a database other than master?

Kelsey Thornton
MBCS CITP
rajankjohn
rajankjohn
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2021 Visits: 575
Are we looking too much into the questions and answers provided? Or do we think that the questions should be accurately deterministic? I believe a healthy debate/discussion is always good Smile
StarNamer
StarNamer
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2772 Visits: 1992
Kelsey Thornton (4/18/2008)
come on, Derek. Wink
Why would you try running a query about system objects in a database other than master?
Habit. Smile

Novices start by firing up SSMS and running every query in 'master'. After they've cluttered up the master database on their development server, they realise that perhaps they should create another database (or maybe even two or three) for applications and testing.Wink

I'm almost at the other extreme where my habitual action is click [New Query], type <U><s><e><space><s><c><r><a><t><c><h><enter><s><e><l><e><c><t>...Cool

Derek
StarNamer
StarNamer
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2772 Visits: 1992
Rajan John (4/18/2008)
Are we looking too much into the questions and answers provided? Or do we think that the questions should be accurately deterministic? I believe a healthy debate/discussion is always good Smile
I've always felt that I learn more from some of the 'ambiguous' QOTDs than the simple 'how do you do X' type.Smile

Derek
WILLIAM MITCHELL
WILLIAM MITCHELL
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3880 Visits: 3083
Derek Dongray (4/18/2008)
Kelsey Thornton (4/18/2008)
come on, Derek. Wink
Why would you try running a query about system objects in a database other than master?
Habit. Smile

Novices start by firing up SSMS and running every query in 'master'. After they've cluttered up the master database on their development server, they realise that perhaps they should create another database (or maybe even two or three) for applications and testing.Wink



I agree with Kelsey, if you're querying system objects you would use master. If you're querying backup & restore history you would use msdb.

Think of Sutton's Law: The law is named after the bank robber Willie Sutton, who supposedly answered a reporter inquiring why he robbed banks by saying "because that's where the money is."

OTOH if you are actually creating new objects for testing, a separate test db makes perfect sense.
Kelsey Thornton
Kelsey Thornton
SSC Eights!
SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)SSC Eights! (881 reputation)

Group: General Forum Members
Points: 881 Visits: 282
I trust you all realise I was talking tongue-in-cheek there!Wink

Kelsey Thornton
MBCS CITP
Rajni Kant Ranjan
Rajni Kant Ranjan
SSC Veteran
SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)

Group: General Forum Members
Points: 230 Visits: 514
I think answer should be
xp_ServiceControl 'QueryState', 'SQLServerAgent'
this because if no job will run then sysprocesses will not have any process related to that service. So, i think answer as SQl Server Central Guys has selected is wrong. As per my suggestion they should correct the answer.

Thanks & Regards
Rajni Kant Ranjan
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search