We can enable the stretch feature either through GUI or T-SQL Script. This article will talk about GUI method.
To enable the stretch for your database,
1. You should have Azure subscription
2. If you are using existing SQL Server in Azure then firewall should be enabled.
Steps to enable the stretch,
Step 1: Choose your database which you need to enable stretch and right click –> Tasks –>Stretch –>Enable
Step 2: Create a database credentials, you need to provide the master key. you should use this key whenever you disable or enable the stretch for this database.
Step 3: Select the table which you want to do stretch, you can select multiple tables. This screen will give the information about your table and records in that table and also it will tell you that whether stretch is already enabled or not (Stretched = False).
Step 4: SQL Server settings will be validated here.
Step 5: You need to sign in using your credentials where azure subscription is active. Once sign in, then you need to select Azure SQL Server. You can create a new server or select from existing server.
Step 6: Provide your Azure SQL Server credentials.
Step 7: Finally , SQL Server will configure stretch for your database and table. To verify, check your database icon.
If you get an error while configuring stretch like below, then check the log file. Mostly you will get an error when you are not configured the firewall in Azure SQL Server.