Archive for the ‘General’ Category

Temporal Tables – Part 5- Simple Guide to implement History Tables using SQL Server 2016/2017– Storing History data in Azure using Stretch Database

October 25, 2017 Leave a comment

In previous posts, we saw

Part 1 – How to create Temporal Tables

Part 2 – Accessing History data from Temporal Tables

Part 3 – Modifying Temporal Tables, Disabling System versioning and why we need to disable ?

Part 4 – Managing Temporal Tables and History Data

In this post we will see how to store the history data in Azure using Stretch database

Step 1: Right click on Database name and click on Tasks –> Stretch –> Enable


Step 2: Select the tables which you would like to enable Stretch


Step 3: Click on “Entire Table” hyperlink in Migrate column to customize the criteria for Stretch, by default the Entire table will be stored in SQL Azure

Please specify the name of the Stretch Criteria, Please select the Column based on which you want to apply the filter criteria , select the Condition and then specify the value



After specify the criteria, click on “Check” to validate, once you “Success”, Please click “Done” to continue

Step 4:  Please review the selected tables and click “Next” to continue


Step 5: Please sign in to your Azure account, if you are not already signed in, Please select the Subscription, Azure region

We can create a new SQL Azure server or use an existing server, in this demo I am using an existing server

After providing details, click “Next” to continue


Step 6: Please provide the Public IP Address range for which you need to enable access, If you have only one Public IP Address, Please specify that for both From and To and then click Next to proceed

FYI, If you created a new server, by default this step will enable the Firewall for Azure services


Step 7: Review the settings selected and also review the estimated Pricing, this will change based on the number of tables and size of data you are planning to store in SQL Azure

Please click “Finish” to start the Stretch enabling process


We can review the Stretch deployment process in below screenshot, based on your selecting, the steps shown below can change


Once all the steps are completed, we can see status as “Passed”, if you want to see the verbose details on what happened in each step, we can review the Logs, To access the logs, Please click on Hyperlink, This will be very helpful when there is any error occurred


How to monitor Stretch databases ?

We can now see the Icon for the database has changed


To monitor the progress of Stretch, Please right click on Database Name –> Tasks –> Stretch –> Monitor


In Monitor window, we can see the Source server, Target Azure server, Database and list of tables being stretched and number of rows uploaded


We can also connect to the SQL Azure server and access the history data as shown below




How to disable Stretch for a particular table / database ?

To disable Stretch for a table, right click on table name –> Stretch –> Disable

You have 2 options

1. Bring data back from Azure – This will download all the data from SQL Azure and update your local server

2. Leave data in Azure – This will leave the data as is in SQL Azure server and new data will be stored locally

Please choose the option based on your requirement


In this demo, we are using “Bring data back from Azure” option, Please click “Yes” to confirm the disable process


Depending on the size of the data, the process will run and you will see the below message


After disabling Stretch on all the tables, we can disable the Stretch at the database level by right clicking on Database name –> Tasks –> Stretch –> Disable


FYI, If you try disabling the Stretch in your database, before disabling Stretch in the tables, you will see this below validation message


Once the Stretch disable process is completed, we will see this below completed message


FYI, You can use the Stretch option not just for Temporal History tables, you can use this for any other tables where you want to store historical data or least accessed data remotely for reference or compliance purposes

Hope you find this post helpful !!!

Upgrading SQL Server 2017 on Ubuntu Linux to RTM in 4 steps

October 2, 2017 1 comment

SQL Server 2017 RTM is released and available on Windows, Linux and Docker, in this article, we will see the steps for upgrading SQL Server 2017 CTM Release on Ubuntu to RTM Version

Step 1: Connect to Ubuntu Server using your favorite Shell, I use Bash Shell on Windows, since its built-in Windows 10 now

Step 2: Remove old repository

sudo add-apt-repository "$(curl"

Step 3: Add new repository

sudo add-apt-repository "$(curl"

Step 4: Upgrade SQL Server 

sudo apt-get update

sudo apt-get install mssql-server

If you are using Availability groups in Linux, Please upgrade the primary machine first and then secondary replica

Have fun with SQL Server 2017

SQL Server 2017 RTM is available

October 2, 2017 Leave a comment

SQL Server 2017 RTM Version is released and ready to download now

Categories: General

Microsoft Community Contributor Award for 2011

July 28, 2011 4 comments


I am happy to share everyone that I have been awarded Microsoft Community Contributor Award for 2011.

I am so proud that Microsoft has recognized my contribution to the community and I am really proud to be a member of SQL Server and SQL Azure community.

Thanks to everyone for your continued support on this !!!

Please see the below email which I received from Microsoft


NJSQL Presentation Slides

June 21, 2011 Leave a comment

Today I presented “Migrating Data to SQL Azure” in New Jersey SQL Server User Group (NJSQL)

For more information about the presentation visit

I have attached my powerpoint deck to this post so that you can get the links and references that I presented

Be sure to click on the Download Slides link to download the slides.

Please post your comments and questions !!!

Presenting “Migrating Data to SQL Azure” in New Jersey SQL Server User Group

June 20, 2011 Leave a comment

I will be presenting at New Jersey SQL Server User Group


Set Focus
4 Century Drive
Parsippany , NJ, 07054, U.S.A

Meeting Time: 6:30 PM EST – 8:30 PM EST

Session Title: “Migrating Data to SQL Azure”

Session Synopsis:

Migrating on-premise data to SQL Azure and vice versa is one of the new challenge for Database Developers and Administrators.

This session demonstrates what data can be moved to SQL Azure and how easily we can migrate data from On Premise SQL Server to SQL Azure and also from other Heterogeneous database environments.

This session includes live demonstrations using SQL Azure DAC Import Framework tools, SQL Server/Azure Migration Tools and will be highly interactive session.

NJSQL User Group Web site

Join NJSQL User Group at

NJSQL Job Posts

I will post the presentation slides tomorrow after the meeting

Microsoft Officially Previews Windows 8 in D9 Conference

June 1, 2011 Leave a comment

Building “Windows 8”

For more information visit

Categories: General Tags:
%d bloggers like this: