all groups > sql server mseq > october 2003 >
You're in the

sql server mseq

group:

Reading Registry Entries...


Reading Registry Entries... Santhosh
10/29/2003 12:05:54 AM
sql server mseq:
Using DBCC commands or any other commands is there a way i
can check for the
registry entries made on that machine???

Santhosh.C.
Re: Reading Registry Entries... Anith Sen
10/30/2003 9:56:31 AM
You have a couple of options..

1. Use undocumented xp_Regread & xp_RegWrite extended procedures:

---xp_regread
DECLARE @v varchar(20)
EXEC master..xp_regread @rootkey='HKEY_LOCAL_MACHINE',
@key='SOFTWARE\Test',
@value_name='TestValue',
@value=@vOUTPUT
SELECT @test

---xp_regwrite
EXEC master..xp_regwrite @rootkey='HKEY_LOCAL_MACHINE',
@key='SOFTWARE\Test',
@value_name='TestValue',
@type='REG_SZ',
@value='Test'

Note that these are undocumented & hence are not recommended as a stable
long-term solution.

2. Use sp_OA* procedures:

http://www.sqlmag.com/Files/09/19836/Listing_01.txt

The invocation of a COM object using sp_OA* procedure is under the security
context of the SQL Server service account. Since this may prevent
reading/writing the Registry, you have to run the service with sufficient
security permissions to access the registry.


--
- Anith
( Please reply to newsgroups only )

AddThis Social Bookmark Button