DacType 类

DacType 类表示已开发和部署的、用于支持特定应用程序的一组数据层对象、策略和属性。

继承层次结构

System. . :: . .Object
  Microsoft.SqlServer.Management.Dac..::..DacType

命名空间:  Microsoft.SqlServer.Management.Dac
程序集:  Microsoft.SqlServer.Management.Dac(在 Microsoft.SqlServer.Management.Dac.dll 中)

语法

声明
Public Class DacType _
    Implements IXmlSerializable
用法
Dim instance As DacType
public class DacType : IXmlSerializable
public ref class DacType : IXmlSerializable
type DacType =  
    class
        interface IXmlSerializable
    end
public class DacType implements IXmlSerializable

DacType 类型公开以下成员。

构造函数

  名称 说明
公共方法 DacType() () () () 初始化默认的 DacType 对象。
公共方法 DacType(IServer, String, Version, String, Policy, MiscellaneousFilesCollection) 使用指定的定义、名称、版本、说明、服务器选择策略和杂项文件集初始化 DacType 类的新实例。

页首

属性

  名称 说明
公共属性 Definition 获取表示 DAC 类型中的元素图形的 IServer 对象。
公共属性 Description 获取说明 DAC 类型的 String
公共属性 MiscellaneousFiles 获取遍历与 DAC 类型关联的杂项文件的枚举器。
公共属性 Name 获取 DAC 类型的应用程序名称。
公共属性 TargetSelectionPolicy 获取服务器选择策略,该策略定义数据库引擎实例为承载 DAC 类型应满足的要求。
公共属性 Version 获取 DAC 类型的版本。

页首

方法

  名称 说明
公共方法 Equals (从 Object 继承。)
受保护方法 Finalize (从 Object 继承。)
公共方法 GetHashCode (从 Object 继承。)
公共方法 GetType (从 Object 继承。)
公共方法静态成员 Load(Stream) 将指向已保存 DAC 类型的 Stream 对象的输入反序列化为 DacType 对象。
公共方法静态成员 Load(Stream, Boolean) 通过用于加载元素(而不是 DAC 类型元数据)的选项,将指向已保存 DAC 类型的 Stream 对象中的输入反序列化为 DacType 对象。
受保护方法 MemberwiseClone (从 Object 继承。)
公共方法静态成员 Save 将 DacType 对象的内容序列化为发送到指定 Stream 对象的 XML 流。
公共方法 ToString (从 Object 继承。)
公共方法静态成员 Unpack 将 DAC 类型解包到指定的文件夹。
公共方法静态成员 ValidateDescription 验证 DAC 类型的说明不超过最大长度。
公共方法静态成员 ValidateName 验证 DAC 类型的应用程序名称不为 Null 且不超过最大长度。
公共方法静态成员 ValidateTargetSelectionPolicy 验证 DAC 类型的服务器选择策略有效。

页首

字段

  名称 说明
公共字段静态成员 PostDeploymentScriptName 部署后脚本名称。
公共字段静态成员 PreDeploymentScriptName 部署前脚本名称。

页首

显式接口实现

  名称 说明
显式接口实现私有方法 IXmlSerializable. . :: . .GetSchema 未实现。
显式接口实现私有方法 IXmlSerializable. . :: . .ReadXml 从 XML 流反序列化 DAC 类型属性。标识为仅供参考。不提供支持。不保证以后的兼容性。.
显式接口实现私有方法 IXmlSerializable. . :: . .WriteXml 将 DAC 类型属性序列化为 XML 流。标识为仅供参考。不提供支持。不保证以后的兼容性。.

页首

注释

The data-tier application (DAC) type defines the data-tier objects used by an application. It defines instance-level objects such as logins and database objects, such as tables and stored procedures. The type contains a server selection policy that specifies the requirements an instance of the SQL Server Database Engine should meet in order to host the DAC. The type also contains miscellaneous files, such as pre- and post-deployment scripts.

A DAC type is developed in two ways. It is typically authored by using a DAC project in Microsoft Visual Studio. It can also be extracted from an existing database. The DAC type is built into a DAC package, which is an XML manifest of all the elements in the type. The DAC package is used to deploy the DAC type to an instance of the Database Engine. Each deployment creates a DAC instance, which contains both the DAC type from the package, and a database created to hold the objects defined in the DAC type.

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。