Find all SQL Server instances on local nework

前端 未结 2 1373
闹比i
闹比i 2021-01-16 19:52

I am trying to get all available SQL Server to name with their instance name, I am able to find all available SQL Server names on a local LAN but I am unable to find their i

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-16 20:49

    run a stored procedure that executes this in your C# side

    select @@servername + '\' + @@servicename
    

    and return it in a datatable, then use them.

提交回复
热议问题