Results 1 to 5 of 5

Thread: get a list of local SQL Server 2005

  1. #1

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    get a list of local SQL Server 2005

    plz, hw can i retrieve a list of local sql server 2005 instances on a machine with sql servers 2000, 2005 & 2008 installed?
    Nobody is smarter than all of us!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: get a list of local SQL Server 2005

    You can call the SqlDataSourceEnumerator.GetDataSources method and the resulting DataTable will have a Version column.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    Re: get a list of local SQL Server 2005

    Quote Originally Posted by jmcilhinney View Post
    You can call the SqlDataSourceEnumerator.GetDataSources method and the resulting DataTable will have a Version column.
    thanks sir but an empty dataTable is returned!
    Nobody is smarter than all of us!

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: get a list of local SQL Server 2005

    Then there are no discoverable instances. That doesn't mean that you can access by specifying their name, but you must know the name ahead of time. If you run the SQL Server Browser service then you should find that some or all instances become discoverable.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Hyperactive Member oyad's Avatar
    Join Date
    Feb 2003
    Location
    PhoxWare MicroSystems
    Posts
    463

    Re: get a list of local SQL Server 2005

    Quote Originally Posted by jmcilhinney View Post
    Then there are no discoverable instances. That doesn't mean that you can access by specifying their name, but you must know the name ahead of time. If you run the SQL Server Browser service then you should find that some or all instances become discoverable.
    then, i think sql server 2005 detection on local machine by WMI should be a good option. http://blogs.msdn.com/sqlexpress/arc...29/682254.aspx. Anyway Guys, thanks so much for your inputs
    Nobody is smarter than all of us!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width