June 2005 - Posts

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.

Posted by gladchenko | 2 comment(s)
Filed under: