Problem with xp_instance_regwrite

  • Hello,

     (1)  Is there something new with the xp_instance_regwrite stored procedure on SQL Server 2005? Not sure if I have to enable something before running it. For example, the following command does not actually do anything:

    EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer',N'AuditLevel', REG_DWORD,3

            It shows "0 rows affected". No matter if the registry key is not there or not (or if I first manually created the key and then ran the above command), nothing was changed at all. Am I missing something?

    (2)   This is a question about Windows scripting ... not sure if someone happened to know it ... Can I use a Windows script (*.bat) to obtain a hidden user impact (e.g. password) without installing any special Script Host like CScript?

    Thanks much!

    Del Piero

     

  • Are you sure the registry key exists. If not there is a possiblity for you toget such a situation. Microsoft has replaced most sql server registry keys in 2005 so check the ketys before you update one.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Thanks Sugesh. What you said sounds logical. Do you know if there is any detailed reference of the registry key values used in SQL Server 2005? It may be even more helpful to see the difference between SQL2K and SQL2K5 registry values.

    Thanks,

    Del Piero

     

  • I know that microsoft has brought all your sql server related keys under a common folder Microsoft SQL Server. If you have more than 1 instance than there will be a separate folder for each instance under the root folder. The services keys also has changed to some extent. you can find details in microsoft.com/sql website.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • It works as follows: In the result pane of the query analyzer, it will show 0 rows affected but at the same time, it does it work in the registry. You can get this confirmed from opening the registry.

    Prashant Thakwanithakwani_prashant@yahoo.co.in

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply