Running Post deployment Permissions script
sbindra
Posts: 1 New member
Hi
I am new to sql change automation. We are using Octopus to deploy databaseswith SQl Chnage Automation. We have some permissions to run on different environment need to run after deployment. The User is different for different environment and is already in Octopus Variable. Is there any way that if add my script in post-deplyment folder with variable in sql script, which can be transformed with Octopus variable and run after db deployment with correct user.
Thanks
Sunil bindra
I am new to sql change automation. We are using Octopus to deploy databaseswith SQl Chnage Automation. We have some permissions to run on different environment need to run after deployment. The User is different for different environment and is already in Octopus Variable. Is there any way that if add my script in post-deplyment folder with variable in sql script, which can be transformed with Octopus variable and run after db deployment with correct user.
Thanks
Sunil bindra
Tagged:
Answers
Yes, you can use your Octopus variables with your SQL Change Automation scripts, including Post-Deployment script. SQL Change Automation will treat the Octopus variable as a SQLCMD variable.
You can set the variables in your .sqlproj file either by directly editing the file or using the SQL Change Automation Visual Studio UI, please see the following documents:
https://documentation.red-gate.com/sca/developing-databases/working-with-the-visual-studio-extension/advanced-scenarios-for-visual-studio/adding-a-sqlcmd-variable-to-your-project-in-visual-studio
https://documentation.red-gate.com/sca/developing-databases/concepts/advanced-concepts/variables
Kind Regards,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools