Partager via


Classe DacCompilationUnit

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. 

Hiérarchie d'héritage

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

Espace de noms :  Microsoft.SqlServer.Management.Dac
Assembly :  Microsoft.SqlServer.Management.Dac (en Microsoft.SqlServer.Management.Dac.dll)

Syntaxe

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

Le type DacCompilationUnit expose les membres suivants.

Constructeurs

  Nom Description
Méthode publique DacCompilationUnit() () () () Initializes a new instance of the DacCompilationUnit class.
Méthode publique DacCompilationUnit(String, Version, String) Initializes a new instance of the DacCompilationUnit class with the specified information.

Haut de la page

Propriétés

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

Haut de la page

Méthodes

  Nom Description
Méthode publique AddTSqlSourceFile Adds a Transact-SQL script file to the compilation unit.
Méthode publique Compile Compiles a DAC type based on the Transact-SQL scripts, server selection policy, and miscellaneous files specified for the DacCompilationUnit object.
Méthode publique Equals (hérité de Object.)
Méthode protégée Finalize (hérité de Object.)
Méthode publique GetHashCode (hérité de Object.)
Méthode publique GetType (hérité de Object.)
Méthode protégée MemberwiseClone (hérité de Object.)
Méthode publique RemoveTSqlSourceFile Removes a Transact-SQL script file from the compilation unit.
Méthode publique ToString (hérité de Object.)

Haut de la page

Notes

Using the DacCompilationUnit object, you can:

  • Add and remove Transact-SQL command files.

  • Compile the DAC type with a given collation.

Thread Safety

Tout membre statique public (Partagé dans Microsoft Visual Basic) de ce type est sûr dans le cadre des opérations à plusieurs threads. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.

Sécurité des threads

Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.