How to Connect to Sqlserver2008 using SMO any workaround has to be done?
问题 I wrote this for finding the sql server instances on the local machine: using System; using System.Data; using Microsoft.SqlServer.Management.Smo; namespace Application3 { class Program { static void Main(string[] args) { string srvname = string.Empty; string srvnames = null; DataTable dt = SmoApplication.EnumAvailableSqlServers(true); Console.WriteLine("------------->" + dt.Rows.Count); foreach (DataRow dr in dt.Rows) { try{ Console.WriteLine("-->Instance " + dr["name"]); Server srv = new