Hi,
I'm a SQL Server DBA and I'm trying to get a listing of the SQL Servers on
the network. I installed Visual Basic 2005 Express edition and used the SQL
Server 2005 ServerInfo sample which uses SMO (SQL Server Management
Objects). I chose SMO over SQL-DMO because SMO seemed to list more SQL
Servers including named instances. Everything worked fine on our local
domain. I then logged off and connected to the remote domain (in Europe) in
which I need the listing for documentation purposes. I re-ran the
application but the listing I got was from our local domain and not the
European domain. No where in the application did I find a hard-coded
reference to our domain. I created a new project and used the following
code snipit:
Sub Main()
Dim dt As DataTable = SmoApplication. EnumAvailableSq lServers(False)
If dt.Rows.Count > 0 Then
For Each dr As DataRow in dt.Rows
Console.WriteLi ne(dr("Name"))
Next
End If
End Sub
The command console application again returned only the SQL Servers for our
local domain even though I am currently logged into the remote European
domain. Is there a domain setting in Visual Basic 2005 Express where I can
change the domain the application should run under or a SMO setting to
specifiy the domain to be used?
Any assistance is greatly appreciated.
Thanks
Jerry
I'm a SQL Server DBA and I'm trying to get a listing of the SQL Servers on
the network. I installed Visual Basic 2005 Express edition and used the SQL
Server 2005 ServerInfo sample which uses SMO (SQL Server Management
Objects). I chose SMO over SQL-DMO because SMO seemed to list more SQL
Servers including named instances. Everything worked fine on our local
domain. I then logged off and connected to the remote domain (in Europe) in
which I need the listing for documentation purposes. I re-ran the
application but the listing I got was from our local domain and not the
European domain. No where in the application did I find a hard-coded
reference to our domain. I created a new project and used the following
code snipit:
Sub Main()
Dim dt As DataTable = SmoApplication. EnumAvailableSq lServers(False)
If dt.Rows.Count > 0 Then
For Each dr As DataRow in dt.Rows
Console.WriteLi ne(dr("Name"))
Next
End If
End Sub
The command console application again returned only the SQL Servers for our
local domain even though I am currently logged into the remote European
domain. Is there a domain setting in Visual Basic 2005 Express where I can
change the domain the application should run under or a SMO setting to
specifiy the domain to be used?
Any assistance is greatly appreciated.
Thanks
Jerry