扫描整个局域网的IP中1433端口有没有打开,打开的就是装了sql服务器的。

解决方案 »

  1.   

    exec master..xp_cmdshell 'OSQL -L '
      

  2.   

    如果你用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 );
      

  3.   

    在企业管理器中新建SQLSERVER注册时不就可以看到所有正在运行的SQLSERVER吗?大家别理我,我比较呆!
      

  4.   

    用sqldmo中的
    ListAvailableSQLServersThe ListAvailableSQLServers method returns a NameList object that enumerates network-visible instances of Microsoft® SQL Server™ 2000.
      

  5.   

    lyj670(空中一只鸟) 这位老兄说得没错!