views:

541

answers:

1

Hi

How can i connect to the remote machine and getting the local instances using smo or any thing.

using smo i did it for local instances but i dont know the same for remote instances how to

do this.

(My idea is connecting to the rmote computer and call the EnumAvailableSqlServers(true))

Can u give me ideas to do this???

Thanks in advance.

+2  A: 

This article shows how to retrieve a list of PCs on the local network which are running MS SQL Server, and gets information about the instances, such as server name, instance name, version, and databases.

Locate SQL Server instances on the local network
http://www.codeproject.com/KB/database/locate_sql_servers.aspx

Robert Harvey