How-to: setup Azure SQL account

At the end of this how-to-guide, you will have a Azure account where its Azure SQL cloud database is connected to ADM.

Technologies
Prerequisites
Setup your Azure SQL Server/Database
  1. Create an Azure SQL Database using this tutorial.

Initialized database

Note that after this setup, the azure-account with which the DB is created is automatically the server administrator. Hence, this account has access to the Azure SQL Database as well.

Connect to SQL server
  1. Let’s create a login for the Acheron service user on the master database

Listing 1. Create Azure user
CREATE LOGIN SF_ACHERON_AUTO_EXECUTER WITH password='<acheron-azure-password>';
  1. Make a connection to your database and create a user for the acheron service user

CREATE USER SF_ACHERON_AUTO_EXECUTER FROM LOGIN SF_ACHERON_AUTO_EXECUTER;
  1. Give the new user rights on the database

EXEC sp_addrolemember 'db_ddladmin', 'SF_ACHERON_AUTO_EXECUTER';
Azure set Database rights user
  1. Save the user en password in your secret vault. Next, assign the username and password as environment variables in Gitlab/Github. Check-out these tutorials for the steps in detail: Github-setup Gitlab-setup