Deploy the database to Azure SQL

PREREQUISITES: You must use Microsoft SQL Server Management Studio 18.0 (or later) 

Before you publish your project to Azure App Service, you must first upload your project's database to Azure SQL Database. Azure SQL Database is a database as a service solution providing intelligent, scalable, cloud database service and a broadest SQL Server engine compatibility. To get your Sitefinity website database running in Azure SQL Database perform the following steps:

Create a SQL server

To have your Sitefinity website database deployed to the cloud, you must first have a SQL server that will host your database. If you already have a SQL server in your Azure account, you can skip this step. If you don’t have one or want to create a new SQL server, follow the steps below:

  1. Navigate to the Azure Portal
  2. Using the search box located in the top center of the page, search for SQL Server
  3. From the search results pick SQL Servers
    SQL Servers menu item
  4. Click on the Add button
  5. Fill in the following information:
    1. Server name – the name of your new SQL Server
    2. Server admin login – your server admin user name
    3. Password
    4. Subscription – select an existing Microsoft Azure subscription to designate this server to
    5. Resource group – select an existing resource group or create a new one. For more information on resource groups refer to the Microsoft documentation on Resource groups.
    6. Location – pick a location most suitable for your website traffic to get the best performance.
      SQL Server details

      NOTE: Keep a record of these details as you will need it later in the process to connect to your server.

  6. Click Create
  7. Once your SQL server has been created it will appear in the list of SQL servers for your subscription. If the server does not automatically show up, use the Refresh button to check if it’s not complete.

Deploy your database

Once your SQL Server has been created, you can now proceed with deploying your website database to Azure SQL Database. The process is facilitated in your local installation of SQL Server Management Studio (SSMS). You must connect to your SQL server in Microsoft Azure and deploy your local database there. Follow these steps:

  1. On the machine where your website database is restored, open your SQL Server Management Studio
  2. Locate your database, right click on it, and select Tasks » Deploy Database to Microsoft Azure SQL Database
    Tasks_DeployToAzure
  3. On the next screen, click Next
    DeployDBToAzureNext
  4. The next screen asks you to fill in your Azure SQL server connection details. 
    1. If you followed the steps in the previous paragraph to create a SQL server use the details, you supplied there. 
    2. If you already had an SQL server in your Azure subscription, fill in its details.

    3. When finished, click Connect.
      SSMS_ConnectToAzure
  5. If you haven’t already added a firewall rule in your Azure account that enables communication from your local dev machine’s IP or range of IPs, the next screen enables you to configure one without leaving the SSMS interface. The wizard prompts you to sign in with your Azure account and add a firewall rule for your IP address.
    SSMS_IP_Rules
  6. The next screen facilitates configuring the parameters of your Azure SQL Database. These parameters determine the maximum allowed size of the database and its performance. The officially recommended minimum requirements for your Sitefinity database to operate efficiently are the following:
    1. Edition – Standard
    2. Maximum database size – 50 GB
    3. Service objective – S2

    NOTE: The above settings are the officially recommended minimum for a Sitefinity database. For more information about configuring and pricing options see Azure SQL Database pricing.

    SSMS_SetUpAzureDBSize

  7. Click Next.
  8. On the next screen you are presented with a summary of the configured options. Review it carefully and click Finish to start the deployment process.
    FinishDeploymentDB
  9. Once deployment is complete, click Close on the next screen.

RESULT: Your database has been successfully deployed to Azure SQL Database. You can verify this by going to the Azure portal and clicking on (or searching for) SQL Databases:
Verify_DB_Deployed

NOTE: The instructions provided above are based on using SQL Server Management Studio (SSMS) for deploying your database to Azure SQL. If you encounter any problems while deploying your database, you can try an alternative approach using the Microsoft SQL Data Migration Assistant.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?