SQLCompare options in Change automation cmdlet behavior with dependencies
BenT
Posts: 5 New member
Hello,
I'm using SQL Change Automation cmdlets to deploy script changes with SQL Compare Options to include dependencies. But sounds like when the changes script is generated, the script changes order is not taking into account dependencies.
I need to deploy a table change before a stored procedure, but into the script the stored procedure modifications are applied before table modifications which is causing deployment failure.
Is there any solution for that case?
Thanks in advance for you support,
Regards,
BenT
I'm using SQL Change Automation cmdlets to deploy script changes with SQL Compare Options to include dependencies. But sounds like when the changes script is generated, the script changes order is not taking into account dependencies.
I need to deploy a table change before a stored procedure, but into the script the stored procedure modifications are applied before table modifications which is causing deployment failure.
Is there any solution for that case?
Thanks in advance for you support,
Regards,
BenT
Tagged:
Answers
Could you please confirm whether you're using a SQL Change Automation project or SQL Source Control project?
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
I'm using a SQL Source Control project, comparing the repo on which we are synchronizing our developments with a target database
Thanks for your support,
Regards,
BenT
Thank you for confirming so promptly!
Are you using the PowerShell directly or any of the Add-ons with the cmdlets for your deployment?
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
I created PowerShell scripts for the deployments using SQL Change Automation cmdlets.
Regards,
BenT
Would you mind sharing those with me to review the code?
If you'd prefer not to share them publicly, I can reach out via a support ticket
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
I think there is nothing confidential in the code I already adapted from a Red-Gate employee post.
Please find the code below:
Database build from Source Control db folder synchronized:
--------------------------------------------------------------------------------
Database deployment:
-------------------------------
Regards,
Ben
In this case IncludeDependencies is the default behavior of the SCA PS modules and shouldn't need to be included.
In this case, I'm going to reach out via a support ticket as I'll need your Build Artifact and a copy of the database
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
Ok thanks let's do it this way so.
Waiting for the support ticket to be created.
Regards
Ben