<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Ivan Donev's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ivandonev/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ivandonev/feed.xml</link>
    <description>Notes from the field of a SQL Server Premier Field Engineer</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:10:43 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Free scripts and tools for your Production SQL Server</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/free-scripts-and-tools-for-your-production-sql-server</link>
      <pubDate>Thu, 03 Nov 2016 20:43:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/?p=485</guid>
      <description><![CDATA[Yes, that is right – FREE scripts and tools, created by Microsoft SQL Server Tiger PM Team (blog |...]]></description>
      <content:encoded><![CDATA[Yes, that is right – FREE scripts and tools, created by Microsoft SQL Server Tiger PM Team (<a target="_blank" href="https://blogs.msdn.microsoft.com/sql_server_team/">blog</a> | <a target="_blank" href="https://twitter.com/mssqltiger">twitter</a>) are now live on Microsoft repository in github.com.

So, go to <a href="https://github.com/microsoft/tigertoolbox">https://github.com/microsoft/tigertoolbox</a> and enjoy the free stuff. Some notes on the solutions I’ve already used on a lot of production environments:

- <a target="_blank" href="https://github.com/Microsoft/tigertoolbox/tree/master/SQL-Performance-Baseline">SQL Server Performance baseline</a> – probably the best solution I ever worked on the topic of performance baselining. You get a bunch of reports, pre-created for you, that you just need to deploy to a RS instance. The solution uses a distributed system of collecting data, where each monitored instance collects data on its own (in a local database). I’ve hit couple of issues with that solution though, so please be aware – you will need <a target="_blank" href="https://blogs.technet.microsoft.com/rob/2011/11/22/enabling-kerberos-authentication-for-reporting-services/">Kerberos configured for your RS server</a> and might need to change some of the queries to utilize the <a target="_blank" href="https://msdn.microsoft.com/en-us/library/hh213126.aspx">TRY_PARSE()</a> statements, especially on source systems that are with different Windows Locale.

<em>[Edit: 11/24/2017] : Thanks to <a href="https://blogs.msdn.microsoft.com/sql_server_team/" class="url">Parikshit Savjani</a> (SQL Tiger PM)</em> - if you are allowed by your organization's security standards, you can store credentials (both Windows and SQL) in the data sources - <a href="https://technet.microsoft.com/en-us/library/ms159736(v=sql.105)">https://technet.microsoft.com/en-us/library/ms159736(v=sql.105)</a> and <a href="https://technet.microsoft.com/en-us/library/ms160330(v=sql.105)">https://technet.microsoft.com/en-us/library/ms160330(v=sql.105)</a>

- <a href="https://github.com/Microsoft/tigertoolbox/tree/master/systemhealthsession">SQL Server System Health Session</a> PowerBI – you get a template of a PowerBI report, where you just change the source instance and immediately get visual representation of your system health session (SQL 2012+). Which means that even if you do not have any other performance collections and you need some history information on your instance – this is the thing for you. Now you have a tool to visit the history of your SQL.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/image113.png"><img title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb104.png" width="586" height="382" class="aligncenter" /></a>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/image114.png"><img title="image" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb105.png" width="583" height="354" class="aligncenter" /></a>

&nbsp;

- <a target="_blank" href="https://github.com/Microsoft/tigertoolbox/tree/master/BPCheck">BPCheck</a> – this is actually a must have utility for your environment. It is not something that you run on daily basis, but more like a tool you use to check your best practices and sweep your instance for issues on configuration, performance, indexing, plan caching, etc. Make sure you test before you run it on PRODUCTION though. And make sure you are aware of all the input parameters for the script!

&nbsp;

There are over 10 different solutions/scripts/utilities at the tigertoolbox, so make sure you check them all! And test before you implement. Of course, you are also free to adapt them to your environment, as every piece of source code is OPEN for you to use!]]></content:encoded>
    </item>
    <item>
      <title>SQL Saturday Sofia 2016 recap</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/sql-saturday-sofia-2016-recap</link>
      <pubDate>Thu, 20 Oct 2016 09:20:26 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/?p=436</guid>
      <description><![CDATA[SQL Saturday #538 Sofia just ended. It has been an absolutely great experience!!! The recap of the...]]></description>
      <content:encoded><![CDATA[SQL Saturday #538 Sofia just ended. It has been an absolutely great experience!!! The recap of the event, including my slidedeck, you can find <a href="https://docs.com/ivan-donev/3169/sql-saturday-sofia-2016-recap">HERE</a>.

Additionally, I'd like to remind everyone that although the Data loading performance guide has been written back in 2008, it still apply, so if you are doing ETL or you need to load data quickly, please - always refer to it!
<ul>
 	<li><a href="https://technet.microsoft.com/en-us/library/dd425070">Data loading performance guide</a></li>
</ul>
And if you are in the business of bulk loading data into columnstores, just look over the below material.
<ul>
 	<li><a href="https://msdn.microsoft.com/en-us/library/dn935008.aspx">Columnstore indexes data loading</a></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Visiting Prague’s PASS BI and SQL Server chapter</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/visiting-pragues-pass-bi-and-sql-server-chapter</link>
      <pubDate>Fri, 07 Oct 2016 20:41:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/?p=415</guid>
      <description><![CDATA[Last week I was in Prague working with several customers on SQL Server performance tuning and...]]></description>
      <content:encoded><![CDATA[Last week I was in Prague working with several customers on SQL Server performance tuning and baselining (and some extra fun with setting up Kerberos authentication for Reporting Services 2016). So it was a week full of joy :-) But what made the week special, was that I was given the opportunity to speak in front of the local <a target="_blank" href="https://www.meetup.com/CZBISQLPASS/">PASS BI and SQL Chapter</a>. And as far as I know, this is one of the latest additions in the <a target="_blank" href="https://www.sqlpass.org/">PASS</a> community and the energy around it is amazing. The guys organizing it are putting a great deal of their personal time to make it happen and I can definitely see the results. As I am doing similar things in Bulgaria, I know what this means. And the opportunity I was given to share some of my knowledge and experience was just great.

The event itself was held in Microsoft's office and the room was full. Not only that, but everyone that came wanted more and more …. So we did a 2 hour meetup, full of deep dive in indexing, best practices and techniques on monitoring index effectiveness, overcoming limitations and having fun with implicit conversion.

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/clip_image0011.jpg"><img title="clip_image001" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/2016/10/clip_image001_thumb1.jpg" width="1150" height="396" /></a>

The great thing of being in Prague on a SQL Event is that there is always a great pub nearby :-) And I cannot wait until the next time I meet that awesome SQL community in December on <a target="_blank" href="https://www.sqlsaturday.com/569/eventhome.aspx">SQL Saturday Prague</a>! So, if you are nearby or just want to visit Prague and combine it with some SQL Server, <a target="_blank" href="https://www.sqlsaturday.com/569/RegisterNow.aspx">register now</a>!

Thanks again Pavel, Tomas, Jaro and everyone else involved! See you in December :-)]]></content:encoded>
    </item>
    <item>
      <title>It’s October, it’s time for SQL Saturday in Sofia</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/its-october-its-time-for-sql-saturday-in-sofia</link>
      <pubDate>Mon, 03 Oct 2016 07:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/?p=385</guid>
      <description><![CDATA[&nbsp;



As a well established tradition, this year’s SQL Saturday #538 Sofia is again in...]]></description>
      <content:encoded><![CDATA[&nbsp;

<a href="https://www.sqlsaturday.com/538/eventhome.aspx"><img style="float: none;margin-left: auto;margin-right: auto" alt="SQLSaturday #538 - Sofia 2016" src="https://www.sqlsaturday.com/images/sqlsat538_web.png" width="402" height="196" class="aligncenter" /></a>

As a well established tradition, this year’s SQL Saturday #538 Sofia is again in October. Just last week the organizers published the event schedule and as usual, there will be a ton of sessions to choose from and a lot to learn. I had the pleasure to participate in the session selection and I must admit I had tough time choosing the best ones. But in the end, I think we did a good job in selecting the  best of the best in accordance to the trends and speaker profiles. So now we have 4 tracks, 24 presentations, more than 20 speakers amongst which Microsoft engineers, MCMs, MVPs and most importantly – passionate SQL Server enthusiasts. And if you are still not convinced if you want to attend it, take a look at the <a target="_blank" href="https://www.sqlsaturday.com/538/Sessions/Schedule.aspx">schedule</a>. More than 300 already registered and there are still couple of weeks until the event itself (15th of October), so hurry up and <a target="_blank" href="https://www.sqlsaturday.com/538/registernow.aspx">take</a> one of the last tickets available!

I will also have the pleasure to share my passion and knowledge on SQL Server. I had difficult time in deciding what topics to submit and what I want to share with you. In the end, I will be talking on data loading best practices – a topic I recently dug really deep with one of the customers (and SQL Server enthusiasts) I am working with. So…REGISTER NOW and see you all there (I will be there all day long, so if you just want to talk anything SQL Server-ish, I will be your guy <img class="wlEmoticon wlEmoticon-smile" style="border-style: none" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/2016/10/wlEmoticon-smile.png" />)]]></content:encoded>
    </item>
    <item>
      <title>Estimating storage requirements for encrypted columns–AE learning series part 04</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/estimating-storage-requirements-for-encrypted-columns-ae-learning-series-part-04</link>
      <pubDate>Tue, 06 Sep 2016 07:28:33 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/?p=365</guid>
      <description><![CDATA[As we discussed in earlier posts and as you might already be aware, AlwaysEncrypted columns require...]]></description>
      <content:encoded><![CDATA[As we discussed in earlier posts and as you might already be aware, AlwaysEncrypted columns require additional storage after they’re encrypted. Of course, that means that you need to plan properly as this might cause effects to your database, such as data file growth, fragmentation, etc.

So, how exactly can you calculate the space, that your encrypted column would require? There is a formula, that gives you a precise number of bytes for each encrypted cell. That formula is based on the cypher algorithm, used to encrypt the value.
<table cellspacing="0" cellpadding="2" width="800" border="0">
<tbody>
<tr>
<td valign="top" width="798">
<p align="center"><em>1 + 32 + 16 + (FLOOR(DATALENGTH(cell_data)/16) + 1) * 16</em></p>
</td>
</tr>
</tbody>
</table>
&nbsp;

Example: source column is DECIMAL(29,2) – as the precision here is 29, so the <a target="_blank" href="https://msdn.microsoft.com/en-us/library/ms187746.aspx">bytes required to store the value</a> are 17.
<table cellspacing="0" cellpadding="2" width="800" border="0">
<tbody>
<tr>
<td valign="top" width="798">
<p align="center"><em>1 + 32 + 16 + (FLOOR(17/16) + 1) * 16 = 81</em></p>
</td>
</tr>
</tbody>
</table>
&nbsp;

There is also a reference table on fixed data types in our MSDN article on the subject - <a target="_blank" href="https://msdn.microsoft.com/en-us/library/mt653971.aspx">Always Encrypted Cryptography</a>

Based on this formula, you can now evaluate your additional requirements and be prepared.]]></content:encoded>
    </item>
    <item>
      <title>SQL Server instance not starting–failing with ex_handle_except encountered exception C06D007F</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/sql-server-instance-not-starting-failing-with-ex_handle_except-encountered-exception-c06d007f</link>
      <pubDate>Fri, 26 Aug 2016 19:18:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/?p=295</guid>
      <description><![CDATA[Couple of days ago I was on one of my regular customer engagements and as always, there was some...]]></description>
      <content:encoded><![CDATA[Couple of days ago I was on one of my regular customer engagements and as always, there was some proper fun with SQL Server that I had to get my hands dirty with.

So the situation is the following: a highly consolidated environment of SQL Server 2012, 1014 and 2016 standalone instances with Always On Availability Groups, syncing to a secondary site. So far so good. Everything was in production, working without any issues until one day, there was a requirement to install another pair of instances for a new application. The requirement was for a SQL Server 2012 with latest SP (in our case - SQL Server 2012 SP3). The customer starts with the installation of RTM and everything goes well. He then proceeds with applying SP3 and all of a sudden - the patch process hangs and ultimately fails, leaving the instance in an inconsistent state. The fun thing was, that this entire installation and patching went perfectly fine on the second machine.

During our investigation, we noticed the following symptoms:
<ul>
 	<li>During the patch, the SQL Server instance was not able to start and the Windows log was filled with exceptions like below</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2016/08/clip_image00112.png"><img title="clip_image001" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/2016/08/clip_image001_thumb11.png" width="741" height="157" class="aligncenter" /></a>
<ul>
 	<li>The SQL Server error log contained the following error</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2016/08/clip_image0029.png"><img title="clip_image002" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/2016/08/clip_image002_thumb9.png" width="735" height="290" class="aligncenter" /></a>

So as it seems, due to the patching process, there was something preventing the instance from starting up. And that something was causing a stack dump. So…I basically had three options:
<ul>
 	<li>Open a case to Microsoft Support so they can analyze the stack dump</li>
 	<li>Try to analyze the dump myself (that is fun, but also time consuming and not something that is fun while onsite with a customer)</li>
 	<li>Scan whatever knowledge base/internet article I can find</li>
</ul>
I tried to start with the third option first. Naturally I found number of articles with the exception code, pointing to a stack dump generation and here and there some third party tools, messing the SQL Server memory stack. My customer had only antivirus there, so naturally I went for stopping it immediately, but that did not help.

One of the many good things when you work for Microsoft is, that you get to access our internal database with all the customer support cases, so that was my next attempt. Besides all the cases with some third-party tools, preventing the startup, I noticed couple of situations, where the SqlServerSpatial110.dll causing some issues due to wrong versions. WRONG VERSIONS?!?

Yep, I immediately went for checking this DLL. As it turns, there is one DLL for every SQL server version, installed on the machine, which is stored at C:\Windows\system32 folder:

<a href="https://msdnshared.blob.core.windows.net/media/2016/08/clip_image0036.png"><img title="clip_image003" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" border="0" alt="clip_image003" src="https://msdnshared.blob.core.windows.net/media/2016/08/clip_image003_thumb6.png" width="426" height="102" class="aligncenter" /></a>

As it turned out, the SqlServerSpatial110.dll for some reason was the version, coming from SQL Server 2014. Great! So, I found a SQL 2012 SP3 version of that DLL (2011.110.6020.0), replaced it and everything was going well.

I am not sure at this point if this would help anyone else, having the same exception, however I guess if you ever hit it, it is worth trying!]]></content:encoded>
    </item>
    <item>
      <title>Why SQL 2016 rocks – the series (part 2)</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/why-sql-server-2016-rocksthe-series-part2</link>
      <pubDate>Mon, 23 May 2016 07:23:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/?p=157</guid>
      <description><![CDATA[The second post of the series will be covering all those “small” scalability improvements in the SQL...]]></description>
      <content:encoded><![CDATA[The second post of the series will be covering all those “small” scalability improvements in the SQL core, that help you run your workloads with even better performance just by upgrading to SQL Server 2016. The following articles are coming from the CSS SQL Server engineering team and its under the “It just runs faster” series.

<a href="https://blogs.msdn.microsoft.com/psssql/2016/02/23/sql-2016-it-just-runs-faster-announcement/" target="_blank">SQL 2016 – It Just Runs Faster Announcement</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/02/25/sql-2016-it-just-runs-faster-dbcc-scales-7x-better/" target="_blank">SQL 2016 – It Just Runs Faster: DBCC Scales 7x Better</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/01/sql-2016-it-just-runs-faster-dbcc-extended-checks/" target="_blank">SQL 2016 – It Just Runs Faster: DBCC Extended Checks</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/03/sql-2016-it-just-runs-faster-native-spatial-implementations/" target="_blank">SQL 2016 – It Just Runs Faster: Native Spatial Implementation(s)</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/08/sql-2016-it-just-runs-faster-tvps-with-spatial-columns/" target="_blank">SQL 2016 – It Just Runs Faster: TVPs with Spatial Column(s)</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/10/sql-2016-it-just-runs-faster-spatial-index-builds-faster/" target="_blank">SQL 2016 – It Just Runs Faster: Spatial Index Builds Faster</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/15/sql-2016-it-just-runs-faster-t1117-and-t1118-changes-for-tempdb-and-user-databases/" target="_blank">SQL 2016 – It Just Runs Faster: -T1117 and -T1118 changes for TEMPDB and user databases</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/17/sql-2016-it-just-runs-faster-automatic-tempdb-configuration/" target="_blank">SQL 2016 – It Just Runs Faster: Automatic TEMPDB Configuration</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/22/sql-2016-it-just-runs-faster-ldf-stamped/" target="_blank">SQL 2016 – It Just Runs Faster: LDF Stamped</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/25/sql-2016-it-just-runs-faster-instant-file-initialization/" target="_blank">SQL 2016 – It Just Runs Faster: Instant File Initialization</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/03/30/sql-2016-it-just-runs-faster-automatic-soft-numa/" target="_blank">SQL 2016 – It Just Runs Faster: Automatic Soft NUMA</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/01/sql-2016-it-just-runs-faster-updated-scheduling-algorithms/" target="_blank">SQL 2016 – It Just Runs Faster: Updated Scheduling Algorithms</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/06/sql-2016-it-just-runs-faster-dynamic-memory-object-cmemthread-partitioning/" target="_blank">SQL 2016 – It Just Runs Faster: Dynamic Memory Object (CMemThread) Partitioning</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/07/sql-2016-it-just-runs-faster-sos_rwlock-redesign/" target="_blank">SQL 2016 – It Just Runs Faster: SOS_RWLock Redesign</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/12/sql-2016-it-just-runs-faster-indirect-checkpoint-" target="_blank">SQL 2016 – It Just Runs Faster: Indirect Checkpoint Default</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/15/sql-2016-it-just-runs-faster-larger-data-file-writes/" target="_blank">SQL 2016 – It Just Runs Faster: Larger Data File Writes</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/19/sql-2016-it-just-runs-faster-multiple-log-writer-workers/" target="_blank">SQL 2016 – It Just Runs Faster: Multiple Log Writer Workers</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/22/sql-2016-it-just-runs-faster-column-store-uses-vector-instructions-sseavx/" target="_blank">SQL 2016 – It Just Runs Faster: Column Store Uses Vector Instructions (SSE/AVX)</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/27/sql-2016-it-just-runs-faster-bulk-insert-uses-vector-instructions-sseavx/" target="_blank">SQL 2016 – It Just Runs Faster – BULK INSERT Uses Vector Instructions (SSE/AVX)</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/04/28/sql-2016-it-just-runs-faster-alwayson-log-transport-reduced-context-switches/" target="_blank">SQL 2016 – It Just Runs Faster: AlwaysOn Log Transport Reduced Context Switches</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/05/03/sql-2016-it-just-runs-faster-alwayson-parallel-compression-improved-algorithms/" target="_blank">SQL 2016 – It Just Runs Faster: AlwaysOn Parallel Compression / Improved Algorithms</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/05/05/sql-2016-it-just-runs-faster-alwayson-aes-ni-encryption/" target="_blank">SQL 2016 – It Just Runs Faster – AlwaysOn AES-NI Encryption</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/05/10/sql-2016-it-just-runs-faster-in-memory-optimized-database-worker-pool/" target="_blank">SQL 2016 – It Just Runs Faster: In-Memory Optimized Database Worker Pool</a>

<a href="https://blogs.msdn.microsoft.com/psssql/2016/05/18/sql-2016-it-just-runs-faster-xevent-linq-reader/" target="_blank">SQL 2016 – It Just Runs Faster: XEvent Linq Reader</a>

&nbsp;

Quite a lot of improvements! Enjoy and try to keep up with with SQL 2016.]]></content:encoded>
    </item>
    <item>
      <title>Why SQL 2016 rocks – the series (part 1)</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/why-sql-2016-rocks-the-series-part-1</link>
      <pubDate>Fri, 20 May 2016 21:06:17 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/?p=155</guid>
      <description><![CDATA[SQL Server 2016 rocks! There is no doubt about it. At least not with me! I have so many cases where...]]></description>
      <content:encoded><![CDATA[<p>SQL Server 2016 rocks! There is no doubt about it. At least not with me! I have so many cases where just by upgrading to the new engine you get performance improvement in the range of 10s of percents. And this is even before we hit general availability.  <p>The things that are improved are so many, that for me it was really difficult and time consuming to follow everything. So I bookmarked, and bookmarked and bookmarked article after article. So in the end I end up with a huge list of things I went through or I still have to go through. And I decided – why not to share those resources. You probably have them, you probably not, but I will try to do a simple catalogue, so you can easily follow subject by subject. One note – I will mostly share articles by SQL Server CSS team or the different Program Managers, responsible for the feature development of the product. And I am sure there are a lot more articles by the community.  <p>So let’s start. The first topic is Operational analytics which under the hood is columnstore technology allowing you now to have updatable NCCI over traditional indexes and that NCCI can even be filtered! In the last week I was able to test it over an actual data scenario (although only sample of the data in the test environment), but the results were really promising – a simple NCCI over an OLTP table of helpdesk transactions table gave of improvement of 25%. So I am excited. And here are the articles and demos if you want to further dig deep.  <p>And there is the list:  <p><a href="https://blogs.msdn.microsoft.com/sqlserverstorageengine/2016/02/29/real-time-operational-analytics-using-nonclustered-columnstore-index/">Real-Time Operational Analytics: Simple example using nonclustered clustered columnstore index (NCCI)</a>  <p><a href="https://blogs.msdn.microsoft.com/sqlserverstorageengine/2016/03/06/real-time-operational-analytics-filtered-nonclustered-columnstore-index-ncci/">Real-Time Operational Analytics: Compression Delay Option for Nonclustered Columnstore Index (NCCI)</a>  <p><a href="https://blogs.msdn.microsoft.com/sqlserverstorageengine/2016/03/04/real-time-operational-analytics-dml-operations-and-nonclustered-columnstore-index-ncci-in-sql-server-2016/">Real-Time Operational Analytics: Filtered nonclustered columnstore index (NCCI)</a>  <p>Enjoy reading! </p>]]></content:encoded>
    </item>
    <item>
      <title>Permissions required to run Query Store in SQL Server 2016</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/permissions-required-to-run-query-store-in-sql-server-2016</link>
      <pubDate>Wed, 10 Feb 2016 12:14:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/2016/02/10/permissions-required-to-run-query-store-in-sql-server-2016/</guid>
      <description><![CDATA[If you wondered what is the minimum permission set you need to have in order to use Query Store in...]]></description>
      <content:encoded><![CDATA[If you wondered what is the minimum permission set you need to have in order to use <a href="https://msdn.microsoft.com/en-US/library/dn817826.aspx">Query Store in SQL Server 2016</a>, then here is the answer: you need <span style="text-decoration: underline">VIEW DATABASE STATE</span>.

I tried overcoming it by giving read permissions to all the stored procedures, DMVs and DMFs but to be honest – I did not expect it to work…and it didn’t :-)

So, how to grant VIEW DATABASE STATE permission – well the quickest way is T-SQL:
<div id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:227c54c2-f836-46fa-bb8d-43d8e8536e74" class="wlWriterEditableSmartContent" style="float: none;margin: 0px;padding: 0px">
<pre class="sql">USE MyQDSDB
GO
GRANT VIEW DATABASE STATE TO [QDS_USER];</pre>
</div>
VIEW DATABASE STATE will not provide permissions to force execution plans, flush the store, reconfigure it, etc.! For that, you will need to add the user to the db_owner fixed database role.

<strong>Note:</strong> This post is tested in CTP 3.2 of SQL Server 2016 and might not be valid when the product goes RTM.

<em>Edit(20160213): Thanks to ErikEJ for pointing at the error in my script. </em>]]></content:encoded>
    </item>
    <item>
      <title>Plan cache pollution or how important it is to properly define parameters in code</title>
      <link>https://docs.microsoft.com/archive/blogs/ivandonev/plan-cache-pollution-or-how-important-it-is-to-properly-define-parameters-in-code</link>
      <pubDate>Sat, 09 Jan 2016 02:26:00 GMT</pubDate>
      <dc:creator><![CDATA[Ivan Donev [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ivandonev/2016/01/09/plan-cache-pollution-or-how-important-it-is-to-properly-define-parameters-in-code/</guid>
      <description><![CDATA[Recently I was involved in couple of cases concerning plan cache taking more than 20% of the SQL...]]></description>
      <content:encoded><![CDATA[<p>Recently I was involved in couple of cases concerning plan cache taking more than 20% of the SQL Server Buffer Cache and although there is no fixed threshold/best practices value, I noticed that there were a lot of identical statements getting cached. Effective plan caching is important for optimal performance on SQL Server and I will not get into details why. If you want to further read on plan caching, there is a great whitepaper on MSDN &ndash; <a href="https://msdn.microsoft.com/en-us/library/dn148262.aspx" target="_blank">Plan Caching and Parametrization</a></p>
<p>Back to my scenario &ndash; the plan cache was looking very similar to this:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/68/25/metablogapi/6560.1_054FC464.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-68-25-metablogapi/6560.1_5F00_054FC464.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="1" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/68/25/metablogapi/5468.1_thumb_5765025C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-68-25-metablogapi/5468.1_5F00_thumb_5F00_5765025C.png" alt="1" width="818" height="86" border="0" /></a></p>
<p>So I have absolutely the same query, cached three times with one difference only &ndash; the parameter definition of the CourseID parameter. So what was the reason to have this behavior?</p>
<p>In order to reproduce it, I started with a very simple console application, using <a href="https://code.msdn.microsoft.com/windowsdesktop/How-to-Create-and-Execute-86922261#content" target="_blank">Visual Studio Samples</a>. Based on that code, I created couple of methods, so I can reproduce different behaviors. What I noticed is that this behavior is only applicable on parameters with variable length (varchar, nvarchar, etc.), that do not have the size defined in the code of the application itself. Here are the examples:</p>
<ul>
<li><strong>Using </strong><a href="https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparameter(v=vs.110).aspx" target="_blank"><strong>SqlParameter</strong></a><strong> class without specifying the size</strong></li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/68/25/metablogapi/6888.3_403987DE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-68-25-metablogapi/6888.3_5F00_403987DE.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="3" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/68/25/metablogapi/5126.3_thumb_141C8AED.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-68-25-metablogapi/5126.3_5F00_thumb_5F00_141C8AED.png" alt="3" width="833" height="249" border="0" /></a></p>
<ul>
<li><strong>Using </strong><a href="https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparametercollection.addwithvalue(v=vs.110).aspx" target="_blank"><strong>AddWithValue()</strong></a><strong> Method</strong></li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/68/25/metablogapi/7888.4_58CBB5DF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-68-25-metablogapi/7888.4_5F00_58CBB5DF.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="4" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/68/25/metablogapi/0511.4_thumb_686E51A1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-68-25-metablogapi/0511.4_5F00_thumb_5F00_686E51A1.png" alt="4" width="832" height="352" border="0" /></a></p>
<ul>
<li><strong>Using the SqlParameter class with specifying the size</strong></li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/68/25/metablogapi/1031.2_5142D723.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-68-25-metablogapi/1031.2_5F00_5142D723.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="2" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/68/25/metablogapi/3073.2_thumb_6C0EFD2F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-68-25-metablogapi/3073.2_5F00_thumb_5F00_6C0EFD2F.png" alt="2" width="841" height="238" border="0" /></a></p>
<p>What happens is that if you do not specify the size of your parameter and you are executing your queries adhoc (not using stored procedures), the client driver (in that case the ADO.NET library) is evaluating the size of the parameter at runtime and passes it to the SQL Server instance. So if you have 10 inputs with different sizes, then you will have 10 different cached plans.</p>
<p>If you notice in the cached plans, I have 4 different plans and only 1 of them is with nvarchar(11) &ndash; this is the one, executing the method, where I used SqlParameter class with explicitly defining the size of the parameter. Exactly this plan always gets reused (usecounts=4). The others will only be reused if the input parameter at runtime is with the same size of any of the cached plans. But in real world, that would be rarely the case.</p>
<p>Note that <a href="https://msdn.microsoft.com/en-us/library/cc645587.aspx" target="_blank">OptimizeForAdhocWorkloads</a> parameter will not help in this case!</p>
<p>Conclusion: if you are sending dynamic/adhoc queries from your application to the SQL Server instance, <span style="text-decoration: underline;">make sure to properly define the size of your variable parameters</span>. If you are using <strong>int</strong> for instance, this behavior will not be in place</p>]]></content:encoded>
    </item>
  </channel>
</rss>