Scope reduction from the Microsoft DACExtensions samples.
An installation of SQL Server Data Tools or DacFx is required to run these samples. The sample projects include references to DLLs in a Visual Studio installation with the most recent release of SQL Server Data Tools.
The compiled dlls can be utilized with the DacFx installation included with SQL Server Data Tools, the DacFx Windows-only DacFx.msi, or the cross-platform SqlPackage.exe.
Abbreviate use information:
- Build the samples in Visual Studio
- Copy the dll
Public.Dac.SampleDeploymentFilter.dll
into the DacFx extensions folder or folder with SqlPackage - Execute the publish command with additional properties
/p:AdditionalDeploymentContributors
and/p:AdditionalDeploymentContributorArguments
./sqlpackage.exe /a:Publish /sf:"c:\sampledatabase.dacpac" /tsn:yourservername /tu:sa /tp:yourpassword /p:AdditionalDeploymentContributors=Public.Dac.SampleFilters.PlanFilterer /p:AdditionalDeploymentContributorArguments="FilterName=ObjectBasedFilter;ObjectName=Customer"
./sqlpackage.exe /a:Publish /sf:"c:\sampledatabase.dacpac" /tsn:yourservername /tu:sa /tp:yourpassword /p:AdditionalDeploymentContributors=Public.Dac.SampleFilters.PlanFilterer /p:AdditionalDeploymentContributorArguments="FilterName=SchemaBasedFilter;Schema=dbo"
This project continues to carry the MIT License from the parent project, DACExtensions samples.