SQLDMO(SQL Distributed Management Objects,SQL分布式管理对象)封装了Microsoft SQL Server数据库中的对象。SQLDMO是Microsoft SQL Server中企业管理器所使用的应用程序接口,所以它可以执行很多功能,其中当然也包括对数据库的备份和恢复。
SQLDMO由Microsoft

下面是用C#语言书写的用于列举局域网中可用的Microsoft SQL Server的类:
using System;
using System.Collections.Generic;
using System.Text;
namespace AllSqlServer
{
class Program
{
static void Main(string[] args)
{
SQLDMO.NameList names;
SQLDMO.ApplicationClass ac = new SQLDMO.ApplicationClass();
names = ac.ListAvailableSQLServers();
string[] serverList = new string[names.Count];
for (int i = 0; i {
serverList[i] = names.Item(i);
}
foreach (string str in serverList)
{
Console.WriteLine(str);
}
Console.ReadLine();
}
}
}








