<?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>Le blog de SQLpro &#187; volumétrie</title>
	<atom:link href="https://blog.developpez.com/sqlpro/ptag/volumetrie/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.developpez.com/sqlpro</link>
	<description>Le SQL pour SQL Server, PostGreSQL et tous les autres SGBDR</description>
	<lastBuildDate>Thu, 15 Oct 2020 12:59:17 +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>Métriques du stockage de vos bases</title>
		<link>https://blog.developpez.com/sqlpro/p12910/ms-sql-server/metriques-du-stockage-de-vos-bases</link>
		<comments>https://blog.developpez.com/sqlpro/p12910/ms-sql-server/metriques-du-stockage-de-vos-bases#comments</comments>
		<pubDate>Sun, 04 Oct 2015 10:19:41 +0000</pubDate>
		<dc:creator><![CDATA[SQLpro]]></dc:creator>
				<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[capacity planning]]></category>
		<category><![CDATA[dimensionnement]]></category>
		<category><![CDATA[disques]]></category>
		<category><![CDATA[données]]></category>
		<category><![CDATA[fichiers]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SQL server]]></category>
		<category><![CDATA[stockage]]></category>
		<category><![CDATA[transactions]]></category>
		<category><![CDATA[volume]]></category>
		<category><![CDATA[volumétrie]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/sqlpro/?p=608</guid>
		<description><![CDATA[Il est important pour un DBA de vérifier régulièrement le stockage de ses bases et anticiper sur les volumes afin de ne jamais avoir d&#8217;opérations de croissance qui pénalise fortement les performances (capacity planning). Pour cela il est nécessaire de vérifier régulièrement l&#8217;adéquation des &#171;&#160;enveloppes&#160;&#187; du stockage et du volume qui y figure afin de [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Il est important pour un DBA de vérifier régulièrement le stockage de ses bases et anticiper sur les volumes afin de ne jamais avoir d&rsquo;opérations de croissance qui pénalise fortement les performances (<em>capacity planning</em>). Pour cela il est nécessaire de vérifier régulièrement l&rsquo;adéquation des &laquo;&nbsp;enveloppes&nbsp;&raquo; du stockage et du volume qui y figure afin de réagir avant qu&rsquo;une croissance automatique ait lieu.<br />
<span id="more-608"></span><br />
Pour ce faire vous devez mesurer régulièrement les volumes des fichiers, des données (tables et index) des transactions et réajuster les tailles de fichiers.<br />
Voici une procédure qui vous donne ces métriques.</p>
<p><strong>LA PROCÉDURE :</strong></p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">USE</span> master;<br />
<span style="color: #993333; font-weight: bold;">GO</span><br />
<br />
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">PROCEDURE</span> dbo<span style="color: #66cc66;">.</span>sp__METRIQUE_STOCKAGE @REAJUSTE BIT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span><br />
<span style="color: #993333; font-weight: bold;">AS</span><br />
<span style="color: #993333; font-weight: bold;">SET</span> NOCOUNT <span style="color: #993333; font-weight: bold;">ON</span>;<br />
<br />
<span style="color: #993333; font-weight: bold;">IF</span> @REAJUSTE <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><br />
<span style="color: #808080; font-style: italic;">--&gt; réajustement des statistiques des espaces de stockage</span><br />
&nbsp; &nbsp;DBCC UPDATEUSAGE <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">--&gt; volume des transactions</span><br />
<span style="color: #993333; font-weight: bold;">DECLARE</span> @T <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #66cc66;">&#40;</span>database_name sysname<span style="color: #66cc66;">,</span> log_size_mb <span style="color: #993333; font-weight: bold;">FLOAT</span><span style="color: #66cc66;">,</span> log_space_used_percent <span style="color: #993333; font-weight: bold;">FLOAT</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">STATUS</span> bit<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #993333; font-weight: bold;">DECLARE</span> @TRANSACTIONS_RESERVEES_MO <span style="color: #993333; font-weight: bold;">BIGINT</span><span style="color: #66cc66;">,</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; @TRANSACTIONS_UTILISEES_MO <span style="color: #993333; font-weight: bold;">BIGINT</span><span style="color: #66cc66;">,</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; @TRANSACTIONS_UTILISEES_POURCENT <span style="color: #993333; font-weight: bold;">DECIMAL</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> @T<br />
<span style="color: #993333; font-weight: bold;">EXEC</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'DBCC SQLPERF(LOGSPACE)'</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #993333; font-weight: bold;">SELECT</span> @TRANSACTIONS_RESERVEES_MO <span style="color: #66cc66;">=</span> ROUND<span style="color: #66cc66;">&#40;</span>log_size_mb<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp;@TRANSACTIONS_UTILISEES_MO <span style="color: #66cc66;">=</span> ROUND<span style="color: #66cc66;">&#40;</span>log_size_mb <span style="color: #66cc66;">*</span> log_space_used_percent <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">100.0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp;@TRANSACTIONS_UTILISEES_POURCENT <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span>log_space_used_percent <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">DECIMAL</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #993333; font-weight: bold;">FROM</span> @T <span style="color: #993333; font-weight: bold;">WHERE</span> database_name <span style="color: #66cc66;">=</span> DB_NAME<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">-- taille de l'enveloppe de stockage :</span><br />
<span style="color: #993333; font-weight: bold;">WITH</span> <br />
T_FILES <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #66cc66;">&#40;</span><br />
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span>ROUND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #ff0000;">&quot;type&quot;</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #993333; font-weight: bold;">SIZE</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">128.0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">BIGINT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> TRANSACTIONS_RESERVEES_MO<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span>ROUND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> <span style="color: #ff0000;">&quot;type&quot;</span> !<span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #993333; font-weight: bold;">SIZE</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">128.0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">BIGINT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> DONNEES_RESERVE_MO<br />
<span style="color: #993333; font-weight: bold;">FROM</span> &nbsp; sys<span style="color: #66cc66;">.</span>database_files<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
T_DB <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #66cc66;">&#40;</span><br />
<span style="color: #993333; font-weight: bold;">SELECT</span> TRANSACTIONS_RESERVEES_MO <span style="color: #66cc66;">+</span> DONNEES_RESERVE_MO <span style="color: #993333; font-weight: bold;">AS</span> BASE_TAILLE_MO<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;DONNEES_RESERVE_MO<span style="color: #66cc66;">,</span> TRANSACTIONS_RESERVEES_MO<br />
<span style="color: #993333; font-weight: bold;">FROM</span> &nbsp; T_FILES<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> &nbsp; <br />
T_PAGES <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #66cc66;">&#40;</span><br />
<span style="color: #808080; font-style: italic;">-- taille des pages données et index &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><br />
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span>ROUND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span>au<span style="color: #66cc66;">.</span>used_pages<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">128.0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">BIGINT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> DONNEES_UTILISEES_MO<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span>ROUND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">WHEN</span> it<span style="color: #66cc66;">.</span>internal_type <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">202</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">204</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">211</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">212</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">213</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">214</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">215</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">216</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">WHEN</span> au<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">TYPE</span> !<span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">THEN</span> au<span style="color: #66cc66;">.</span>used_pages<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">WHEN</span> p<span style="color: #66cc66;">.</span>index_id <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">2</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">THEN</span> au<span style="color: #66cc66;">.</span>data_pages<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">128.0</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">BIGINT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> TABLES_MO<br />
<span style="color: #993333; font-weight: bold;">FROM</span> &nbsp; sys<span style="color: #66cc66;">.</span>partitions <span style="color: #993333; font-weight: bold;">AS</span> p <br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> sys<span style="color: #66cc66;">.</span>allocation_units au <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">ON</span> p<span style="color: #66cc66;">.</span>partition_id <span style="color: #66cc66;">=</span> au<span style="color: #66cc66;">.</span>container_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">OUTER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> sys<span style="color: #66cc66;">.</span>internal_tables <span style="color: #993333; font-weight: bold;">AS</span> it <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">ON</span> p<span style="color: #66cc66;">.</span>object_id <span style="color: #66cc66;">=</span> it<span style="color: #66cc66;">.</span>object_id<span style="color: #66cc66;">&#41;</span><br />
<span style="color: #993333; font-weight: bold;">SELECT</span> BASE_TAILLE_MO<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;DONNEES_RESERVE_MO<span style="color: #66cc66;">,</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp;DONNEES_UTILISEES_MO<span style="color: #66cc66;">,</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100.0</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span> DONNEES_UTILISEES_MO <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">FLOAT</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">/</span> DONNEES_RESERVE_MO <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">DECIMAL</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> DONNEES_UTILISEES_POURCENT<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;TABLES_MO<span style="color: #66cc66;">,</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp;DONNEES_UTILISEES_MO <span style="color: #66cc66;">-</span> TABLES_MO <span style="color: #993333; font-weight: bold;">AS</span> INDEX_MO<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100.0</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span> TABLES_MO <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">FLOAT</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">/</span> DONNEES_UTILISEES_MO <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">DECIMAL</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> TABLES_POURCENT <span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100.0</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span> DONNEES_UTILISEES_MO <span style="color: #66cc66;">-</span> TABLES_MO <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">FLOAT</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">/</span> DONNEES_UTILISEES_MO <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">DECIMAL</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> INDEX_POURCENT<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;TRANSACTIONS_RESERVEES_MO<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;@TRANSACTIONS_UTILISEES_MO <span style="color: #993333; font-weight: bold;">AS</span> TRANSACTIONS_UTILISEES_MO<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;@TRANSACTIONS_UTILISEES_POURCENT <span style="color: #993333; font-weight: bold;">AS</span> TRANSACTIONS_UTILISEES_POURCENT<br />
<span style="color: #993333; font-weight: bold;">FROM</span> &nbsp; T_PAGES <span style="color: #993333; font-weight: bold;">CROSS</span> <span style="color: #993333; font-weight: bold;">JOIN</span> &nbsp;T_DB;<br />
<span style="color: #993333; font-weight: bold;">GO</span></div></div>
<p>Pour pouvoir l&#039;exécuter de n&#039;importe quelle base, nous pouvons la marquer comme procédure système :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">EXEC sp_MS_marksystemobject 'sp__METRIQUE_STOCKAGE';<br />
GO</div></div>
<p>Les métriques fournies par cette procédure sont les suivantes :<br />
BASE_TAILLE_MO : taille globale de la base y compris transactions<br />
DONNEES_RESERVE_MO : taille réservée pour les données de la base<br />
DONNEES_UTILISEES_MO : volume effectif des données de la base (tables et index)<br />
<strong>DONNEES_UTILISEES_POURCENT : taux de remplissage des données dans les fichiers de la base</strong><br />
TABLES_MO : volume des données des tables (à titre indicatif)<br />
INDEX_MO : volume des index (à titre indicatif)<br />
TABLES_POURCENT : proportion du volume des tables en %  (à titre indicatif)<br />
INDEX_POURCENT : proportion du volume des index en %  (à titre indicatif)<br />
TRANSACTIONS_RESERVEES_MO : taille réservée pour le journal de transaction de la base<br />
TRANSACTIONS_UTILISEES_MO : volume effectif des transactions de la base<br />
<strong>TRANSACTIONS_UTILISEES_POURCENT : taux de remplissage des transactions dans les fichiers de la base</strong></p>
<p>Les deux métriques les plus importantes sont indiquées en gras. C&rsquo;est sur celles-ci qu&rsquo;il faut réagir au plus vite en redimensionnant les fichiers ou en rajoutant de nouveaux fichiers&#8230;<br />
Il est d&rsquo;usage de se poser des questions lorsque les taux de remplissage dépasse 70%, de planifier la croissance à 80 et d&rsquo;agir impérativement à 90%.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Frédéric Brouard, alias SQLpro, ARCHITECTE DE DONNÉES<br />
Expert &nbsp;S.G.B.D &nbsp;relationnelles &nbsp; et &nbsp; langage &nbsp;S.Q.L<br />
Moste &nbsp;Valuable &nbsp;Professionnal &nbsp;Microsoft &nbsp;SQL Server<br />
Société SQLspot &nbsp;: &nbsp;modélisation, conseil, formation,<br />
optimisation, &nbsp;audit, &nbsp;tuning, &nbsp;administration &nbsp;SGBDR<br />
Enseignant: CNAM PACA, ISEN Toulon, CESI Aix en Prov.</div></div>
<div id="attachment_590" style="width: 548px" class="wp-caption alignnone"><a href="http://blog.developpez.com/sqlpro/files/2015/09/Couverture-livre-SQL-server-Eyrolles.jpg"><img src="http://blog.developpez.com/sqlpro/files/2015/09/Couverture-livre-SQL-server-Eyrolles.jpg" alt="Développez et administrez pour la performance avec SQL Server 2014" width="538" height="652" class="size-full wp-image-590" /></a><p class="wp-caption-text">Développez et administrez pour la performance avec SQL Server 2014</p></div>
<p>L&rsquo;entreprise <a href="http://www.sqlspot.com">SQL Spot</a><br />
<strong>Le site web sur le </strong><a href="http://sqlpro.developpez.com/">SQL et les SGBDR</a></p>
<p><img src="http://blog.developpez.com/media/Microsoft_MVP_logo_vertical Brouard 400.jpg" width="400" height="135" alt="MVP Microsoft SQL
Server" /></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Les plus grosses bases de données MS SQL Server actuelles sont en pétaoctets&#8230;</title>
		<link>https://blog.developpez.com/sqlpro/p11813/ms-sql-server/les-plus-grosses-bases-de-donnees-ms-sql-server-actuelles-sont-en-petaoctets</link>
		<comments>https://blog.developpez.com/sqlpro/p11813/ms-sql-server/les-plus-grosses-bases-de-donnees-ms-sql-server-actuelles-sont-en-petaoctets#comments</comments>
		<pubDate>Mon, 04 Mar 2013 15:29:14 +0000</pubDate>
		<dc:creator><![CDATA[SQLpro]]></dc:creator>
				<category><![CDATA[bases de données]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Po]]></category>
		<category><![CDATA[SQL server]]></category>
		<category><![CDATA[To]]></category>
		<category><![CDATA[VLDB]]></category>
		<category><![CDATA[volumétrie]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/sqlpro/?p=258</guid>
		<description><![CDATA[Régulièrement on me dit que MS SQL Server est un jouet comparé à Oracle ou TerraData. Pourtant mon activité professionnelle m&#8217;a conduit à conseiller des clients ayant plusieurs téraoctets de données tant dans des bases relationnelles que décisionnelles. Je me suis donc demandé quelles était les plus grosses bases de données hébergées par des serveurs [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Régulièrement on me dit que MS SQL Server est un jouet comparé à Oracle ou TerraData.<br />
Pourtant mon activité professionnelle m&rsquo;a conduit à conseiller des clients ayant plusieurs téraoctets de données tant dans des bases relationnelles que décisionnelles.<br />
Je me suis donc demandé quelles était les plus grosses bases de données hébergées par des serveurs Microsoft Windows / SQL Server&#8230;<span id="more-258"></span></p>
<p><em>Dépassant le To, on parle de VLDB (Very Large DataBase), mais en Po que doit-on dire ?</em></p>
<p><strong>1) Pann Starrs &#8211; Recherche spatiale</strong></p>
<p>Pann Starrs est l&rsquo;acronyme de Panoramic Survey Telescope and Rapid Response System.<br />
Système de relevé astronomique qui effectue de l&rsquo;astrométrie et de la photométrie (résolution 1.4-gigapixel) d&rsquo;une grande partie du ciel quasiment en continu. En détectant toute différence par rapport aux observations précédentes des </p>
<p>mêmes zones du ciel, Pann STARRS découvre un très grand nombre de nouveaux astéroïdes, comètes, étoiles variables et autre objets célestes (350 milliards de nouveaux objets découverts fin 2011). Sa mission principale est de détecter les objets géocroiseurs qui pourraient provoquer des impacts cosmiques. Sa base de données comprend tous les objets visibles depuis Hawaï (les trois quarts du ciel) jusqu&rsquo;à une magnitude apparente de 24.</p>
<p>Taille de la base : Plusieurs Po (plus de 1 Po par an) de données célestes. Catalogue astronomique de 100 To environ.<br />
Machines : 12 noeuds SQL Server 2008.</p>
<p><strong>2) Myspace.com</strong></p>
<p>Un des réseaux sociaux les plus visités au monde. 25% des américains y adhère. 280 millions d&rsquo;utilisateurs dans le monde.</p>
<p>Taille de la base : &gt; 1 Po<br />
Nombre de serveurs SQL : 450<br />
Travaux : 18 000 messages traités par seconde par serveur.<br />
Infrastructure : 9 000 serveurs Web + 1 000 serveurs de cache (Windows et .net)</p>
<p>MySpace.com était au 5e rang mondial des sites web les plus visités du monde en 2008 en nombre d&rsquo;utilisateurs unique. Le classement était le suivant (tous sites confondus) :<br />
1 Google    145 243<br />
2 Yahoo     139 181<br />
3 Microsoft 128 255<br />
4 AOL LLC   108 917<br />
5 MySpace    85 119 (dont MySpace)</p>
<p><strong>3) CENTIPEDE &#8211; Informatique</strong></p>
<p>Centipede est le nom de code d&rsquo;un projet d&rsquo;un systèmpe opérationnel de traitement de très gros volumes de données et fournit à titre d&rsquo;ISV.<br />
Il est utilisé par plusieurs clients dont la plupart dépassent 100 To de données.</p>
<p>Taille de la base : plus de 500 To (plus grosse base cliente) sur 9 noeuds<br />
Technologie : un serveur SQL &laquo;&nbsp;master node&nbsp;&raquo; (métadonnées), des serveurs esclave &laquo;&nbsp;data nodes&nbsp;&raquo;. Vues partitionnées ditsribuées (Distributed Partitioned Views) partitionnement d&rsquo;index et de données(Data and Index Partitioning) Réplication transactionnelles (Transactional Replication) et cluster de secours (Failover Clustering). La charge de travail est répartie sur les différents nœuds. Des requêtes concurrentes peuvent être envoyées sur le même nœud ou sur des nœuds distribués.</p>
<p>NOTA : le but est la transparence des données. Ajout, suppression remplacement des nœuds facile et rapide. Rapidité de chargement et de migration des données des nœuds (plusieurs To en moins d&rsquo;une journée). Les machines sont standardisées (la plupart du temps 16 cœurs et 64 Go de RAM). </p>
<p><strong>4) Hotmail &#8211; courrier électronique</strong></p>
<p>Dimensions du système : 1,3 milliards de boîtes aux lettres, données : 155 Po, grossissement : 2 Po par mois</p>
<p>Taille des bases SQL : 500 To<br />
Nombre de serveurs SQL : 16 000 sur 160 clusters<br />
Caractéristiques des machines SQL : 2 Xeon CPUs avec 4Go de RAM jusqu&rsquo;à 2 quad-core Xeon CPUs avec 16Go RAM<br />
Haute disponibilité : mirroring des bases de données.</p>
<p><strong>5) Itaù &#8211; banque</strong></p>
<p>Itaù est l&rsquo;une des 15 plus grandes banque du monde (Brasil&rsquo;S Banco Itaù) et héberge une base de données de gestion des risques de trésorerie chargée de calculer les position journalières et calculer les scores des risques de plus de 4,5 millions de transactions financières en portefeuille. Les évaluations de risque utilise SQL CLR (des calculs effectués en .net sous la responsabilité du serveur SQL) et concernent 4 milliards de calculs effectués chaque jour (environ 500 par transactions) sur une machine à 64 processeurs au rythme de 3 000 transactions financières par seconde&#8230;</p>
<p>Taille de la base : 50 To<br />
BI : 180 millions de faits nouveau chaque jour</p>
<p>NOTA : le système a été migré d&rsquo;Oracle pour lequel il prenait plus de 24 heures de traitement pour procéder au calcul journalier des risques. Il ne prends plus aujourd&rsquo;hui que 1 heure, malgré l&rsquo;absorption de la banque Unibanco par Itaù.</p>
<p><strong>6) Webtrends &#8211; Analyse de trafic de site web</strong></p>
<p>Taille de la base : données relationnelles 50 To, décisionnelles : 5 To</p>
<p><strong>7) VimpleCom &#8211; Télécommunication (Russie)</strong></p>
<p>bases de données des analyses de risque et traque de fraude des communications. Grossit chaque jour de 500 Go. Rétention de 40 jours dans la base.</p>
<p>Taille de la base : 20 To</p>
<p><strong>8) First American &#8211; Assurance</strong></p>
<p>L&rsquo;un des plus grosse compagnie américaine d&rsquo;assurance. Le système visé concentre les données des 50 entreprises du groupe dans une solution appelée First American Software Technology (FAST) développée sous plateforme Winows avec SQL </p>
<p>Server. L&rsquo;entreprise génère 10 000 documents par jours et le système joue les intermédiaires entre les différentes applications informatiques.<br />
Taille de la base : 8 To (la plus grosse, d&rsquo;autres bases existent)<br />
Nombre d&rsquo;utilisateurs : 15 000<br />
Utilisateurs concurrents : 7 000 en pointe<br />
Nombre de batch : 15 000 par seconde en moyenne.</p>
<p><strong>9) BWIN &#8211; jeux en ligne</strong></p>
<p>Bwin est la plus grande compagnie de paris en ligne en Europe avec plus d&rsquo;un million de paris par jour. </p>
<p>Taille de la base : plus de 4 To<br />
Nombre de transactions : 30 000 par seconde en pic<br />
haute disponibilité : 99,997% du temps (mesuré en réel)<br />
Technologie : mirroring synchrone des serveurs entre deux datacenter éloignés de 12 miles</p>
<p>NOTA : Bwin est sponsor des clubs de football AC Milan et Real Madrid et figure dans le tube &laquo;&nbsp;poker face&nbsp;&raquo; de Lady gaga&#8230;</p>
<p><strong>10) Gmarket &#8211; Boutique en ligne</strong></p>
<p>Une des boutiques en ligne les plus prisée en Corée du sud. 12 millions de clients dont 3 millions réguliers. Près de 2 milliards de requêtes par jour. CA de 2 milliards de dollar par an.</p>
<p>Machine : HP Superdome doté de 64 processors et 512 Go de RAM<br />
Transactions : 20 000 batch par seconde, pointes régulières à 23 000.</p>
<p><strong>Quelques autres sociétés connues pour leurs VLDB : </strong></p>
<p><strong>En france :</strong></p>
<p>Fnac.com<br />
CDiscount<br />
Vente privée</p>
<p><strong>Dans le monde : </strong></p>
<p>Hilton<br />
Mediterranean Shipping Company (MSC)<br />
Progressive (Assurances USA)<br />
QR Limited (chemin de fer Australie / ERP SAP)<br />
United Airlines (<a href="http://pdfsb.com/readonline/59564e456551422b58485a3843333568-2690357">264 Go en 2010 en BI. Prévue pour 1,5 To</a>)</p>
<p><em>Il en existe bien d&rsquo;autres. mais la plupart ne veulent pas communiquer de chiffre. </em></p>
<p><strong>Le site web sur le </strong><a href="http://sqlpro.developpez.com/">SQL et les SGBDR</a></p>
<p><img src="http://blog.developpez.com/media/Microsoft_MVP_logo_vertical Brouard 400.jpg" width="400" height="135" alt="MVP Microsoft SQL Server" /></p>
<pre>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Frédéric Brouard, alias SQLpro, ARCHITECTE DE DONNÉES<br />
Expert &nbsp;S.G.B.D &nbsp;relationnelles &nbsp; et &nbsp; langage &nbsp;S.Q.L<br />
Moste &nbsp;Valuable &nbsp;Professionnal &nbsp;Microsoft &nbsp;SQL Server<br />
Société SQLspot &nbsp;: &nbsp;modélisation, conseil, formation,<br />
optimisation, &nbsp;audit, &nbsp;tuning, &nbsp;administration &nbsp;SGBDR<br />
Enseignant: CNAM PACA, ISEN Toulon, CESI Aix en Prov.</div></div>

</pre>
<p>L&rsquo;ntreprise <a href="http://www.sqlspot.com">SQL Spot</a></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
