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 «««123

SQL agent question Expand / Collapse
Author
Message
Posted Friday, April 18, 2008 1:59 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: Thursday, March 27, 2014 8:16 AM
Points: 534, Visits: 282
come on, Derek. ;)
Why would you try running a query about system objects in a database other than master?


Kelsey Thornton
MBCS CITP
Post #486955
Posted Friday, April 18, 2008 2:15 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 10:36 AM
Points: 1,199, Visits: 574
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 :)
Post #486960
Posted Friday, April 18, 2008 2:38 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 7:14 AM
Points: 1,344, Visits: 1,983
Kelsey Thornton (4/18/2008)
come on, Derek. ;)
Why would you try running a query about system objects in a database other than master?
Habit. :)

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.;)

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>...


Derek
Post #486971
Posted Friday, April 18, 2008 3:59 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 7:14 AM
Points: 1,344, Visits: 1,983
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 :)
I've always felt that I learn more from some of the 'ambiguous' QOTDs than the simple 'how do you do X' type.:)


Derek
Post #487017
Posted Friday, April 18, 2008 8:33 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Today @ 7:25 AM
Points: 1,499, Visits: 2,662
Derek Dongray (4/18/2008)
Kelsey Thornton (4/18/2008)
come on, Derek. ;)
Why would you try running a query about system objects in a database other than master?
Habit. :)

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.;)



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.
Post #487256
Posted Friday, April 18, 2008 8:46 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: Thursday, March 27, 2014 8:16 AM
Points: 534, Visits: 282
I trust you all realise I was talking tongue-in-cheek there!;)

Kelsey Thornton
MBCS CITP
Post #487265
Posted Wednesday, April 23, 2008 9:06 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 4:48 AM
Points: 156, Visits: 375
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
Post #489364
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse