Archive

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

capture20171023145111550

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

capture20171023145132469

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

capture20171023145208563

capture20171023143520236

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

capture20171023145217186

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

capture20171023145308669

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

capture20171023145338248

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

capture20171023145344372

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

capture20171023145350517

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

capture20171023145653549

How to monitor Stretch databases ?

We can now see the Icon for the database has changed

capture20171023145727577

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

capture20171023145943961

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

capture20171023145858728

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

capture20171023150934383

capture20171023150943585

capture20171023151039526

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

capture20171023150056965

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

capture20171023151116898

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

capture20171023151124884

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

capture20171023151619546

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

capture20171023150002544

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

capture20171023151629941

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 !!!

Advertisements

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 https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017-gdr.list)"

Step 3: Add new repository

sudo add-apt-repository "$(curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"

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

https://www.microsoft.com/en-us/sql-server/sql-server-downloads

Categories: General

Microsoft Community Contributor Award for 2011

July 28, 2011 4 comments

MCC11_Social-Media_Logo

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

image

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

http://njsql.org/blogs/user_group_news/archive/2011/06/06/June-21st-NJSQL-UG-Meeting-_2D00_-Migrating-Data-to-SQL-Azure-with-Arunraj-Chandrasekaran.aspx

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

Location

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 http://www.njsql.org/

Join NJSQL User Group at http://groups.google.com/group/nj-sql-server-user-group

NJSQL Job Posts http://www.linkedin.com/groups?gid=1964935&trk=myg_ugrp_ovr

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 http://www.microsoft.com/presspass/features/2011/jun11/06-01corporatenews.aspx

Categories: General Tags:
%d bloggers like this: