如果你用c/c++,可以用db-library中的dbserverenum函数.Searches for the names of Microsoft® SQL Servers™ 2000 locally, over the network, or both. Syntax INT dbserverenum ( USHORT searchmode, LPSTR servnamebuf, USHORT sizeservnamebuf, LPUSHORT numentries );
INT dbserverenum (
USHORT searchmode,
LPSTR servnamebuf,
USHORT sizeservnamebuf,
LPUSHORT numentries );
ListAvailableSQLServersThe ListAvailableSQLServers method returns a NameList object that enumerates network-visible instances of Microsoft® SQL Server™ 2000.