xp_servicecontrol и platform system function

Interesting supervision to me today was sent by Irina Naumova. Investigating means of Profiler searches of a configuration of Multi Server Administration, she has found out not documentary procedure:

Xp_servicecontrol N'Parameter1', N'Parameter2'

Parameter1: Start, Stop, Pause, Continue, QueryStatus - this for informs is started service whether or not
Parameter2: A name of service

Example:

EXECUTE xp_servicecontrol 'Start', 'SQLSERVERAGENT'

Still Irina has found interesting system function - platform() which informs a used platform:

SELECT platform () & 0x1   -- = 0x1 -> NT
SELECT platform () & 0x100 -- = 0x100 -> Desktop Edition
SELECT platform () & 0x2   -- = 0x2 -> Win9x

As I have found out, these system procedure and function work on SQL Server 2005 also.

Published Wed, Jun 15 2005 16:20 by gladchenko
Filed under:

Comments

# re: xp_servicecontrol и platform system function

I believe it's supposed to be 'QueryState', not a 'QueryStatus'

Monday, February 12, 2007 7:54 AM by BugsBunny

# re: xp_servicecontrol и platform system function

2 BugsBunny

Очень даже может быть... не ковырялись...

Thursday, February 22, 2007 3:41 AM by gladchenko