How to find installed instances

  • Hi

    Guys

    I have question regarding this instances ,How to find the installed instance's in server ,trough T-SQL is there any way.

    Thanks

    Ashwin VP
    CSC India ...

  • xp_regread to enumerate the installed instances in the registry 😎

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Hi,

    You can check for my article on Enumerating SQL Instances throughout your LAN which is getting published on Sep 4. For this requirement you can use this code...

    DECLARE @value VARCHAR(50)

    EXEC master..xp_regread @rootkey = 'HKEY_LOCAL_MACHINE', @key = 'SOFTWARE\Microsoft\Microsoft SQL Server', @value_name = 'InstalledInstances', @value = @value OUTPUT

    For TCP Port Use below key:

    'SOFTWARE\Microsoft\Microsoft SQL Server\' + @@servicename + '\MSSQLServer\SuperSocketNetLib\Tcp'

    Note:

    Check whether you have permission to use xp_regread.. Also it is a undocumented SP!

    Regards,
    Sakthi
    My Blog -> http://www.sqlserverdba.co.cc

  • Thanks you sir.

    Ashwin VP
    CSC India ...

  • The example will find all instances for a 32 bit host, or for a 64 bit host with only 64 bit instances, BUT...

    To list the 32 bit instances that may be running on a 64 bit host, also search the registry key 'SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server'


    Have Fun!
    Ronzo

  • mate, your keen this thread is over a year and a half old 🙂

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Obviously so are you PerryP!

  • Yup, I know it is old, but I found it trying to figure out how to find instances on my desktop. It led me to figure out where in the registry my "missing" 32 bit instances were listed. So I figured if someone else came looking here, I'd share what I learned. 🙂


    Have Fun!
    Ronzo

  • Thanks! It is saved my time....

Viewing 9 posts - 1 through 8 (of 8 total)

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