Share via


DacType Class

The DacType class represents the set of data-tier objects, policies, and properties developed and deployed to support a specific application.

Inheritance Hierarchy

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

Namespace:  Microsoft.SqlServer.Management.Dac
Assembly:  Microsoft.SqlServer.Management.Dac (in Microsoft.SqlServer.Management.Dac.dll)

Syntax

'Declaration
Public Class DacType _
    Implements IXmlSerializable
'Usage
Dim instance As DacType
public class DacType : IXmlSerializable
public ref class DacType : IXmlSerializable
type DacType =  
    class
        interface IXmlSerializable
    end
public class DacType implements IXmlSerializable

The DacType type exposes the following members.

Constructors

  Name Description
Public method DacType() Intializes a default DacType object.
Public method DacType(IServer, String, Version, String, Policy, MiscellaneousFilesCollection) Initializes a new instance of the DacType class with the specified definition, name, version, description, server selection policy, and set of miscellaneous files.

Top

Properties

  Name Description
Public property Definition Gets an IServer object that represents a graph of the elements in the DAC type.
Public property Description Gets a String that describes the DAC type.
Public property MiscellaneousFiles Gets an enumerator that iterates through the miscellaneous files associated with the DAC type.
Public property Name Gets the application name of the DAC type.
Public property TargetSelectionPolicy Gets the server selection policy that defines the requirements an instance of the Database Engine should meet in order to host the DAC type.
Public property Version Gets the version of the DAC type.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public methodStatic member Load(Stream) Deserializes the input from a Stream object pointing to a saved DAC type into a DacType object.
Public methodStatic member Load(Stream, Boolean) Deserializes the input from a Stream object pointing to a saved DAC type into a DacType object, with the option for loading elements other than the DAC type metadata.
Protected method MemberwiseClone (Inherited from Object.)
Public methodStatic member Save Serializes the contents of a DacType object into an XML stream that is sent to the specified Stream object.
Public method ToString (Inherited from Object.)
Public methodStatic member Unpack Unpacks a DAC type into the specified folder.
Public methodStatic member ValidateDescription Verifies that the description of the DAC type does not exceed the maximum length.
Public methodStatic member ValidateName Verifies that the application name of the DAC type is not null and does not exceed the maximum length.
Public methodStatic member ValidateTargetSelectionPolicy Verifies that the server selection policy for the DAC type is valid.

Top

Fields

  Name Description
Public fieldStatic member PostDeploymentScriptName The post-deployment script name.
Public fieldStatic member PreDeploymentScriptName The pre-deployment script name.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IXmlSerializable.GetSchema Not implemented.
Explicit interface implemetationPrivate method IXmlSerializable.ReadXml Deserializes the DAC type properties from an XML stream. Identified for informational purposes only. Not supported. Future compatibility is not guaranteed..
Explicit interface implemetationPrivate method IXmlSerializable.WriteXml Serializes the DAC type properties to an XML stream. Identified for informational purposes only. Not supported. Future compatibility is not guaranteed..

Top

Remarks

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.