Microsoft.SqlServer.Management.Utility Namespace

Microsoft.SqlServer.Management.Utility命名空间包含表示 SQL Server 实用工具对象的类。 The Microsoft.SqlServer.Management.Utility namespace contains classes that represent the SQL Server Utility objects.

Classes

Computer

Computer 类型表示实用工具域中的一台计算机,包括指示计算机的性能和加载的某些物理属性。The Computer type represents a computer in the Utility domain, including certain physical properties that indicate the computer's performance and loading.

Computer.Key

Computer.Key 类表示用于标识 Computer 类的键。The Computer.Key class represents the key that identifies the Computer class.

ComputerCollection

ComputerCollection 类表示 Computer 对象的集合,这些对象表示实用工具域中所有托管的计算机。The ComputerCollection class represents a collection of Computer objects that represent all the computers managed in the Utility domain.

DataFileAdapter

DataFileAdapter类型表示有关数据文件的信息。The DataFileAdapter type represents information about a data file.

DeployedDac

DeployedDac类型表示数据库应用程序结构,其形式为已安装到运行 SQL Server 实例的计算机上。The DeployedDac type represents a database application structure, in the form of a DAC package that has been installed on to a computer running an instance of SQL Server.

DeployedDac.Key

DeployedDac.Key 类表示用于标识 DeployedDac 类的键。The DeployedDac.Key class represents the key that identifies the DeployedDac class.

DeployedDacCollection

类表示DeployedDac对象的集合, 这些对象表示实用工具域中已部署的所有 dac。 DeployedDacCollectionThe DeployedDacCollection class represents a collection of DeployedDac objects that represent all the deployed DACs in the Utility domain.

LogFileAdapter

LogFileAdapter 接口描述必须由日志文件适配器实现的扩展属性。The LogFileAdapter interface describes the extended properties that must be implemented by log file adapters.

ManagedInstance

ManagedInstance类型表示由 SQL Server 实用工具服务管理以控制策略和部署的 SQL Server 的实例。The ManagedInstance type represents an instance of SQL Server that is managed by the SQL Server Utility services to control policy, and deployments.

ManagedInstance.Key

ManagedInstance.Key类表示ManagedInstance标识类的键。The ManagedInstance.Key class represents the key that identifies the ManagedInstance class.

ManagedInstanceCollection

表示 SQL Server 实用工具中 SQL Server 的托管实例的集合。Represents a collection of managed instances of SQL Server in the SQL Server Utility.

NameKey

标识将名称属性用作 Sfc 键的 Microsoft.SqlServer.Management.Utility 对象。Identifies Microsoft.SqlServer.Management.Utility objects that use a name property as an Sfc key.

Utility

Utility类表示一个实用工具控制点(UCP),该控制点定义用于管理 SQL Server 的一个或多个远程实例的方法和属性。The Utility class represents a utility control point (UCP) that defines methods and properties to manage one or more remote instances of SQL Server.

Utility.Key

Utility.Key 类定义用于标识系统文件检查器 (SFC) 内的 Utility 的方法和属性。The Utility.Key class defines methods and properties that are used to identify the Utility within the System File Checker (SFC).

UtilityException

UtilityException 类定义记录实用工具异常信息的方法和属性。The UtilityException class defines methods and properties that record utility exception information. 它是所有实用工具异常类型的基类。It is the base class for all utility exception types.

Volume

Volume 类型表示有关 SQL Server 实用工具域中计算机上的卷或磁盘分区的信息。The Volume type represents information about a volume or disk partition on a computer in the SQL Server Utility domain.

Volume.Key

Volume.Key 类表示用于标识 Volume 类的键。The Volume.Key class represents the key that identifies the Volume class.

VolumeCollection

VolumeCollection 类表示 Volume 对象的集合,这些对象表示计算机上的所有卷。The VolumeCollection class represents a collection of Volume objects that represent all the volumes on a computer.

Interfaces

IDataFilePerformanceFacet

IDataFilePerformanceFacet 是表示数据文件性能的接口。The IDataFilePerformanceFacet is an interface that represents the data file performance. 这用于确定基于性能的策略。This is used in determining performance based policies.

ILogFilePerformanceFacet

ILogFilePerformanceFacet是一个表示日志文件性能的接口。The ILogFilePerformanceFacet is an interface that represents the log file performance. 这用于确定基于性能的策略。This is used in determining performance-based policies.

Enums

DatabaseState

数据库状态枚举。Database state enumeration.

HealthState

HealthState 枚举包含用来指定部署状态的值。The HealthState enumeration contains values that are used to specify the state of the deployment.

ManagementState

枚举 ManagedInstance 对象的可能状态。Enumerates the possible states of a ManagedInstance object.

Remarks

顶级实例是Utility类,该类证明连接到的实例SQL Server。The top-level instance is the Utility class, which proves the connection to the instance of SQL Server. 子级Utility类是另一种主要类型:The children of the Utility class are the other main type:

SQL Server实用工具对象可以用于发现的实例SQL Server网络上并将它们包含在SQL Server实用程序。The SQL Server Utility objects can be used to discover instances of SQL Server on the network and include them in the SQL Server Utility. 这些实例可以转换为托管实例,然后由控制SQL Server实用程序,并且可以参与部署和策略管理。These instances can be converted into managed instances, which are then governed by the SQL Server Utility and can participate in deployments and policy management.

SQL Server实用工具使用 DAC 包,可以在设计模式下使用的 DAC 对象和 SMO 对象创建。The SQL Server Utility uses DAC packages, which can be created using the DAC object and SMO objects in Design mode. 可以通过从列表提取的组件构成数据库应用程序,或从文件导入 DAC 包创建 DAC 包。A DAC package can be created by extraction from a list of components that make up a database application, or by importing a DAC package from a file. DAC 包的列表存储在SQL Server实用工具在目录中。A list of DAC packages is stored in the SQL Server Utility in a catalog. 可以从该列表中选择 DAC 包,并将其部署到目标的合适的托管的实例上SQL Server受SQL Server实用程序。A DAC package can be selected from this list and deployed onto targets that are suitable managed instances of SQL Server governed by the SQL Server Utility.

Microsoft.SqlServer.Management.Utility命名空间驻留在 Microsoft.SqlServer.Management.Utility.dll 文件。The Microsoft.SqlServer.Management.Utility namespace resides in the Microsoft.SqlServer.Management.Utility.dll file. 此外,某些支持对象位于 Microsoft.SqlServer.Management.UtilityEnum.dll 文件中。Additionally, some supporting objects are in the Microsoft.SqlServer.Management.UtilityEnum.dll file. 你需要导入这些文件,以访问中的类Microsoft.SqlServer.Management.Utility命名空间。You need to import these files to access the classes in the Microsoft.SqlServer.Management.Utility namespace.

通过使用Microsoft.SqlServer.Management.Utility命名空间,你可以:By using the Microsoft.SqlServer.Management.Utility namespace, you can:

  • 发现的实例SQL Server。Discover instances of SQL Server.

  • 包括的实例SQL Server中SQL Server实用程序通过将其托管或非托管设置。Include instances of SQL Server in the SQL Server Utility by making them managed or unmanaged.

  • 提取 DAC。Extract a DAC.

  • 导入 DAC 包。Import a DAC package.

  • 部署中的合适实例上 DACSQL Server实用程序。Deploy a DAC on suitable instances in the SQL Server Utility.

  • 管理SQL Server实用工具主机资源。Manage SQL Server Utility host resources.

  • 管理SQL Server实例资源。Manage SQL Server instance resources.

  • 创建并将策略应用于目标对象SQL Server实用程序。Create and apply policies to target objects in the SQL Server Utility.