Hi, JayaVenkatasubramanian-2440 Thanks for posting your query in Microsoft Q&A.
I understand that you have two different databases and both have a dependency on each other and you want to deploy only a single dacpac, Please correct me if thats not accurate.
The dacpac deployment is a whole-database operation, this can only be altered by deployment contributors or SQLPackage command line flags (properties).
It gets messy quickly, so the first question is why are we wanting to only deploy a part of the SQL database?
Beyond validating that this is truly necessary, it can be accomplished. By having a view in Sln1 that references the contents of Sln2, the 2 are completely dependent on each other. If you require an independent development component of a portion of the database, further break apart Sln1 to the components that do not rely on Sln2 (now called Sln3), and make Sln1 dependent on Sln2 and Sln3. Sln3’s dacpac can be independently built and deployed ONLY in conjunction with /p:DropObjectsNotInSource:False. Removing objects from Sln3 will not impact the database and this will be done manually, but components missing from Sln1 and Sln2 will not be removed during the deployment.
also please refer Add Database Reference Dialog Box - SQL Server Data Tools (SSDT) | Microsoft Learn
Regards
Geetha
Hi, JayaVenkatasubramanian-2440 Just checking in to see if you had the chance to check the above reply or if you need any additional information, if the above suggestion was helpful. If it answers your query, please do click “Accept Answer” and/or Up-Vote, as it might be beneficial to other community members.
Regards
Geetha
Hello GeethaThatipatri,
Thank you for the response.
I found out that my pipeline had a property set /p:IncludeCompositeObjects=true. This was the reason that the dependent dacpac files were also getting deployed. Once I set it to false, I noticed they were not attempted for deployment.
Thank you for the suggestions.
Thanks, @Jay V good to hear that your issue has been resolved, and thanks for sharing your solution.
Thank you for visiting Microsoft QA forums! Have a great day!
Please don't forget to click on Accept Answer or upvote button whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer.
Regards
Geetha
Sign in to comment