--SQL Serer
DECLARE @test varchar(20)
EXEC master..xp_regread
@rootkey='HKEY_LOCAL_MACHINE',@key='SYSTEM\CurrentControlSet\Services\MSSQLSERVER',
@value_name='ObjectName',
@value=@test OUTPUT
SELECT @test
--Agent
DECLARE @test varchar(20)
EXEC master..xp_regread
@rootkey='HKEY_LOCAL_MACHINE',
@key='SYSTEM\CurrentControlSet\Services\SQLSERVERAGENT',@value_name='ObjectName',
@value=@test OUTPUT
SELECT @test
Wednesday, 23 July 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment