Retrieving list of Sql Server instances on the local PC and the network
How can one determine which sql server instances are installed on the local machine and th开发者_如何学Pythone network environment?
You can use the EnumAvailableSqlServers method in the SMO (SQL Management Object) library. Check out Sample 1 or Sample 2
sqlcmd
and osql
have the option -L
which list the instances. Here and here are examples and tutorials how to use it.
精彩评论