I need to make a few assumptions here based on my understanding / interpretation of your question.
1. You want to know what computer systems in your local network runs a MS SQL Server instance,
2. You wish to see a list of databases for each computer system running an instance of MS SQL Server.
To accomplish (1) you will need to retrieve a list of all computer systems on your local network. Once you have a list of all computer systems on the network you will need to check to see if an instance of MS SQL is running on each specific computer system. Unfortunately you will not be allowed to interrogate a MS Server without a valid username and password for that server because of its high level security.
The code example is for the local machine and there are code examples out there to retrieve the process list of a remote computer.
Private Function IsMySQLRunning() As Boolean
Dim proc() As System.Diagnostics.Process
Try
proc = System.Diagnostics.Process.GetProcessesByName("mysqld")
If proc.Length > 0 Then
Return True
Else
MsgBox("MySQL Server was not found to be running on this system." & vbCrLf & _
"Please verify that this is the MySQL database server and that MySQL is running", _
MsgBoxStyle.Information)
Return False
End If
Catch ex As Exception
MsgBox("Unable to check if MySQL Server is running on this system." & vbCrLf & _
ex.ToString, MsgBoxStyle.Information)
Return False
End Try
End Function
To achieve (2) you can follow Solution 1 as it is above my immediate scope and I don't work with MS SQL.