How to store scripts folders on Azure Files

This is a detailed step-by-step walkthrough on how to move a database scripts folder to an Azure Files storage and keep it up-to-date with the help of dbForge Schema Compare for SQL Server.

Let us consider the following scenario. We have a development database — AdventureWorks2019_Dev. We want to keep its scripts folder in Azure Cloud File Storage and regularly update it with the most recent changes.

Workflow

Create an Azure Files account

To use Azure Files, you need an active Azure account. If you don’t have an Azure account, go to the Azure website. In the upper right corner of the screen, click Free account and follow the standard instructions.

Now you can set up your Azure Files storage from your Azure account home page via Storage accounts under Azure services. To see how it’s done, refer to Quickstart: Create and use an Azure file share.

Azure Services

Mount the Azure file share on Windows

1. In File Explorer, go to This PC.

2. Select Map network drive from the shortcut menu.

Map network drive

3. In the Map Network Drive dialog that opens, specify the drive letter for the connection and provide the UNC path. The UNC path format is as follows:

\\<YourAccountName>.file.core.windows.net\<YourFileShareName>

In our case, the UNC path appears as follows:

\\dbfstoragetest.file.core.windows.net\testshare

Once done, click Finish.

Map network drive

4. In the Windows Security dialog that opens, enter your credentials to connect to the Azure Files share and click OK.

5. You are ready to use the Azure file share.

Connection to Azure file share established

Move the scripts folder to Microsoft Azure Files

After you have mounted the Azure file share with File Explorer, simply copy the necessary scripts folder to the drive. In our working example, we are moving the AdventureWorks2019_SF database scripts folder to the Azure file share.

AdventureWorks2019_SF database scripts folder to be moved to Azure

Check the Azure Files web console to verify that you have moved the scripts folder successfully.

Azure Files web console

Compare and synchronize a scripts folder stored on Azure Files with a live database

In our scenario, we have a live development database and we want to sync our scripts folder that resides in the cloud with that database. The logic behind this is to regularly run schema and data comparison between the database and the scripts folder, and in case any differences are found — deploy them.

You can automate the process of schema comparison and synchronization by using the command line. Automation of data comparison and synchronization is also possible.

Note

You can similarly move your scripts folders to Azure Files in dbForge Studio for SQL Server. To learn how to do that, refer to our blog post How to Move Your Scripts Folders to Azure Files and Keep Them Up-to-Date.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Schema Compare for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Schema Compare in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Schema Compare for your business, request a demo to see it in action.
Ready to start using dbForge Schema Compare for SQL Server?