patternModerate
Excluding a specific table from a SSDT deploy
Viewed 0 times
excludingssdtdeployspecificfromtable
Problem
I have an existing database with everything in schema
I have a table that looks like this in the project:
It depends on dbo.a. dbo.a has many columns that are foreign keys to other columns. Someone else (who maintains the default schema) might change dbo.a.
I'd like to simple store dbo.a as:
So it gets built internally, but not deployed. Is that possible?
dbo. I have an SSDT project with objects I am adding to it with schema fooI have a table that looks like this in the project:
CREATE table foo.a (
id INT NOT NULL
CONSTRAINT [PK_foo_a] PRIMARY KEY CLUSTERED
CONSTRAINT [FK_foo_a] FOREIGN KEY REFERENCES [dbo].[a],
desc NVARCHAR(50) NOT NULL
)It depends on dbo.a. dbo.a has many columns that are foreign keys to other columns. Someone else (who maintains the default schema) might change dbo.a.
I'd like to simple store dbo.a as:
CREATE table dbo.a (
id INT NOT NULL
CONSTRAINT [PK_a] PRIMARY KEY CLUSTERED
)So it gets built internally, but not deployed. Is that possible?
Solution
You can use the AgileSqlClub SqlPackage Deployment Filter.
Brief instructions reproduced from the original article by Ed Elliott:
-
Add these command line parameters to your deployment:
This will neither deploy, drop or alter anything in the
See the original article for complete details.
Brief instructions reproduced from the original article by Ed Elliott:
- Download the filter from agilesqlclub.codeplex.com
- Put the
DLLinto the same folder assqlpackage.exe
-
Add these command line parameters to your deployment:
/p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor /p:AdditionalDeploymentContributorArguments="SqlPackageFilter=IgnoreSchema(BLAH)"This will neither deploy, drop or alter anything in the
BLAH schema.See the original article for complete details.
Context
StackExchange Database Administrators Q#110957, answer score: 11
Revisions (0)
No revisions yet.