Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. List of Servers

List of Servers

Scheduled Pinned Locked Moved Database
questioncsharpasp-netcareer
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    _mubashir
    wrote on last edited by
    #1

    Hi, I am working in ASP.NET. I need to get the list of Servers registered on the local machine. How can I get this?? regards Mubashir

    Every job is a self portrait of the person who did it.

    L M 2 Replies Last reply
    0
    • _ _mubashir

      Hi, I am working in ASP.NET. I need to get the list of Servers registered on the local machine. How can I get this?? regards Mubashir

      Every job is a self portrait of the person who did it.

      L Offline
      L Offline
      Laubi
      wrote on last edited by
      #2

      I haven't seen a pure ADO.NET solution for this (I guess this is what you're looking for) but if you can't find such a solution there as an alternative way.. SQLDMO object! Here SQLDMO.Application you'll find a method called ListAvailableSQLServers! Just add a reference to your project and create an instance of it and you've got your list.

      _ 1 Reply Last reply
      0
      • L Laubi

        I haven't seen a pure ADO.NET solution for this (I guess this is what you're looking for) but if you can't find such a solution there as an alternative way.. SQLDMO object! Here SQLDMO.Application you'll find a method called ListAvailableSQLServers! Just add a reference to your project and create an instance of it and you've got your list.

        _ Offline
        _ Offline
        _mubashir
        wrote on last edited by
        #3

        thanks, I tried it but it is returning 0 servers. Why is this so? I am using Windows XP and SQL Server 2000. regards Mubashir

        Every job is a self portrait of the person who did it.

        L 1 Reply Last reply
        0
        • _ _mubashir

          thanks, I tried it but it is returning 0 servers. Why is this so? I am using Windows XP and SQL Server 2000. regards Mubashir

          Every job is a self portrait of the person who did it.

          L Offline
          L Offline
          Laubi
          wrote on last edited by
          #4

          There are several possible reasons for this.. The database might be hidden - to check open sql manager and select the properties by right clicking on the protocols node of the db instance. Look for "HideInstance".. It could also be that you're running into a latency problem, if your server isn't responding fast enough you won't see it. But it would say this is unlikely on "localhost"! If this still doesn't help, you might want to use a workaround. You could easily enumerate this registry key: SOFTWARE\Microsoft\Microsoft SQL Server - InstalledInstances

          _ 1 Reply Last reply
          0
          • L Laubi

            There are several possible reasons for this.. The database might be hidden - to check open sql manager and select the properties by right clicking on the protocols node of the db instance. Look for "HideInstance".. It could also be that you're running into a latency problem, if your server isn't responding fast enough you won't see it. But it would say this is unlikely on "localhost"! If this still doesn't help, you might want to use a workaround. You could easily enumerate this registry key: SOFTWARE\Microsoft\Microsoft SQL Server - InstalledInstances

            _ Offline
            _ Offline
            _mubashir
            wrote on last edited by
            #5

            Thanks for your quick help... i tried SOFTWARE\Microsoft\Microsoft SQL Server - InstalledInstances, but it doesnt contains Server Information registered in a SQL Server Group. How can I get that :( ? regards Mubashir

            Every job is a self portrait of the person who did it.

            1 Reply Last reply
            0
            • _ _mubashir

              Hi, I am working in ASP.NET. I need to get the list of Servers registered on the local machine. How can I get this?? regards Mubashir

              Every job is a self portrait of the person who did it.

              M Offline
              M Offline
              Michael Potter
              wrote on last edited by
              #6

              Can this be done running in the normally restricted rights of an IIS client?

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups