Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

accessing named instances Expand / Collapse
Author
Message
Posted Wednesday, September 10, 2008 5:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 7:21 AM
Points: 2, Visits: 10
accessing named instances
--------------------------------------------------------------------------------
hello
I installed two named insances of SQL Server 2005 on Win 2003 server.
I hv written small appl which list out all the insances of SQL Server available on network .
but it is not working , it is displaying only names of SQL Server.

Code---

Dim dtSQLServers As DataTable

dtSQLServers = SmoApplication.EnumAvailableSqlServers()

Dim strServer As String
For Each dr As DataRow In dtSQLServers.Rows
strServer = CStr(dr("Server"))
'strServer = dr("Server") & "\" & CStr(dr("Instance"))
If Not TypeOf dr("Instance") Is DBNull AndAlso CStr(dr("Instance")).Length > 0 Then
strServer += "\" & CStr(dr("Instance"))
End If

comboServer.Items.Add(strServer)
Next


----------------
is there any other method for this.
Firewall is off on server.

Thanks
Post #566756
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse