Options

Deployment with VSTS and SQL Azure

I have a Continuos Integration build setup with VSTS (Visual Studio 2017 online) which should execute against a SQL Azure instance.
I have created two SQL Db on my SQL Azure instance:
  • my-database
  • my-database_buildguest_SHADOW

Either from my PC or using the MsBuild task as explained here:
https://documentation.red-gate.com/display/RR1/Tutorial%3A+Visual+Studio+Team+Services

I keep receiving this error:
An error occurred while attempting to (re)build the Shadow database [my-database.DATABASE.WINDOWS.NET].[my-database_buildguest_SHADOW]. 
The shadow database cannot be deployed to an instance of Microsoft Azure SQL.

If I switch to normal SQL Express/Standard or LocalDb it works but on Azure Build I have only access to SQL Azure.
How can I fix this problem? Is it possible to skip Shadow Deployment Database using MsBuild args? I don't care about it, I just need to run the CI build and create a package for release management.

I am passing the following parameters to MsBuild:

/p:TargetServer="<TargetServer>" /p:ShadowServer="<ShadowServer>" 
/p:TargetDatabase="<TargetDatabase>" 
/p:GenerateSqlPackage=True 
/p:ReportStyle=Simple 
/p:TargetUsername="$(TargetUsername)" /p:TargetPassword="$(TargetPassword)" 
/p:ShadowUsername="$(ShadowUsername)" /p:ShadowPassword="$(ShadowPassword)"


It would be nice to have the full list of available parameters for MsBuild
Tagged:

Comments

  • Options
    You can do a basic build that just produces a deployment package and a preview script by removing the following Shadow DB arguments from your build configuration:
    /p:ShadowServer="<ShadowServer>" 
    /p:ShadowUsername="$(ShadowUsername)" 
    /p:ShadowPassword="$(ShadowPassword)"
    /p:ReportStyle=Simple
    
    (the ReportStyle argument is removed as it is not possible to produce a report without deploying the Shadow DB)

    Your arguments should end up looking something like this:
    /p:TargetServer="<TargetServer>"
    /p:TargetDatabase="<TargetDatabase>" 
    /p:GenerateSqlPackage=True 
    /p:TargetUsername="$(TargetUsername)" /p:TargetPassword="$(TargetPassword)"
    

    For a list of all MsBuild arguments, please see the article on Continuous Integration in the ReadyRoll documentation.

    I hope this helps. Any questions please let me know
    Daniel Nolan
    Product Manager
    Redgate Software
  • Options
    I had a similar issue and I setup my shadow database on SQL Server installed on a VM.
  • Options
    Rajesh_B wrote: »
    I had a similar issue and I setup my shadow database on SQL Server installed on a VM.

    I'm sorry to hear that. Was there an issue specifically deploying the shadow database or something else? If you'd like to PM me with your build log I look into what might be going wrong
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.