Azure DevOps + Azure SQL
GurpreetGill
Posts: 26 Bronze 1
in ReadyRoll
Hi
I am using the RG's Azure DevOps Build extension for building the SCA project. I am trying to use my existing Azure SQL database as shadow database.
When running the pipeline using Azure SQL login credentials, it throws error as
The shadow database cannot be deployed to an instance of Microsoft Azure SQL.
Any hint.
Thanks
Gill
I am using the RG's Azure DevOps Build extension for building the SCA project. I am trying to use my existing Azure SQL database as shadow database.
When running the pipeline using Azure SQL login credentials, it throws error as
The shadow database cannot be deployed to an instance of Microsoft Azure SQL.
Any hint.
Thanks
Gill
Tagged:
Answers
Thanks for your post.
Your shadow database should be deployed to a local instance of SQL Server. The shadow database can't be in Azure because SQL Change Automation will need to drop and recreate it. You can specify a custom connection string for the shadow database in your user settings file.
(https://documentation.red-gate.com/sca/developing-databases/concepts/development-database/using-azure-to-host-your-development-database)
Does this help?
Local DB, does not support the Azure SQL keywords like EXTERNAL PROVIDER
In PostDeployment Script i am trying to create user as below
CREATE USER AzureAD_USer FROM EXTERNAL PROVIDER
which failed the validation in case i use local instance of SQL Server.
So, i want to create Shadow Database in Azure.
I will take care of Creating Shadow Database and Delete the same after build.
Please help
Thanks
Gill
https://documentation.red-gate.com/sca/developing-databases/concepts/development-database/using-azure-to-host-your-development-database
That is a BIG BIG limitation, RG need to speed-up to match the market changes.
Thanks
Gill
The build failed with error as Incorrect syntax near 'PROVIDER', even i wrap the code with variable IsShadowDeployment = 0
Please note that the build process will clean the Temporary Database, you should have a dedicated database for this.
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
When i set the in Azure DevOps build pipeline it throw error.
The shadow database cannot be deployed to an instance of Microsoft Azure SQL.
Please help.
Thanks
Gill
Until this is fixed, to work around this issue I recommend:
- Exclude this user from script generation by using a filter: https://documentation.red-gate.com/sca/developing-databases/concepts/filtering
- Edit the migration scripts and delete the user there
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Thanks
I will update this thread once this is fixed or there are other updates.
In the meantime, I would suggest that you try the workaround I have mentioned
Thank you for your patience,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Thanks
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
No, I am sorry, this hasn't been implemented yet.
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Starting with version 4.2.20133 it is now possible to use Shadow Database hosted in Azure SQL.
We would recommend only doing this when strictly necessary as in terms of performance it is not as a good as the other options.
To use a shadow on Azure you either need to use a new project or set up custom scripts provisioning for an existing project (https://documentation.red-gate.com/sca/developing-databases/concepts/provisioning).
Kind Regards,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools