<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Barbarin &#187; SQL Server 2008 R2</title>
	<atom:link href="https://blog.developpez.com/mikedavem/pcategory/sql-server-2008-r2/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.developpez.com/mikedavem</link>
	<description>MVP DataPlatform - MCM SQL Server</description>
	<lastBuildDate>Thu, 09 Sep 2021 21:19:50 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>Creating dynamic Grafana dashboard for SQL Server</title>
		<link>https://blog.developpez.com/mikedavem/p13207/sql-server-2008-r2/creating-dynamic-grafana-dashboard-for-sql-server</link>
		<comments>https://blog.developpez.com/mikedavem/p13207/sql-server-2008-r2/creating-dynamic-grafana-dashboard-for-sql-server#comments</comments>
		<pubDate>Sun, 11 Apr 2021 19:52:09 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server 2017]]></category>
		<category><![CDATA[SQL Server 2019]]></category>
		<category><![CDATA[AlwaysOn;groupes de disponibilité;availability groups]]></category>
		<category><![CDATA[grafana]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[observability]]></category>
		<category><![CDATA[prometheus]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1784</guid>
		<description><![CDATA[A couple of months ago I wrote about “Why we moved SQL Server monitoring to Prometheus and Grafana”. I talked about the creation of two dashboards. The first one is blackbox monitoring-oriented and aims to spot in (near) real-time resource &#8230; <a href="https://blog.developpez.com/mikedavem/p13207/sql-server-2008-r2/creating-dynamic-grafana-dashboard-for-sql-server">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A couple of months ago I wrote about “<a href="https://blog.developpez.com/mikedavem/p13203/sql-server-2014/why-we-moved-sql-server-monitoring-on-prometheus-and-grafana" rel="noopener" target="_blank">Why we moved SQL Server monitoring to Prometheus and Grafana</a>”. I talked about the creation of two dashboards. The first one is blackbox monitoring-oriented and aims to spot in (near) real-time resource pressure / saturation issues with self-explained gauges, numbers and colors indicating healthy (green) or unhealthy resources (orange / red). We also include availability group synchronization health metric in the dashboard. We will focus on it in this write-up.</p>
<p><span id="more-1784"></span></p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/04/174-1-mssql-dashboard.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-1-mssql-dashboard-1024x158.jpg" alt="174 - 1 - mssql dashboard" width="584" height="90" class="alignnone size-large wp-image-1785" /></a></p>
<p>As a reminder, this Grafana dashboard gets information from Prometheus server and metrics related to MSSQL environments. For a sake of clarity, in this dashboard, environment defines one availability group and a set of 2 AG replicas (A or B) in synchronous replication mode. In other words, <strong>ENV1</strong> value corresponds to availability group name and to SQL instance names member of the AG group with <strong>SERVERA\ENV1</strong> (first replica), <strong>SERVERB\ENV1</strong> (second replica). </p>
<p>In the picture above, you can notice 2 sections. One is for availability group and health monitoring and the second includes a set of black box metrics related to saturation and latencies (CPU, RAM, Network, AG replication delay, SQL Buffer Pool, blocked processes &#8230;). Good job for one single environment but what if I want to introduce more availability groups and SQL instances in the game?</p>
<p>The first and easiest (or naïve) way we went through when we started writing this dashboard was to copy / paste all the stuff done for one environment the panels as shown below:</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/04/174-2-mssql-dashboard-static.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-2-mssql-dashboard-static-1024x242.jpg" alt="174 - 2 - mssql dashboard static" width="584" height="138" class="alignnone size-large wp-image-1786" /></a></p>
<p>After creating a new row (can be associated to section in the present context) at the bottom, all panels were copied from ENV1 to the new fresh section ENV2. New row is created by converting anew panel into row as show below:</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/04/174-3-convert-panel-to-row.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-3-convert-panel-to-row-1024x199.jpg" alt="174 - 3 - convert panel to row" width="584" height="113" class="alignnone size-large wp-image-1787" /></a></p>
<p>Then I need to modify manually ALL the new metrics with the new environment. Let’s illustrate the point with Batch Requests/sec metric as example. The corresponding Prometheus query for the first replica (A) is: (the initial query has been simplified for the purpose of this blog post):</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:650px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">irate(sqlserver_performance{sql_instance='SERVERA:ENV1',counter=&quot;Batch Requests/sec&quot;}[$__range])</div></div>
<p>Same query exists for secondary replica (B) but with a different label value:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:650px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">irate(sqlserver_performance{sql_instance='SERVERB:ENV1',counter=&quot;Batch Requests/sec&quot;}[$__range])</div></div>
<p>SERVERA:ENV1 and SERVERB:ENV1 are static values that correspond to the name of each SQL Server instance – respectively SERVERA\ENV1 and SERVERB\ENV1. As you probably already guessed and according to our naming convention, for the new environment and related panels, we obviously changed initial values ENV1 with new one ENV2. But having more environments or providing filtering capabilities to focus only on specific environments make the current process tedious and we need introduce dynamic stuff in the game &#8230; Good news, Grafana provides such capabilities with dynamic creation of rows and panels. and rows. </p>
<p><strong>Generating dynamic panels in the same section (row)</strong></p>
<p>Referring to the dashboard, first section concerns availability group health metric. When adding a new environment – meaning a new availability group – we want a new dedicated panel creating automatically in the same section (AG health).<br />
Firstly, we need to add a multi-value variable in the dashboard. Values can be static or dynamic from another query regarding your context. (up to you to choose the right solution according to your context).</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/04/174-4-grafana_variable.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-4-grafana_variable.jpg" alt="174 - 4 - grafana_variable" width="968" height="505" class="alignnone size-full wp-image-1789" /></a></p>
<p>Once created, a drop-down list appears at the upper left in the dashboard and now we can perform multi selections or we can filter to specific ones.</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/04/174-5-grafana_variable.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-5-grafana_variable.jpg" alt="174 - 5 - grafana_variable" width="202" height="346" class="alignnone size-full wp-image-1790" /></a></p>
<p>Then we need to make panel in the AG Heath section dynamic as follows:<br />
&#8211; Change the title value with corresponding dashboard (optional)<br />
&#8211; Configure repeat options values with the variable (mandatory). You can also define max panel per row</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/04/174-6-panel-variabilisation.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-6-panel-variabilisation.jpg" alt="174 - 6 - panel variabilisation" width="279" height="414" class="alignnone size-full wp-image-1792" /></a></p>
<p>According to this setup, we can display 4 panels (or availability groups) max per row. The 5th will be created and placed to a new line in the same section as shown below:<br />
<a href="http://blog.developpez.com/mikedavem/files/2021/04/174-7-panel-same-section.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-7-panel-same-section-1024x125.jpg" alt="174 - 7 - panel same section" width="584" height="71" class="alignnone size-large wp-image-1793" /></a></p>
<p>Finally, we must replace static label values defined in the query by the variable counterpart. For the availability group we are using <strong>sqlserver_hadr_replica_states_replica_synchronization_health</strong> metric as follows (again, I voluntary put a sample of the entire query for simplicity purpose):</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:650px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">… sqlserver_hadr_replica_states_replica_synchronization_health{sql_instance=~'SERVER[A|B]:$ENV',measurement_db_type=&quot;SQLServer&quot;}) …</div></div>
<p>You can notice the regex expression used to get information from SQL Instances either from primary (A) or secondary (B). The most interesting part concerns the environment that is now dynamic with $ENV variable.</p>
<p><strong>Generating dynamic sections (rows)</strong></p>
<p>As said previously, sections are in fact rows in the Grafana dashboard and rows can contain panels. If we add new environment, we want also to see a new section (and panels) related to it. Configuring dynamic rows is pretty similar to panels. We only need to change the “Repeat for section” with the environment variable as follows (Title remains optional):</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/04/174-8-row.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-8-row-1024x173.jpg" alt="174 - 8 - row" width="584" height="99" class="alignnone size-large wp-image-1794" /></a></p>
<p>As for AG Health panel, we also need to replace static label values in ALL panels with the new environment variable. Thus, referring to the previous Batch Requests / sec example, the updated Prometheus query will be as follows: (respectively for primary and secondary replicas):</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:650px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">irate(sqlserver_performance{sql_instance='SERVERA:$ENV',counter=&quot;Batch Requests/sec&quot;}[$__range])</div></div>
<p>&#8230;</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:650px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">irate(sqlserver_performance{sql_instance='SERVERB:$ENV',counter=&quot;Batch Requests/sec&quot;}[$__range])</div></div>
<p>The dashboard is now ready, and all dynamic kicks in when a new SQL Server instance is added to the list of monitored items. Here an example of outcome in our context:</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/04/174-0-final-dashboard.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/04/174-0-final-dashboard-1024x404.jpg" alt="174 - 0 - final dashboard" width="584" height="230" class="alignnone size-large wp-image-1795" /></a></p>
<p>Happy monitoring!</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extending SQL Server monitoring with Raspberry PI and Lametric</title>
		<link>https://blog.developpez.com/mikedavem/p13204/sql-server-2005/extending-sql-server-monitoring-with-raspberry-pi-and-lametric</link>
		<comments>https://blog.developpez.com/mikedavem/p13204/sql-server-2005/extending-sql-server-monitoring-with-raspberry-pi-and-lametric#comments</comments>
		<pubDate>Thu, 07 Jan 2021 21:59:25 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[K8s]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server 2017]]></category>
		<category><![CDATA[SQL Server 2019]]></category>
		<category><![CDATA[Lametric]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Raspberry]]></category>
		<category><![CDATA[sqlserver]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1742</guid>
		<description><![CDATA[First blog of this new year 2021 and I will start with a fancy and How-To Geek topic In my last blog post, I discussed about monitoring and how it should help to address quickly a situation that is going &#8230; <a href="https://blog.developpez.com/mikedavem/p13204/sql-server-2005/extending-sql-server-monitoring-with-raspberry-pi-and-lametric">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>First blog of this new year 2021 and I will start with a fancy and How-To Geek topic </p>
<p>In my <a href="https://blog.developpez.com/mikedavem/p13203/sql-server-2014/why-we-moved-sql-server-monitoring-on-prometheus-and-grafana" rel="noopener" target="_blank">last blog post</a>, I discussed about monitoring and how it should help to address quickly a situation that is going degrading. Alerts are probably the first way to raise your attention and, in my case, they are often in the form of emails in a dedicated folder. That remains a good thing, at least if you’re not focusing too long in other daily tasks or projects. In work office, I know I would probably better focus on new alerts but as I said previously, telework changed definitely the game.  </p>
<p><span id="more-1742"></span></p>
<p>I wanted to find a way to address this concern at least for main SQL Server critical alerts and I thought about relying on my existing home lab infrastructure to address the point. Reasons are it is always a good opportunity to learn something and to improve my skills by referring to a real case scenario. </p>
<p>My home lab infrastructure includes a cluster of <a href="https://www.raspberrypi.org/products/raspberry-pi-4-model-b/" rel="noopener" target="_blank">Raspberry PI 4</a> nodes. Initially, I use it to improve my skills on K8s or to study some IOT stuff for instance. It is a good candidate for developing and deploying a new app for detecting new incoming alerts in my mailbox and sending notifications to my Lametric accordingly. </p>
<p><a href="https://lametric.com/" rel="noopener" target="_blank">Lametric</a> is a basically a connected clock but works also as a highly-visible display showing notifications from devices or apps via REST APIs. First time I saw such device in action was in a DevOps meetup in 2018 around Docker and Jenkins deployment with <a href="https://www.linkedin.com/in/duquesnoyeric/" rel="noopener" target="_blank">Eric Dusquenoy</a> and Tim Izzo (<a href="https://twitter.com/5ika_" rel="noopener" target="_blank">@5ika_</a>). In addition, one of my previous customers had also one in his office and we had some discussions about cool customization through Lametric apps. </p>
<p>Connection through VPN to my company network is mandatory to work from home and unfortunately Lametric device doesn’t support this scenario because communication is limited to local network only. So, I need an app that run on my local (home) network and able to connect to my mailbox, get new incoming emails and finally sending notifications to my Lametric device. </p>
<p>Here my setup:</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/01/171-0-lametric_infra.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/01/171-0-lametric_infra-1024x711.jpg" alt="171 - 0 - lametric_infra" width="584" height="405" class="alignnone size-large wp-image-1743" /></a></p>
<p>There are plenty of good blog posts to create a Raspberry cluster on the internet and I would suggest to read <a href="https://dbafromthecold.com/2020/11/30/building-a-raspberry-pi-cluster-to-run-azure-sql-edge-on-kubernetes/" rel="noopener" target="_blank">that</a> of Andrew Pruski (<a href="https://twitter.com/dbafromthecold" rel="noopener" target="_blank">@dbafromthecold</a>). </p>
<p>As shown above, there are different paths for SQL alerts referring our infrastructure (On-prem and Azure SQL databases) but all of them are send to a dedicated distribution list for DBA. </p>
<p>The app is a simple PowerShell script that relies on Exchange Webservices APIs for connecting to the mailbox and to get new mails. Sending notifications to my Lametric device is achieved by a simple REST API call with well-formatted body. Details can be found the <a href="https://lametric-documentation.readthedocs.io/en/latest/reference-docs/device-notifications.html" rel="noopener" target="_blank">Lametric documentation</a>. As prerequisite, you need to create a notification app from Lametric Developer site as follows:</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/01/171-3-lametric-app-token.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/01/171-3-lametric-app-token-1024x364.jpg" alt="171 - 3 - lametric app token" width="584" height="208" class="alignnone size-large wp-image-1744" /></a></p>
<p>As said previously, I used PowerShell for this app. It can help to find documentation and tutorials when it comes Microsoft product. But if you are more confident with Python, APIs are also available in a <a href="https://pypi.org/project/py-ews/" rel="noopener" target="_blank">dedicated package</a>. But let’s precise that using PowerShell doesn’t necessarily mean using Windows-based container and instead I relied on Linux-based image with PowerShell core for ARM architecture. Image is provided by Microsoft on <a href="https://hub.docker.com/_/microsoft-powershell" rel="noopener" target="_blank">Docker Hub</a>. Finally, sensitive information like Lametric Token or mailbox credentials are stored in K8s secret for security reasons. My app project is available on my <a href="https://github.com/mikedavem/lametric" rel="noopener" target="_blank">GitHub</a>. Feel free to use it.</p>
<p>Here some results:</p>
<p>&#8211; After deploying my pod:</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/01/171-1-lametric-pod.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/01/171-1-lametric-pod.jpg" alt="171 - 1 - lametric pod" width="483" height="82" class="alignnone size-full wp-image-1745" /></a></p>
<p>&#8211; The app is running and checking new incoming emails (kubectl logs command)</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2021/01/171-2-lametric-pod-logs.jpg"><img src="http://blog.developpez.com/mikedavem/files/2021/01/171-2-lametric-pod-logs.jpg" alt="171 - 2 - lametric pod logs" width="828" height="438" class="alignnone size-full wp-image-1747" /></a></p>
<p>When email is detected, <a href="https://youtu.be/EcdSFziNc3U" title="Notification" rel="noopener" target="_blank">notification</a> is sendig to Lametric device accordingly</p>
<p>Geek fun good (bad?) idea to start this new year 2021 <img src="https://blog.developpez.com/mikedavem/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server service broker and curious duplicate messages case</title>
		<link>https://blog.developpez.com/mikedavem/p13185/sql-server-2008/sql-server-service-broker-and-curious-duplicate-messages</link>
		<comments>https://blog.developpez.com/mikedavem/p13185/sql-server-2008/sql-server-service-broker-and-curious-duplicate-messages#comments</comments>
		<pubDate>Sun, 22 Dec 2019 18:45:44 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server 2017]]></category>
		<category><![CDATA[service broker]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1419</guid>
		<description><![CDATA[One of my last write-up to finish the year 2019. A couple of days ago, I ran into an interesting issue concerning a service broker architecture. Let’s introduce quickly the context: this is a start-based architecture with one target and &#8230; <a href="https://blog.developpez.com/mikedavem/p13185/sql-server-2008/sql-server-service-broker-and-curious-duplicate-messages">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>One of my last write-up to finish the year 2019. A couple of days ago, I ran into an interesting issue concerning a service broker architecture. Let’s introduce quickly the context: this is a start-based architecture with one target and more than 80 initiators as shown below:</p>
<p><span id="more-1419"></span></p>
<p><a href="http://blog.developpez.com/mikedavem/files/2019/12/152-0-SB-architecture.jpg"><img src="http://blog.developpez.com/mikedavem/files/2019/12/152-0-SB-architecture.jpg" alt="152 - 0 - SB architecture" width="494" height="574" class="alignnone size-full wp-image-1421" /></a></p>
<p>All messages are sent from the initiators to a single central target. Windows authentication for endpoint&rsquo;s connection and messages are encrypted before to be sent to the remote service by using certificates mapped to database users. </p>
<p><a href="http://blog.developpez.com/mikedavem/files/2019/12/152-1-SB-architecture.jpg"><img src="http://blog.developpez.com/mikedavem/files/2019/12/152-1-SB-architecture.jpg" alt="152 - 1 - SB architecture" width="838" height="486" class="alignnone size-full wp-image-1422" /></a></p>
<p>Installing such infrastructure is not trivial and during this year, we often had to deploy and reinitialize service broker configurations because we added new initiators, or some initiators were replaced by other ones. Therefore, on the DBA side we worked on an automatic way to interact with service broker configuration and it turns out that the natural way for us was to write a PowerShell module to address it. </p>
<p>A couple of days, for a sake of curiosity I implemented a service broker event based XE session and I noticed a bunch of broker_message_undeliverable messages with the reason: The message could not be delivered because it is a duplicate. See below:</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2019/12/152-2-xe-result.jpg"><img src="http://blog.developpez.com/mikedavem/files/2019/12/152-2-xe-result.jpg" alt="152 - 2 - xe result" width="1126" height="574" class="alignnone size-full wp-image-1424" /></a></p>
<p>What does it mean exactly? Well, according to my Google-fu and very-explained <a href="https://rusanu.com/2005/12/20/troubleshooting-dialogs/" rel="noopener" target="_blank">blog</a> from Remus Rusanu, it seems that the messages are accepted by the target, but the acks don’t reach back to the sender and therefore the sender is retrying the message again and again. But in my case, the sender ended up managing sending back the acknowledgement. </p>
<p>First step was to identify a misconfigured route between the target and the corresponding initiator. From broker instance value corresponds to the service broker id of the initiator. But surprisingly I didn’t find any misconfigured item. But I remembered the campaign of server rollout that had been going on for a few months where some servers were renamed following a new named convention. Furthermore, in our deployment process, dealing with new or renamed servers is exactly the same and we just initialize a new initiator and install a new route on the target regardless the scenario. But we forget one important point: because all routes are based on server name renaming a server leads to potentially to duplicate routes in this case. I verified my assumption by counting the number of existing routes on the target site:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:650px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SELECT COUNT(*) FROM sys.routes</div></div>
<p>The result was 148 and we expect to get 85 routes in the current architecture confirming we have duplicate items here. Next step consisted in identifying and fixing duplicate routes:</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2019/12/152-30-duplicate-routes-query.jpg"><img src="http://blog.developpez.com/mikedavem/files/2019/12/152-30-duplicate-routes-query.jpg" alt="152 - 30 - duplicate routes query" width="540" height="366" class="alignnone size-full wp-image-1430" /></a></p>
<p>Here a sample of duplicate routes I founded. The renaming server kept its service broker id and I easily identified duplicates by grouping by the broker instance.</p>
<p><a href="http://blog.developpez.com/mikedavem/files/2019/12/152-3-duplicate-routes.jpg"><img src="http://blog.developpez.com/mikedavem/files/2019/12/152-3-duplicate-routes.jpg" alt="152 - 3 - duplicate routes" width="893" height="115" class="alignnone size-full wp-image-1425" /></a></p>
<p>After fixing the issue, messages related to duplicates disappear from the XE output.<br />
Hope this helps!</p>
<p>David Barbarin</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Déplacer des tables en ligne vers des groupes de fichiers avec contraintes et LOB</title>
		<link>https://blog.developpez.com/mikedavem/p13168/sql-server-2008/deplacer-des-tables-en-ligne-vers-des-groupes-de-fichiers-avec-contraintes-et-lob</link>
		<comments>https://blog.developpez.com/mikedavem/p13168/sql-server-2008/deplacer-des-tables-en-ligne-vers-des-groupes-de-fichiers-avec-contraintes-et-lob#comments</comments>
		<pubDate>Thu, 25 Jan 2018 07:01:00 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server 2017]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[groupe de fichiers]]></category>
		<category><![CDATA[LOB]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[partitioning]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1378</guid>
		<description><![CDATA[Commençons cette semaine en revenant sur une discussion intéressante que j&#8217;ai eu avec un de mes clients pour déplacer plusieurs tables vers différents groupes de fichiers. Certaines d&#8217;entre elles contenaient des données LOB. Ajoutons à cela une contrainte supplémentaire du &#8230; <a href="https://blog.developpez.com/mikedavem/p13168/sql-server-2008/deplacer-des-tables-en-ligne-vers-des-groupes-de-fichiers-avec-contraintes-et-lob">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Commençons cette semaine en revenant sur une discussion intéressante que j&rsquo;ai eu avec un de mes clients pour déplacer plusieurs tables vers différents groupes de fichiers. Certaines d&rsquo;entre elles contenaient des données LOB. Ajoutons à cela une contrainte supplémentaire du client: déplacer tout ce petit monde en ligne pour éviter d&rsquo;impacter la disponibilité des données durant le processus de migration. Les tables concernées possèdaient des contraintes de schéma comme une clé primaire et des clés étrangères ainsi que des index non cluster. Finalement quelque chose de plutôt classique avec lequel nous pouvons avoir à faire tous les jours chez les clients.</p>
<p>&gt; <a href="https://blog.dbi-services.com/moving-tables-online-on-filegroup-with-constraints-and-lob-data/" rel="noopener" target="_blank">Lire la suite</a> (en anglais)</p>
<p>David Barbarin<br />
MVP &amp; MCM SQL Server</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Partitionnement: Lorsqu&#8217;un mouvement de données n&#8217;est pas réalisée comme attendue</title>
		<link>https://blog.developpez.com/mikedavem/p13113/sql-server-2008/partitionnement-lorsquun-mouvement-de-donnees-nest-pas-realisee-comme-attendue</link>
		<comments>https://blog.developpez.com/mikedavem/p13113/sql-server-2008/partitionnement-lorsquun-mouvement-de-donnees-nest-pas-realisee-comme-attendue#comments</comments>
		<pubDate>Thu, 13 Oct 2016 18:56:17 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[Data movement]]></category>
		<category><![CDATA[MERGE]]></category>
		<category><![CDATA[mouvement de données]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[partitionnement]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1281</guid>
		<description><![CDATA[Dans ce billet, il est question d&#8217;un cas de partitionnement intéressant avec un comportement curieux de mouvement de données (du moins à première vue). J&#8217;étais chez mon client qui utilise de manière intensive le partitionnement pour diverses raisons incluant l&#8217;archivage &#8230; <a href="https://blog.developpez.com/mikedavem/p13113/sql-server-2008/partitionnement-lorsquun-mouvement-de-donnees-nest-pas-realisee-comme-attendue">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Dans ce billet, il est question d&rsquo;un cas de partitionnement intéressant avec un comportement curieux de mouvement de données (du moins à première vue). J&rsquo;étais chez mon client qui utilise de manière intensive le partitionnement pour diverses raisons incluant l&rsquo;archivage et la facilité de gestion. Il y a quelques jours, nous avons décidé de tester un script fraîchement développé qui prendra en charge l&rsquo;archivage des partitions sur un environnement de qualité.</p>
<p>&gt; <a href="http://blog.dbi-services.com/partitioning-when-data-movement-is-not-performed-as-expected/" target="_blank">Lire la suite</a> (en anglais)</p>
<p>David Barbarin<br />
MVP &amp; MCM SQL Server</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2016: TRUNCATE PARTITIONS et scénarios Sliding Window</title>
		<link>https://blog.developpez.com/mikedavem/p13112/sql-server-2008/sql-server-2016-truncate-partitions-et-scenarios-sliding-window</link>
		<comments>https://blog.developpez.com/mikedavem/p13112/sql-server-2008/sql-server-2016-truncate-partitions-et-scenarios-sliding-window#comments</comments>
		<pubDate>Thu, 13 Oct 2016 18:48:53 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[MERGE]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1277</guid>
		<description><![CDATA[Il y a quelques temps, j&#8217;ai eu à gérer un scénario de partitionnement incluant une gestion sliding Window pour principalement des besoins d&#8217;archivage. Concernant le contexte client, j&#8217;ai utilisé des scripts de gestion automatique composée d&#8217;une étape de suppression de &#8230; <a href="https://blog.developpez.com/mikedavem/p13112/sql-server-2008/sql-server-2016-truncate-partitions-et-scenarios-sliding-window">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Il y a quelques temps, j&rsquo;ai eu à gérer un scénario de partitionnement incluant une gestion <em>sliding Window</em> pour principalement des besoins d&rsquo;archivage. Concernant le contexte client, j&rsquo;ai utilisé des scripts de gestion automatique composée d&rsquo;une étape de suppression de la partition la plus ancienne. Dans ce contexte précis, les données au delà de 2 ans peuvent être supprimées et généralement dans ce cas, j&rsquo;utilise une méthode consistant à supprimer les données en les déplaçant depuis la partition la plus ancienne vers une table de staging. Ensuite je les supprime en utilisant la commande TRUNCATE. Finalement, nous pouvons à ce moment précis fusionner en tout sécurité les données de la partition la plus ancienne en évitant un quelconque mouvement de données. Au premier coup d&rsquo;œil, le processus semble complexe mais jusqu&rsquo;à la version 2014, il n&rsquo;y avait pas de meilleur choix pour minimiser l&rsquo;enregistrement des opérations dans le journal.</p>
<p>&gt; <a href="http://blog.dbi-services.com/sql-server-2016-truncate-partitions-with-sliding-windows-scenarios/" target="_blank">Lire la suite</a> (en anglais)</p>
<p>David Barbarin<br />
MVP &amp; MCM SQL Server</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lorsqu&#8217;une recherche d&#8217;index n&#8217;est pas forcément adéquate</title>
		<link>https://blog.developpez.com/mikedavem/p13111/sql-server-2005/lorsquune-recherche-dindex-nest-pas-forcement-adequate</link>
		<comments>https://blog.developpez.com/mikedavem/p13111/sql-server-2005/lorsquune-recherche-dindex-nest-pas-forcement-adequate#comments</comments>
		<pubDate>Thu, 13 Oct 2016 18:35:29 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[index seek]]></category>
		<category><![CDATA[partial scan]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[sqlserver]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1274</guid>
		<description><![CDATA[N&#8217;avez-vous jamais considéré une recherche d&#8217;index comme un problème? Laissez moi vous raconter une histoire avec un de mes clients avec un contexte simple: une requête spécifique qui n&#8217;était pas dans les valeurs acceptables de performance exigées (environ 200ms de &#8230; <a href="https://blog.developpez.com/mikedavem/p13111/sql-server-2005/lorsquune-recherche-dindex-nest-pas-forcement-adequate">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>N&rsquo;avez-vous jamais considéré une recherche d&rsquo;index comme un problème? Laissez moi vous raconter une histoire avec un de mes clients avec un contexte simple: une requête spécifique qui n&rsquo;était pas dans les valeurs acceptables de performance exigées (environ 200ms de temps d&rsquo;exécution moyen). Le plan d&rsquo;exécution associé de la requête était similaire à ce que vous pouvez voir ici</p>
<p>&gt; <a href="http://blog.dbi-services.com/when-index-seek-operation-is-not-always-your-friend/" target="_blank">Lire la suite</a> (en anglais)</p>
<p>David Barbarin<br />
MVP &amp; MCM SQL Server</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Les 24 heures du PASS (24HOP) – édition francophone</title>
		<link>https://blog.developpez.com/mikedavem/p13110/sql-server-2005/les-24-heures-du-pass-24hop-edition-francophone</link>
		<comments>https://blog.developpez.com/mikedavem/p13110/sql-server-2005/les-24-heures-du-pass-24hop-edition-francophone#comments</comments>
		<pubDate>Sat, 24 Sep 2016 06:25:00 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[Evénements]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[24HOP]]></category>
		<category><![CDATA[columnstore]]></category>
		<category><![CDATA[Pass]]></category>
		<category><![CDATA[PowerBI]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[tempdb]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1268</guid>
		<description><![CDATA[Cette année a eu lieu la première édition francophone des 24h du PASS (les 20 et 21 septembre 2016). L’idée était plutôt simple: proposer une série de 24 webinaires gratuits de 10h jusqu’à 22h (heure française) pendant 2 jours. C’était &#8230; <a href="https://blog.developpez.com/mikedavem/p13110/sql-server-2005/les-24-heures-du-pass-24hop-edition-francophone">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.developpez.com/mikedavem/files/2016/09/24hour_pass.jpg"><img src="http://blog.developpez.com/mikedavem/files/2016/09/24hour_pass.jpg" alt="24hour_pass" width="600" height="360" class="alignnone size-full wp-image-1269" /></a></p>
<p>Cette année a eu lieu la première édition francophone des <a href="http://www.sqlpass.org/24hours/2016/french/About.aspx" target="_blank">24h du PASS</a>  (les 20 et 21 septembre 2016). L’idée était plutôt simple: proposer une série de 24 webinaires gratuits de 10h jusqu’à 22h (heure française)  pendant 2 jours. C’était l’occasion de recevoir et d’échanger les dernières informations autour de l’administration et du développement des bases de données, des nouvelles tendances côté Business Intelligence et du Cloud.</p>
<p>Pour ma part, c’est avec plaisir que j&rsquo;ai eu l&rsquo;occasion d&rsquo;échanger avec vous autour de 2 sujets: <a href="http://www.sqlpass.org/24hours/2016/french/Sessions/Details.aspx?sid=53479" target="_blank">tempdb et bonnes pratiques</a> ainsi que des <a href="http://www.sqlpass.org/24hours/2016/french/Sessions/Details.aspx?sid=53225" target="_blank">columnstore et leur implication dans les nouvelles tendances d’architecture BI</a> avec Thoi Dung TSP Microsoft Switzerland.</p>
<p>C&rsquo;est encore l’occasion de remercier les <a href="http://www.sqlpass.org/24hours/2016/french/Sponsors.aspx" target="_blank">sponsors</a> et <a href="https://thesqlgrrrl.wordpress.com/" target="_blank">Isabelle</a> sans qui ce type d’événement n’aurait certainement pas eu lieu.</p>
<p>Les slides et démos devraient arriver sous peu!</p>
<p>David Barbarin<br />
MVP &amp; MCM SQL Server</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Failover Cluster: Introduction à la notion de paxos tag</title>
		<link>https://blog.developpez.com/mikedavem/p13071/sql-server-2008/windows-failover-cluster-introduction-a-la-notion-de-paxos-tag</link>
		<comments>https://blog.developpez.com/mikedavem/p13071/sql-server-2008/windows-failover-cluster-introduction-a-la-notion-de-paxos-tag#comments</comments>
		<pubDate>Sat, 09 Jul 2016 07:59:19 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[cluster à basculement]]></category>
		<category><![CDATA[paxos]]></category>
		<category><![CDATA[paxos tag]]></category>
		<category><![CDATA[Windows failover cluster]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1230</guid>
		<description><![CDATA[Il y a quelques jours, mon collègue Nathan Courtine et moi étions en charge d&#8217;une nouvelle implémentation d&#8217;une infrastructure AlwaysOn à base de groupes de disponibilités. Une des étapes importantes dans notre approche consiste à éprouver l&#8217;architecture en place face &#8230; <a href="https://blog.developpez.com/mikedavem/p13071/sql-server-2008/windows-failover-cluster-introduction-a-la-notion-de-paxos-tag">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Il y a quelques jours, mon collègue Nathan Courtine et moi étions en charge d&rsquo;une nouvelle implémentation d&rsquo;une infrastructure AlwaysOn à base de groupes de disponibilités. Une des étapes importantes dans notre approche consiste à éprouver l&rsquo;architecture en place face à différents simulation de problème qui pourraient potentiellement survenir. Notre matrice de test inclus un scénario de récupération suite à un désastre avec redémarrage en mode quorum forcé. </p>
<p>Redémarrer un cluster à basculement dans un tel mode implique l&rsquo;exécution de routines internes sur la base de données interne d&rsquo;un cluster. Cette dernière utilise notamment un algorithme nommé Paxos pour garantir que les changements survenus sur un nœud soient répliqués de manière atomique sur le reste de membres de la topologie. Qu&rsquo;est que Paxos exactement? Pour être honnête, j&rsquo;avais déjà certains enregistrements dans le journal du cluster évoquant ce sujet et je n&rsquo;avais jamais vraiment pris le temps de regarder plus précisément à quoi cela correspondait &#8230;</p>
<p>&gt; <a href="http://blog.dbi-services.com/windows-failover-cluster-introduction-to-paxos-tag/" target="_blank">Lire la suite</a> (en anglais)</p>
<p>David Barbarin<br />
MVP &amp; MCM SQL Server</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chute de l&#8217;espérance de vie d&#8217;une page mais ne paniquez pas tout de suite!</title>
		<link>https://blog.developpez.com/mikedavem/p13005/sql-server-2005/chute-de-lesperance-de-vie-dune-page-mais-ne-paniquez-pas-tout-de-suite</link>
		<comments>https://blog.developpez.com/mikedavem/p13005/sql-server-2005/chute-de-lesperance-de-vie-dune-page-mais-ne-paniquez-pas-tout-de-suite#comments</comments>
		<pubDate>Thu, 03 Mar 2016 05:37:22 +0000</pubDate>
		<dc:creator><![CDATA[mikedavem]]></dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[buffer pool]]></category>
		<category><![CDATA[page life expectancy]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[PLE]]></category>
		<category><![CDATA[pression mémoire]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/mikedavem/?p=1183</guid>
		<description><![CDATA[Il y a quelques semaines de cela, j&#8217;ai eu une discussion intéressante avec un de mes clients a propos de la surveillance du fameux page life expectancy (ou PLE). Il me demandait si cela était une bonne pratique de surveiller &#8230; <a href="https://blog.developpez.com/mikedavem/p13005/sql-server-2005/chute-de-lesperance-de-vie-dune-page-mais-ne-paniquez-pas-tout-de-suite">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Il y a quelques semaines de cela, j&rsquo;ai eu une discussion intéressante avec un de mes clients a propos de la surveillance du fameux page life expectancy (ou PLE). Il me demandait si cela était une bonne pratique de surveiller sa valeur parce qu&rsquo;il avait remarqué une grosse chute de ce dernier en dessous des recommandations en vigueur et ceci durant la nuit ou quelques fois pendant la journée. En plus, il craignait d&rsquo;être déranger la nuit à cause de tâche de maintenance qui s&rsquo;exécuterait sans impact sur l&rsquo;activité business à ce moment là.</p>
<p>&gt; <a href="http://blog.dbi-services.com/page-life-expectancy-value-has-just-dropped-but-dont-panic-yet/" target="_blank">Lire la suite</a> (en anglais)</p>
<p>David Barbarin<br />
MVP &amp; MCM SQL Server</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
