Home Forums SQL Server 2005 Administering How to find out Installed SQL Server Instances on a server RE: How to find out Installed SQL Server Instances on a server

  • I think below will give the expected result:

    -- Create Temporary table to store the data

    Create Table #SQLInstances

    ( Value nvarchar(100),

    InstanceName nvarchar(100),

    Data nvarchar(100))

    -- Read Data from Registery

    Insert into #SQLInstances

    EXECUTE xp_regread

    @rootkey = 'HKEY_LOCAL_MACHINE',

    @key = 'SOFTWARE\Microsoft\Microsoft SQL Server',

    @value_name = 'InstalledInstances'

    Select InstanceName from #SQLInstances

    Thank You.

    Regards,
    Raghavender Chavva