If the feature is enabled at the instance level and you have enough database permissions (db_owner or CONTROL DATABASE), the next step is to enable Stretch DB at the database level. Of course, before you enable it, you need to have a valid Azure account and subscription. You also need to create and configure firewall rules to allow your Azure database to communicate with your local server. In this section, you will enable the Stretch DB feature for a new database. Use this code to create a database named Mila:
DROP DATABASE IF EXISTS Mila; --Ensure that you create a new, empty database GO CREATE DATABASE Mila; GO
Since the database is new and has no tables, it does not violate the limitations listed in the previous section. You can enable the Stretch Database feature at the database level by using wizard or with Transact-SQL.