dbTalk Databases Forums  

C# - Need to find instances of SQL Server on client

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss C# - Need to find instances of SQL Server on client in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stratum
 
Posts: n/a

Default C# - Need to find instances of SQL Server on client - 06-20-2007 , 07:00 AM






How can I determine using C# which instances of SQL Server 2000,
MSDE, 2005 or 2005 Express, if any, are installed on a client
computer?

For instance, by knowing the computer's name, I could
guess at a named instance of the data provider and use
it in a connection string, assuming Windows Integrated
Security, and attempt a connection. But this is klutzy.
Is there a method of *discovery* that returns the info?

In Visual Studio 2003/2005 when attempting a new connection
in Server Explorer, an applet appears which does something
like this. Ditto in SQL Server Manager.

The intent is to use DDL, embedded in ADO.Net library
calls, to create a data schema for an application
with stored procedures. This part is easy. But first,
I need to know "who's" there.


Reply With Quote
  #2  
Old   
=?Utf-8?B?T21hciBBd3dhZA==?=
 
Posts: n/a

Default RE: C# - Need to find instances of SQL Server on client - 06-20-2007 , 12:57 PM






Hi,

This enum in C# can help you.

http://blogs.msdn.com/sushilc/archiv...14/242395.aspx


Thanks
Omar

"Stratum" wrote:

Quote:
How can I determine using C# which instances of SQL Server 2000,
MSDE, 2005 or 2005 Express, if any, are installed on a client
computer?

For instance, by knowing the computer's name, I could
guess at a named instance of the data provider and use
it in a connection string, assuming Windows Integrated
Security, and attempt a connection. But this is klutzy.
Is there a method of *discovery* that returns the info?

In Visual Studio 2003/2005 when attempting a new connection
in Server Explorer, an applet appears which does something
like this. Ditto in SQL Server Manager.

The intent is to use DDL, embedded in ADO.Net library
calls, to create a data schema for an application
with stored procedures. This part is easy. But first,
I need to know "who's" there.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.