DacServices Class

Definition

Provides operations to create and consume DAC packages represented by DacPackage instances.

public sealed class DacServices
type DacServices = class
Public NotInheritable Class DacServices
Inheritance
DacServices

Constructors

DacServices(String)

Construct a new instance of the DacServices class that operates against the database specified by the supplied connection string.

DacServices(String, IUniversalAuthProvider)

Construct a new instance of the DacServices class that operates against the database specified by the supplied connection string and authentication provider.

DacServices(String, SecureString)

Construct a new instance of the DacServices class that operates against the database specified by the supplied connection string.

Properties

DiagnosticTrace

Get the TraceSource for diagnostics traces.

Methods

Deploy(DacPackage, String, Boolean, DacDeployOptions, Nullable<CancellationToken>)

Deploy the supplied package to a database.

DisableTelemetry()
EnableTelemetry(String, Version)

Enables telemetry globally and set the application and version name to get included in telemetry events

EnableTelemetry(String, Version, Action<DacFxTelemetryEventData>)

Enables telemetry globally and set the application and version name to get included in telemetry events

EnableTelemetry(String, Version, Action<DacFxTelemetryEventData>, Func<String>)

Enables telemetry globally and set the application and version name to get included in telemetry events

ExportBacpac(Stream, String, DacExportOptions, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)

Extract schema and export data from a database into a "bacpac" package.

ExportBacpac(Stream, String, DacSchemaModelStorageType, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)

Extract schema and export data from a database into a "bacpac" package.

ExportBacpac(Stream, String, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)

Extract schema and export data from a database into a "bacpac" package.

ExportBacpac(String, String, DacExportOptions, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)

Extract schema and export data from a database into a "bacpac" package.

ExportBacpac(String, String, DacSchemaModelStorageType, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)

Extract schema and export data from a database into a "bacpac" package.

ExportBacpac(String, String, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)

Extract schema and export data from a database into a "bacpac" package.

Extract(Stream, String, String, Version, String, IEnumerable<Tuple<String,String>>, DacExtractOptions, Nullable<CancellationToken>)

Extract the schema from a database into a package.

Extract(String, String, String, Version, String, IEnumerable<Tuple<String,String>>, DacExtractOptions, Nullable<CancellationToken>)

Extract the schema from a database into a package.

GenerateCreateScript(DacPackage, String, DacDeployOptions)

Create T-SQL script that can be used to deploy the schema of the supplied DacPackage to a database.

GenerateCreateScript(Stream, DacPackage, String, DacDeployOptions)

Create T-SQL script that can be used to deploy the schema of the supplied DacPackage to a database.

GenerateDeployReport(DacPackage, DacPackage, String, DacDeployOptions)

Create XML report of the steps needed to deploy the differences between the schemas of the supplied source and target DacPackage instances to a database.

GenerateDeployReport(DacPackage, String, DacDeployOptions, Nullable<CancellationToken>)

Create XML report of the steps needed to deploy the schema of the supplied DacPackage to a database.

GenerateDeployReport(Stream, DacPackage, DacPackage, String, DacDeployOptions)

Create XML report of the steps needed to deploy the differences between the schemas of the supplied source and target DacPackage instances to a database.

GenerateDeployScript(DacPackage, DacPackage, String, DacDeployOptions)

Create T-SQL script that can be used to deploy the differences between the schemas of the supplied source and target DacPackage instances to a database.

GenerateDeployScript(DacPackage, String, DacDeployOptions, Nullable<CancellationToken>)

Create T-SQL script that can be used to deploy the schema of the supplied DacPackage to a database.

GenerateDeployScript(Stream, DacPackage, DacPackage, String, DacDeployOptions)

Create T-SQL script that can be used to deploy the differences between the schemas of the supplied source and target DacPackage instances to a database.

GenerateDriftReport(String, DacSchemaModelStorageType, Nullable<CancellationToken>)

Create XML report of the drift that has occurred since the database was last registered.

GenerateDriftReport(String, Nullable<CancellationToken>)

Create XML report of the drift that has occurred since the database was last registered.

ImportBacpac(BacPackage, String, DacAzureDatabaseSpecification, Nullable<CancellationToken>)

Deploy schema and import table data from the supplied package to a database.

ImportBacpac(BacPackage, String, DacImportOptions, Nullable<CancellationToken>)

Deploy schema and import table data from the supplied package to a database.

ImportBacpac(BacPackage, String, Nullable<CancellationToken>)

Deploy schema and import table data from the supplied package to a database.

Publish(DacPackage, String, PublishOptions)

Publish the supplied package to a database. This method supports returning the script used when publishing along with a deployment report summarizing the actions taken during Publish

Register(String, DacSchemaModelStorageType, String, Version, String)

Add DAC registration information for the specified target database.

Register(String, String, Version, String)

Add DAC registration information for the specified target database.

Script(DacPackage, DacPackage, String, PublishOptions)

Scripts the steps for a publish operation as a deployment script, deployment report, or both. At least one of the GenerateDeploymentScript or GenerateDeploymentReport options must be set to true. This method will not modify the target

Script(DacPackage, String, PublishOptions)

Scripts the steps for a publish operation as a deployment script, deployment report, or both. At least one of the GenerateDeploymentScript or GenerateDeploymentReport options must be set to true. This method will not publish to the database

Unregister(String)

Remove DAC registration information for the specified target database.

Events

LogObjectHashed

Invoked as the logger hashes an object name when HashObjectNamesInLogs is set to true.

Message

Invoked as an operation reports status updates or errors.

ProgressChanged

Invoked as the state of an operation changes.

SqlConnectionCreated

Invoked after each SqlConnection instance is created.

Applies to