Tuesday, September 8, 2015

Introducing JSON for SQL Server 2016


On my current project, there is a requirement to extract data, which is stored in one database (D1) and load it into another database (D2). That should be simple, right? But, the client is not ready to give access to the D2 database due to confidential data. We have to push data to the D2 database via the REST API which accepts JSON as an input. We are trying to find an option to convert the data into JSON format at the database level. Unfortunately, SQL Server does not support converting data into JSON format. To resolve this issue, we developed a .NET utility to convert the data to JSON format with the help of the “JavaScriptSerializer” class then pushed the data to the D2 database via REST API I see SQL Server 2016 now supports JSON. Is it possible to replace our .NET utility? In this tip, we will demonstrate how use JSON in SQL Server 2016.


JSON support in SQL Server is one of the highly ranked requests in Connect #673824, which received 1000+ votes.

What is JSON?

To Continue Reading >> Please Refer My Articles at MsSQLTips.com

Wednesday, July 29, 2015

SQL 2016 - Skip Prompting Save

Sometime we may write a SQL script to verify the data or monitor any activities or adhoc tasks in database. In that case, We opens "N" number of Query windows and continue our activities in SSMS. We may not required to keep/save the scripts, but when we  close the windows we will get as many number of prompts for save/cancel the changes. also you will be forced to click each and every annoying save prompts.

This Problem is resolved in SSMS 2016 release.

Microsoft has provided a new option to avoid prompting for saving unsaved files. 

To use this feature, Go to "Tools" Menu > Options > Query Execution > SQL Server > General > Un-check "Prompt to save unsaved T-SQL query windows on close"

You have to disable this option before open any query window, otherwise SSMS will prompt the save changes window at the time of closing

Do not disable this option, if you do, you may lose valid scripts one day if you forget to save the changes when you close any script accidentally. so don't forget to enable this option after use.

Requested By:
A connect item was raised to add this feature by Erland Sommarskog, Refer 
Connect #308372, which replaced Connect #124686. It was denied by Microsoft earlier and closed the ticket stating as "Won't Fix", But due to Many People requests, Now Microsoft has introduced this feature in SQL 2016

SQL 2016 - Automatic Check for Updates

SQL SERVER 2016 - Automatic Check for Updates (New Features in SSMS)

Now you can upgrade your SQL server with latest updates via SSMS 2016 as well, This feature is introduced in SQL 2016 CTP version.

If any updates are available for SQL Server 2016, you will be notified automatically via a Taskbar notification as shown below

If you click on the notification then you can see list of updates as below in SSMS Interface

Even you can manually check the updates in SSMS by click on Tools Menu, Select "Check For Updates..." to see if there are any updates available.

SQL 2016 - Rule "Oracle JRE 7 Update 51 (64-bit) or higher is required" failed.

Today I was trying to install SQL 2016 CTP2.2 in my system. After selected all the feature, I faced the below error while validating the feature rules.

Rule: Oracle JRE 7 Update 51 (64-bit) or higher is required
Error: I clicked on the Failed Link and got the detailed error as below
Rule Check Result
Rule "Oracle JRE 7 Update 51 (64-bit) or higher is required" failed.
This computer does not have the Oracle Java SE Runtime Environment Version 7 Update 51 (64-bit) or higher installed. The Oracle Java SE Runtime Environment is software provided by a third party. Microsoft grants you no rights for such third-party software. You are responsible for and must separately locate, read and accept applicable third-party license terms. To continue, download the Oracle SE Java Runtime Environment from http://go.microsoft.com/fwlink/?LinkId=526030.

I bit surprised why Microsoft product requires Oracle JRE!!

After little Analysis, Found that, To add the PolyBase functionality, we should have JRE version 7u51 or higher in our system

Solution 1:
If you do not require PolyBase then go back to previous page Un check the Polybase feature, then continue the installation

Solution 2:
If require Polybase then follow the below step to Download JRE

Go to link "http://go.microsoft.com/fwlink/?LinkId=526030" given in error page which will redirect to ("http://www.oracle.com/technetwork/java/javase/downloads/index.html")

Step2: Click on "Download" button which is under JRE (Right Side)

Step3: To Download, you must accept the Oracle Binary Code License Agreement, So Click on "Accept License Agreement"

Step4: Download JRE based on OS Architecture

Step5: Install it

Post Installation of JRE 7u51 or higher version, re-run the feature Rule validation, you will see the rule status as "Passed", then you can continue the installation.

Hope This Helps!