Partager via


DacCompilationUnit Class

The DacCompilationUnit accepts Transact-SQL content and compiles it into a data-tier application (DAC) type. Any Transact-SQL file can be added or removed prior to compilation. 

Inheritance Hierarchy

Object
  Microsoft.SqlServer.Management.Dac.DacCompilationUnit

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

Syntax

'Déclaration
Public Class DacCompilationUnit
'Utilisation
Dim instance As DacCompilationUnit
public class DacCompilationUnit
public ref class DacCompilationUnit
type DacCompilationUnit =  class end
public class DacCompilationUnit

The DacCompilationUnit type exposes the following members.

Constructors

  Name Description
Public method DacCompilationUnit() Initializes a new instance of the DacCompilationUnit class.
Public method DacCompilationUnit(String, Version, String) Initializes a new instance of the DacCompilationUnit class with the specified information.

Top

Properties

  Name Description
Public property DatabaseCollation Gets or sets the database collation used for the compile.
Public property Description Gets or sets the text description of the DAC type.
Public property MiscellaneousFiles A collection enumerating the miscellaneous files to include in the DAC type.
Public property TargetSelectionPolicy Gets or sets the server selection policy to compile into the DAC type.
Public property TypeName Gets or sets the name of the DAC type.
Public property Version Gets or sets the version of the DAC type.

Top

Methods

  Name Description
Public method AddTSqlSourceFile Adds a Transact-SQL script file to the compilation unit.
Public method Compile Compiles a DAC type based on the Transact-SQL scripts, server selection policy, and miscellaneous files specified for the DacCompilationUnit object.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method RemoveTSqlSourceFile Removes a Transact-SQL script file from the compilation unit.
Public method ToString (Inherited from Object.)

Top

Remarks

Using the DacCompilationUnit object, you can:

  • Add and remove Transact-SQL command files.

  • Compile the DAC type with a given collation.

Thread Safety

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

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.

See Also

Reference

Microsoft.SqlServer.Management.Dac Namespace