How to generate script that includes schema and static data
jnik
Posts: 4 Bronze 1
in SQL Compare
Is there a way in the SQL COmpare UI to create a deployment script that includes schema and static data?
Best Answer
-
squigley Posts: 249 Gold 1There isn't actually a way to do it within the graphical user interface, but it's possible to do it using the command line interface using the command line.Here's the full documentation on using the command line interface - https://documentation.red-gate.com/sc13/using-the-command-lineAn example for Static Data: switch /include:"StaticData".So for instance, if I wanted to compare a scripts folder with a database and generate a deployment script including the static data, I would save a project file containing the source and target of the comparison and then use the following command line"C:\Program Files (x86)\Red Gate\SQL Compare 13\sqlcompare.exe" /project:"c:\path\myProject.scp" /scriptfile:"deploymentScript.sql" /include:"StaticData"If I wanted to perform the deployment at the same time then I would add /sync to the end of the command line.
Answers
Here's the full documentation on using the command line interface - https://documentation.red-gate.com/sc13/using-the-command-line
An example for Static Data: switch /include:"StaticData".
So for instance, if I wanted to compare a scripts folder with a database and generate a deployment script including the static data, I would save a project file containing the source and target of the comparison and then use the following command line
"C:\Program Files (x86)\Red Gate\SQL Compare 13\sqlcompare.exe" /project:"c:\path\myProject.scp" /scriptfile:"deploymentScript.sql" /include:"StaticData"
If I wanted to perform the deployment at the same time then I would add /sync to the end of the command line.
Sean Quigley | Product Support Engineer | Redgate Software
Have you visited our Help Center?
Sean Quigley | Product Support Engineer | Redgate Software
Have you visited our Help Center?
Here's the full documentation on using the command line interface - https://documentation.red-gate.com/sc13/using-the-command-line
An example for Static Data: switch /include:"StaticData".
So for instance, if I wanted to compare a scripts folder with a database and generate a deployment script including the static data, I would save a project file containing the source and target of the comparison and then use the following command line
"C:\Program Files (x86)\Red Gate\SQL Compare 13\sqlcompare.exe" /project:"c:\path\myProject.scp" /scriptfile:"deploymentScript.sql" /include:"StaticData"
If I wanted to perform the deployment at the same time then I would add /sync to the end of the command line.
Sean Quigley | Product Support Engineer | Redgate Software
Have you visited our Help Center?