xp_regread, xp_regwrite

  • I am in the process of building a script that will set as many sql

    server configuration options as possible for new server builds. Several

    settings are maintained in the registry, so I'm looking at the extended

    stored procedures xp_regread and xp_regwrite. I'm looking for

    information anyone might have on using these procs to read/write

    hexidecimal registry values. An example is Authentication Mode, found

    on the Security tab of the Properties panel in EM.

    TIA,

    Justin

  • First things first, MS do not support the use of these extended stored procedures.

    Having said that, run profiler and the change the server properties. You will see exactly what enterprise manager does.

  • I found an interesting article about xp's for beginners, including myself. It reflects the essential parts needed to know to get started.

    http://www.devarticles.com/art/1/74/1

    /Pagander

  • For the authentication mode: -

    xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', 'LoginMode'

    This will return a number, see 'Creating a Setup File Manually' in BOL for a definition of the number.

    Regards,

    Andy Jones

    .

  • Thanks Andy,

    I wasn't aware of xp_instance_regread. The BOL reference is very helpful as well.

    Regards,

    Justin

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

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