Microsoft.SqlServer.Management.Dac Namespace

The Microsoft.SqlServer.Management.Dac namespace contains classes that represent the Dac objects. The top-level instance is called DacStore and provides the connection to SQL Server. The Dac objects can be used to create and manage a DAC package, which contains all the information required to re-create a data-tier application.

The Microsoft.SqlServer.Management.Dac namespace contains the DAC objects. The DAC objects are used together with the Microsoft.SqlServer.Managment.Smo, Microsoft.SqlServer.Managment.Dmf, and Microsoft.SqlServer.Managment.Utility namespaces to create DAC packages. The DAC packages can be installed on an instance of SQL Server using the DAC object model, or deployed onto the SQL Server Utility using the SQL Server Utility object model. In Design mode, SMO is not connected to an instance of SQL Server. The SMO objects are used to design a data-tier application structure which can be saved into the DAC package. A DAC package can also include a limited amount of reference data and some miscellaneous files. Policy information is stored for each SMO instance class, and for the overall instance of SQL Server using DMF conditions. After it is created, the DAC package can be used to install the data-tier application on an instance of SQL Server that meets the specified DMF conditions. In connected mode, the SMO Server object represents an instance of SQL Server.

The Microsoft.SqlServer.Management.Dac namespace resides in the Microsoft.SqlServer.Management.Dac.dll file. Additionally, some of the enumeration classes are in the Microsoft.SqlServer.Management.DacEnum.dll files. You must import both files to access the classes in the Microsoft.SqlServer.Management.Dac namespace. In addition, you must import the Microsoft.SqlServer.Managment.Smo, Microsoft.SqlServer.Managment.Dmf, and Microsoft.SqlServer.Managment.Sdk.Sfc namespaces to create a DAC package.

By using the Microsoft.SqlServer.Management.Dac namespace, you can do the following:

Create an object graph that represents the data-tier application structure.