Freigeben über


DacCompilationUnit-Klasse

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. 

Vererbungshierarchie

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

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

Syntax

'Declaration
Public Class DacCompilationUnit
'Usage
Dim instance As DacCompilationUnit
public class DacCompilationUnit
public ref class DacCompilationUnit
type DacCompilationUnit =  class end
public class DacCompilationUnit

Der DacCompilationUnit-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode DacCompilationUnit() () () () Initializes a new instance of the DacCompilationUnit class.
Öffentliche Methode DacCompilationUnit(String, Version, String) Initializes a new instance of the DacCompilationUnit class with the specified information.

Zum Anfang

Eigenschaften

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

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche Methode AddTSqlSourceFile Adds a Transact-SQL script file to the compilation unit.
Öffentliche Methode Compile Compiles a DAC type based on the Transact-SQL scripts, server selection policy, and miscellaneous files specified for the DacCompilationUnit object.
Öffentliche Methode Equals (Geerbt von Object.)
Geschützte Methode Finalize (Geerbt von Object.)
Öffentliche Methode GetHashCode (Geerbt von Object.)
Öffentliche Methode GetType (Geerbt von Object.)
Geschützte Methode MemberwiseClone (Geerbt von Object.)
Öffentliche Methode RemoveTSqlSourceFile Removes a Transact-SQL script file from the compilation unit.
Öffentliche Methode ToString (Geerbt von Object.)

Zum Anfang

Hinweise

Using the DacCompilationUnit object, you can:

  • Add and remove Transact-SQL command files.

  • Compile the DAC type with a given collation.

Thread Safety

Alle öffentlichen, statischen Elemente dieses Typs (Shared in Microsoft Visual Basic) sind für Vorgänge mit mehreren Threads sicher. Für Instanzelemente kann nicht sichergestellt werden, dass sie für Threads sicher sind.

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.