Log in | Register

Programming Archives - SQL Server Blogs, Events, Webcasts, Videos, SQL Server learning & education Programming Archives - SQL Server Blogs, Events, Webcasts, Videos, SQL Server learning & education


Explore statistics histogram using SQL Server 2017

Prior to SQL Server 2016 SP1 CU2, we need to use DBCC SHOW_STATISTICS WITH HISTOGRAM to read Statistics histogram of a specific statistics. Since it is a DBCC command in order to filter any information or if you want to join with another table, we first need to save the out to a table.

Below […]


When we define a table with Identity column, SQL Server might cache the identity values to improve performance. Due to server restart or database failure some assigned values may be lost.  If your application required to have consecutive values, then having identity column was the right choice prior to SQL Server 2017.

You need to […]

SQL Server 2017 New String Function – CONCAT_WS

String manipulation is one of the common requirement for every project. There are many String functions already available in SQL Server but in SQL Server 2017 has some more string functions which ease the developer’s life. CONCAT_WS string function is one of them.


It concatenates a variable numbers of strings using the first argument as […]

Compare Query plan using SSMS

Recently Microsoft released SSMS 17.0. This release of SSMS supports SQL Server 2017 for both running on Windows and Linux. In this release Microsoft has added new features as well as improved some existing features. One of them is to Compare Query plan.

You can download latest SSMS 17.0 here

This is helpful where you have […]

SQL Server 2017 – SELECT INTO on FileGroup

Microsoft has announced SQL Server 2017 CTP version with lots of new features and improvements as compare to previous version i.e. SQL Server 2016. You can download the SQL Server 2017 in the fastest way as explained by Avanish in his recent post. In this blog post we will learn about the new feature […]

Resumable Online Index Rebuild- SQL Server 2017

Resumable online index rebuild is one of the very useful feature of SQL Server 2017 for DBA’s. Now it is possible to pause an Index Rebuild. It allows to resume an online index rebuild operation from where it is stopped or paused. Below are some scenarios where you may need to pause your index […]

New Function String_Split in SQL Server 2016

SQL Server 2016 has many features which makes developer life bit easy to do various task. Earlier to split a string developer use to write a user defined function using temp tables and complex logic. In almost every database I see a user defined function exists which does string split work. The project for […]

Customize your message using FORMATMESSAGE Function

Using FormatMessage function you can construct a message string located in sys.messages. The functionality of FORMATMESSAGE is very much same as RAISERROR statement. FORMATMESSAGE functions edits the message by substituting the supplied parameter values for placeholder variables in the message string.


FORMATMESSAGE ( { msg_number  | ‘ msg_string ‘ } , [ param_value [ ,…n […]

Setting SQL Server Start-up Parameters across Multiple Instances

Hello Geeks,

This is the first blog of the part of blogs set I am going to write for next few months. I have been working on a centralized approach for Database Administration. I know this has been mostly the case for bigger organisations. This blog series will target DBAs who are finding difficult to […]

Clustered Index seek doesn’t guarantee optimal Query plan

I was working on removing duplicate indexes from a table. Before removing an index usually I check whether that index is used by any query or not, is there any index hint is used, looking at index usage statistics and many other factors.

If you search in web you will get many ways to identify […]