SQL Change Automation 3

Working with a database hosted on Azure

Upon creating your SQL Change Automation project, you can import an existing database from an Azure instance.

Once the baseline script is created, you can then configure your project for deployment to Azure by ensuring that the following settings are configured in your SQL Change Automation project:

  • Target platform should be set to either Microsoft Azure SQL Database or Microsoft Azure SQL Database v12 . This ensures that the deployment package produced during the build process is compatible with Azure.
  • Shadow database should be deployed to a local instance of SQL Server, if you would like to take advantage of SQL Change Automation's automated migration script generation (i.e. using the SQL Change Automation tool-window). This is configured by checking the following option on the Debug tab: Always use default connection string for Shadow database.

    This will cause the Shadow database to be deployed to the connection displayed in the Default Connection String box, typically (localdb)\ProjectsV13. If you would like to deploy the Shadow database to a different server, see Setting the Shadow connection string within the following article: Development and shadow databases.

  • Target connection string should be set to your Azure instance/database. Click Edit to display the connection dialog, and Browse to your Azure subscription to pre-fill the connection details.

     

After adjusting the above project settings, perform a build of your SQL Change Automation solution to ensure that the changes take effect.

You'll then be able to import your database and generate a baseline migration. After your database is imported, you may find it preferable to change your target connection string to an on-premise instance of SQL Server for editing/script generation, and deploy to your Azure database separately (e.g. using PowerShell or VSTS).


Didn't find what you were looking for?