Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

Can anybody tell me how I can get the sqlserver name using c#.net without any connection to sqlserver?

Thanks in advance
Posted
Updated 20-Oct-11 21:47pm
v2
Comments
RaisKazi 21-Oct-11 3:08am    
Question is unclear.
Code_seeker_ 21-Oct-11 3:23am    
:)
Dalek Dave 21-Oct-11 3:47am    
Edited for Readability.

Try This[^]

hope it helps :)
 
Share this answer
 
Comments
Code_seeker_ 21-Oct-11 3:12am    
tx
Mehdi Gholam 21-Oct-11 3:12am    
my 5!
Uday P.Singh 21-Oct-11 3:16am    
thanks Mehdi :)
RaisKazi 21-Oct-11 3:16am    
Nice link. In fact I understood this Question based on your Answer. :)
Uday P.Singh 21-Oct-11 3:18am    
thanks RaisKazi :)
The Sql Server name should be known as part of your installation process.

It makes little sense to get the name as there could be a lot of Sql Servers in your LAN.

Usually the database engine is installed on the same server as your IIS so if in doubt use (local) in your connection string.
 
Share this answer
 
Comments
Code_seeker_ 21-Oct-11 3:12am    
tx 4 advise

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900