Enable Stretch Database in SQL Server 2016

ByHariharan Rajendran

Enable Stretch Database in SQL Server 2016

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

image

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.

image

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).

image

Step 4: SQL Server settings will be validated here.

image

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.

image

image

Step 6: Provide your Azure SQL Server credentials.

image

Step 7: Finally , SQL Server will configure stretch for your database and table. To verify, check your database icon.

image

image

 

image

 

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.

image

Log file,

image

About the Author

Hariharan Rajendran author

Hariharan Rajendran is a Microsoft Certified Trainer and Lead BI Solutions Consultant with 8+ years of experience in Database, BI and Azure platforms. Hariharan is also an active community leader, speaker & organizer and leads the Microsoft PUG (Power BI User Group – Chennai), SQLPASS Power BI Local Group – Chennai and an active speaker in SQL Server Chennai User Group and also a leader in Data Awareness Program worldwide events. Hariharan also frequently blogs (www.dataap.org/blog), provides virtual training (on ad-hoc basis) on Microsoft Azure, Database Administration, Power BI and database development to worldwide clients/audience.

Comments Are Closed!!!