0

I am using DACPAC deployer to deploy my DB schema using MS Release management and TFS build.I have some configuration tables and the data in these tables should be synchronized with each destination DBs. A data script file is added in my SSDT project. "Database Deployer- Execute script" component has been created in RM client to run the data script file. I need to run this script in different environment and the DB names are different. There are only 2 arguments for this component, the arguments are: -S ServerName -i "ScriptName" -b As DB names are different, i cannot go for "Use DBName;" along with the script. Questions:

  1. How i could manage this script to run on different Databases?
  2. Is there any other way to release data along with schema?
Sreekanth Mohan
  • 340
  • 4
  • 29
  • If you're using SSDT, why are you deploying SQL scripts? You can execute your "data script" as a post-deploy step in SSDT. – Daniel Mann Nov 23 '14 at 15:47
  • If I execute your "data script" as a post-deploy step in SSDT, how it could reflect in the MS Build? Will DACPAC deploy consists of this post deploy step as well? Please excuse me if my comment doesn't make scenes...! – Sreekanth Mohan Nov 24 '14 at 12:55

1 Answers1

0

You should be able to parameterize the SQL Scripts using the SQL Command parameters and inject them at execution time. I would also recommend having a separate activity for executing the data scripts.

Updating the Schema and data load should be separate activities.