Configure a SQL Server alias via VBScript

  • Can I setup a SQL Server alias via VBScript or similar?

    We have a large number of aliases in use and despite good documentation, we get different results every time someone new sets it up.

    (the documentation is a modification of

    http://www.mssqltips.com/tip.asp?tip=1620

    to reflect one of our aliases)

    I have looked into VBScripting and WMI, but can find nothing to set me on my way with this.

    Any help greatly appreciated

  • I don't know of anything to update them directly, but the Aliases are stored in the registry at

    HKLM\Software\Microsoft\MSSQLServer\Client\ConnectTo

    ... so a bit of registry hacking would probably do the trick (which you could do in VBScript).

  • Thanks Ian.

    That is a nice idea, but I will stick with the GUI over scripting changes to registry

    (because I am a coward rather than I know better).

Viewing 3 posts - 1 through 2 (of 2 total)

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