<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>VSDOTNET - Tips</title>
    <link>http://www.vsdotnet.ch/</link>
    <description>Un peu de mon expérience dans le monde .NET</description>
    <language>en-us</language>
    <copyright>Stéphane Schwartz</copyright>
    <lastBuildDate>Thu, 18 Feb 2010 15:55:04 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>stephane@vsdotnet.ch</managingEditor>
    <webMaster>stephane@vsdotnet.ch</webMaster>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=64652ffb-60c9-4647-8f0e-8d9e2c112662</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,64652ffb-60c9-4647-8f0e-8d9e2c112662.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,64652ffb-60c9-4647-8f0e-8d9e2c112662.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=64652ffb-60c9-4647-8f0e-8d9e2c112662</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Je développe une tâche personnalisé pour
SSIS (sujet très intéressant, abordé probablement lors d’un prochain post) et fait
face à un problème : afin d’être enregistré dans la GAC, mon composant doit être signé
(Strong Name), ainsi que toute les assembly référencées …<br /><br />
Pour mon développement pas de problème (<font color="#808080" face="Tahoma">sn –k
key.snk &amp; [assembly: assemblyKeyFileAttribute(@"key.snk")</font>]<br /><br />
Mais que faire des composant 3th party, dont je n’ai évidement pas les sources ?<br /><br />
Voici ma solution :<br /><ol><li>
Générer une clé =&gt; <font color="#808080" face="Tahoma">sn –k 3thparty.snk</font></li><li>
Désassembler l’assembly en langage intermédiaire =&gt; <font color="#808080" face="Tahoma">ildasm.exe
3thparty.dll /out: 3thparty.il</font></li><li>
Réassembly l’assembly, en ajoutant la clé =&gt;<font color="#808080" face="Tahoma"> ilasm.exe
3thparty.il /dll /output=3thparty.dll /key=3thparty.snk</font></li></ol><br />
Fonctionne bien évidement seulement si l’assembly n’a pas été obfuscée …<p></p><img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=64652ffb-60c9-4647-8f0e-8d9e2c112662" /></body>
      <title>Signer (Strong Name) une assembly tierce</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,64652ffb-60c9-4647-8f0e-8d9e2c112662.aspx</guid>
      <link>http://www.vsdotnet.ch/2010/02/18/SignerStrongNameUneAssemblyTierce.aspx</link>
      <pubDate>Thu, 18 Feb 2010 15:55:04 GMT</pubDate>
      <description>Je développe une tâche personnalisé pour SSIS (sujet très intéressant, abordé probablement lors d’un prochain post) et fait face à un problème : afin d’être enregistré dans la GAC, mon composant doit être signé (Strong Name), ainsi que toute les assembly référencées …&lt;br&gt;
&lt;br&gt;
Pour mon développement pas de problème (&lt;font color="#808080" face="Tahoma"&gt;sn –k
key.snk &amp;amp; [assembly: assemblyKeyFileAttribute(@"key.snk")&lt;/font&gt;]&lt;br&gt;
&lt;br&gt;
Mais que faire des composant 3th party, dont je n’ai évidement pas les sources ?&lt;br&gt;
&lt;br&gt;
Voici ma solution :&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;
Générer une clé =&amp;gt; &lt;font color="#808080" face="Tahoma"&gt;sn –k 3thparty.snk&lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
Désassembler l’assembly en langage intermédiaire =&amp;gt; &lt;font color="#808080" face="Tahoma"&gt;ildasm.exe
3thparty.dll /out: 3thparty.il&lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
Réassembly l’assembly, en ajoutant la clé =&amp;gt;&lt;font color="#808080" face="Tahoma"&gt; ilasm.exe
3thparty.il /dll /output=3thparty.dll /key=3thparty.snk&lt;/font&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br&gt;
Fonctionne bien évidement seulement si l’assembly n’a pas été obfuscée …&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=64652ffb-60c9-4647-8f0e-8d9e2c112662" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,64652ffb-60c9-4647-8f0e-8d9e2c112662.aspx</comments>
      <category>.NET 3.5</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=d29afa81-9be3-4d5f-836b-b1c619a09baa</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,d29afa81-9be3-4d5f-836b-b1c619a09baa.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,d29afa81-9be3-4d5f-836b-b1c619a09baa.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=d29afa81-9be3-4d5f-836b-b1c619a09baa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
J'ai, pendant quelques années, accédé aux propriétés d'un projet en sélectionnant
celui-ci dans l'explorateur de solution, puis boutons droite / menu contextuel, et
sélection du menu properties, comme illustré dans la figure 1. Depuis hier, je
sais qu'il est possible d'accéder aux propriétés d'un projet en double cliquant sur
le dossier 'properties' de celui-ci ... (figure 2)
</p>
        <p align="center">
          <img height="456" src="http://www.vsdotnet.ch/content/binary/SolExp.jpg" width="177" border="0" />     <img height="175" src="http://www.vsdotnet.ch/content/binary/SolExp2.jpg" width="198" border="0" /></p>
        <p align="center">
          <font color="#0000ff"> Figure 1               
                      Figure
2</font>
        </p>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=d29afa81-9be3-4d5f-836b-b1c619a09baa" />
      </body>
      <title>Visual Studio 2008 tip : accéder au propriétés d'un projet en double cliquant sur le dossier 'properties'</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,d29afa81-9be3-4d5f-836b-b1c619a09baa.aspx</guid>
      <link>http://www.vsdotnet.ch/2008/12/09/VisualStudio2008TipAcc%c3%a9derAuPropri%c3%a9t%c3%a9sDunProjetEnDoubleCliquantSurLeDossierProperties.aspx</link>
      <pubDate>Tue, 09 Dec 2008 12:52:10 GMT</pubDate>
      <description>&lt;p&gt;
J'ai, pendant quelques années, accédé aux propriétés d'un projet en sélectionnant
celui-ci dans l'explorateur de solution, puis boutons droite / menu contextuel, et
sélection du menu&amp;nbsp;properties, comme illustré dans la figure 1. Depuis hier, je
sais qu'il est possible d'accéder aux propriétés d'un projet en double cliquant sur
le dossier 'properties' de celui-ci ... (figure 2)
&lt;/p&gt;
&lt;p align=center&gt;
&lt;img height=456 src="http://www.vsdotnet.ch/content/binary/SolExp.jpg" width=177 border=0&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img height=175 src="http://www.vsdotnet.ch/content/binary/SolExp2.jpg" width=198 border=0&gt;
&lt;/p&gt;
&lt;p align=center&gt;
&lt;font color=#0000ff&gt;&amp;nbsp;Figure 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Figure
2&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=d29afa81-9be3-4d5f-836b-b1c619a09baa" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,d29afa81-9be3-4d5f-836b-b1c619a09baa.aspx</comments>
      <category>Tips</category>
      <category>VS2008</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=40ecc2b3-7e7f-46de-8982-ae0ef067dd69</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,40ecc2b3-7e7f-46de-8982-ae0ef067dd69.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,40ecc2b3-7e7f-46de-8982-ae0ef067dd69.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=40ecc2b3-7e7f-46de-8982-ae0ef067dd69</wfw:commentRss>
      <title>SQL-Server et changement du nom de machine</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,40ecc2b3-7e7f-46de-8982-ae0ef067dd69.aspx</guid>
      <link>http://www.vsdotnet.ch/2008/01/24/SQLServerEtChangementDuNomDeMachine.aspx</link>
      <pubDate>Thu, 24 Jan 2008 13:36:14 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Dans le cadre d’un POC (Proof Of
Concept), j’ai décidé de changer le nom du serveur de base de donnée afin que ce laboratoire
soit ‘auto-documenté’ (c’est plus claire quand les machines s’appellent ‘Directory
Services’, ‘Publisher’ au lien de ‘WIN-1234’ et ‘WIN-1235 …). Cette modification intervient
APRES l’installation de SQL-Server.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Le changement de nom s’effectue
très simplement depuis l’administration de l’ordinateur (Poste de travail/ Gérer).
Jusqu’ici, tout va bien.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Lors de la première connexion à
la base de donnée via SQL-Server Management Studio, la mire propose toujours l’ancien
nom de l’ordinateur. Pas de souci, il suffit de remplacer celui-ci par son nouveau
nom et la connexion s’effectue correctement.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Un problème survient lorsque l’on
désir gérer la réplication. En effet, pour une mystérieuse raison, la réplication
(Replication.Utilities) cherche toujours à accéder au serveur avec l’ancien nom …&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&lt;img style="WIDTH: 530px; HEIGHT: 156px" height=110 src="http://www.vsdotnet.ch/content/binary/Replication.jpg" width=508 border=0&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Un rapide coup d’œil sur les tables
système permet de trouver la source du souci&amp;nbsp;:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face=Arial color=#000000 size=3&gt;select * from sys.servers&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Retourne des informations
du serveur SGDB, et retourne surtout dans la colonne&amp;nbsp;‘NAME’ l’ancien nom de la
machine&amp;nbsp;&lt;/font&gt;&lt;span style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;L&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Le souci sera rapidement résolut
en supprimant le serveur et en le recréant à l’aide des procédures stockées suivantes&amp;nbsp;:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face=Arial color=#000000 size=3&gt;sp_dropserver ‘WIN-1235’&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face=Arial color=#000000 size=3&gt;sp_addserver @server=‘Publisher’, @local=’local’&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: FR; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: FR; mso-bidi-language: AR-SA"&gt;&lt;font color=#000000&gt;Et
tout rentre dans l’ordre.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=40ecc2b3-7e7f-46de-8982-ae0ef067dd69" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,40ecc2b3-7e7f-46de-8982-ae0ef067dd69.aspx</comments>
      <category>SQL-Server 2005</category>
      <category>Tips</category>
      <category>Merge Replication</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=d8101f02-d42f-4349-8ea6-a3a7971e93ae</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,d8101f02-d42f-4349-8ea6-a3a7971e93ae.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,d8101f02-d42f-4349-8ea6-a3a7971e93ae.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=d8101f02-d42f-4349-8ea6-a3a7971e93ae</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Voici une reflection dont il faut se souvenir lorsque l'on développe du software :
</p>
        <p>
          <strong>Solve Problems</strong> - Realize that to more than 99.9% of the worlds population,
code/technology are simply a means to an end. Software solves problems. <u>The world
really doesn't care how or why it works. </u></p>
        <p>
          <a href="http://simpable.com/software/7-hard-things/">7 of the Hardest Things I Learned
About Writing Software</a>
        </p>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=d8101f02-d42f-4349-8ea6-a3a7971e93ae" />
      </body>
      <title>Reflection</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,d8101f02-d42f-4349-8ea6-a3a7971e93ae.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/11/19/Reflection.aspx</link>
      <pubDate>Mon, 19 Nov 2007 08:21:28 GMT</pubDate>
      <description>&lt;p&gt;
Voici une reflection dont il faut se souvenir lorsque l'on développe du software :
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Solve Problems&lt;/strong&gt; - Realize that to more than 99.9% of the worlds population,
code/technology are simply a means to an end. Software solves problems. &lt;u&gt;The world
really doesn't care how or why it works. &lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://simpable.com/software/7-hard-things/"&gt;7 of the Hardest Things I Learned
About Writing Software&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=d8101f02-d42f-4349-8ea6-a3a7971e93ae" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,d8101f02-d42f-4349-8ea6-a3a7971e93ae.aspx</comments>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=d9fa6ce9-fb02-4bac-a9f4-9f41949068fb</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,d9fa6ce9-fb02-4bac-a9f4-9f41949068fb.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,d9fa6ce9-fb02-4bac-a9f4-9f41949068fb.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=d9fa6ce9-fb02-4bac-a9f4-9f41949068fb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Requêtes ayant été les plus exécutées
</p>
        <p>
Les DMV sys.dm_exec_query_stats, en association avec sys.dm_exec_sql_text, permet
de connaître les requêtes ayant été les plus exécutées.
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">TOP</span> 50    
        <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(T1.execution_count),
        T2.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">text</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> sys.dm_exec_query_stats
T1 <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CROSS</span> APPLY
sys.dm_exec_sql_text(T1.plan_handle) T2     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">GROUP</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>         T1.plan_handle,
        T2.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">text</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>     <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(T1.execution_count) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DESC</span></span>
        </pre>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=d9fa6ce9-fb02-4bac-a9f4-9f41949068fb" />
      </body>
      <title>SQL Tips #7</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,d9fa6ce9-fb02-4bac-a9f4-9f41949068fb.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/10/25/SQLTips7.aspx</link>
      <pubDate>Thu, 25 Oct 2007 09:50:55 GMT</pubDate>
      <description>&lt;p&gt;
Requêtes ayant été les plus exécutées
&lt;/p&gt;
&lt;p&gt;
Les DMV sys.dm_exec_query_stats, en association avec sys.dm_exec_sql_text, permet
de connaître les requêtes ayant été les plus exécutées.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;TOP&lt;/span&gt; 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SUM&lt;/span&gt;(T1.execution_count),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;text&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; sys.dm_exec_query_stats
T1 &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CROSS&lt;/span&gt; APPLY
sys.dm_exec_sql_text(T1.plan_handle) T2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;GROUP&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T1.plan_handle,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;text&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SUM&lt;/span&gt;(T1.execution_count) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DESC&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=d9fa6ce9-fb02-4bac-a9f4-9f41949068fb" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,d9fa6ce9-fb02-4bac-a9f4-9f41949068fb.aspx</comments>
      <category>SQL-Server 2005</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=3097bdc6-8469-4a21-a247-679460498a25</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,3097bdc6-8469-4a21-a247-679460498a25.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,3097bdc6-8469-4a21-a247-679460498a25.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=3097bdc6-8469-4a21-a247-679460498a25</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Requêtes ayant consommées le plus de cycle I/O
</p>
        <p>
Les DMV sys.dm_exec_query_stats, en association avec sys.dm_exec_sql_text, permet
de connaître les requêtes ayant consommées le plus de cycle I/O.
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">TOP</span> 50    
        <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(T1.total_physical_reads
+ T1.total_logical_reads + T1.total_logical_writes),         T2.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">text</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> sys.dm_exec_query_stats
T1 <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CROSS</span> APPLY
sys.dm_exec_sql_text(T1.plan_handle) T2     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">GROUP</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>         T1.plan_handle,
        T2.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">text</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>     <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(T1.total_physical_reads
+ T1.total_logical_reads + T1.total_logical_writes ) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DESC</span></span>
        </pre>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=3097bdc6-8469-4a21-a247-679460498a25" />
      </body>
      <title>SQL Tips #6</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,3097bdc6-8469-4a21-a247-679460498a25.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/10/25/SQLTips6.aspx</link>
      <pubDate>Thu, 25 Oct 2007 09:49:40 GMT</pubDate>
      <description>&lt;p&gt;
Requêtes ayant consommées le plus de cycle I/O
&lt;/p&gt;
&lt;p&gt;
Les DMV sys.dm_exec_query_stats, en association avec sys.dm_exec_sql_text, permet
de connaître les requêtes ayant consommées le plus de cycle I/O.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;TOP&lt;/span&gt; 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SUM&lt;/span&gt;(T1.total_physical_reads
+ T1.total_logical_reads + T1.total_logical_writes), &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;text&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; sys.dm_exec_query_stats
T1 &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CROSS&lt;/span&gt; APPLY
sys.dm_exec_sql_text(T1.plan_handle) T2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;GROUP&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T1.plan_handle,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;text&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SUM&lt;/span&gt;(T1.total_physical_reads
+ T1.total_logical_reads + T1.total_logical_writes ) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DESC&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=3097bdc6-8469-4a21-a247-679460498a25" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,3097bdc6-8469-4a21-a247-679460498a25.aspx</comments>
      <category>SQL-Server 2005</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=5c61d405-bd2b-4fe9-957e-13aee8a76ce0</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,5c61d405-bd2b-4fe9-957e-13aee8a76ce0.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,5c61d405-bd2b-4fe9-957e-13aee8a76ce0.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=5c61d405-bd2b-4fe9-957e-13aee8a76ce0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Requêtes ayant consommées le plus de cycle CPU
</p>
        <p>
Les DMV sys.dm_exec_query_stats, en association avec sys.dm_exec_sql_text, permet
de connaître les requêtes ayant consommées le plus de cycle CPU.
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">TOP</span> 50
    <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(T1.total_worker_time),
    T2.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">text</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> sys.dm_exec_query_stats
T1 <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CROSS</span> APPLY
sys.dm_exec_sql_text(T1.plan_handle) T2     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">GROUP</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>         T1.plan_handle,
        T2.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">text</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>         <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(T1.total_worker_time) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DESC</span></span>
        </pre>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=5c61d405-bd2b-4fe9-957e-13aee8a76ce0" />
      </body>
      <title>SQL Tips #5</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,5c61d405-bd2b-4fe9-957e-13aee8a76ce0.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/10/25/SQLTips5.aspx</link>
      <pubDate>Thu, 25 Oct 2007 09:48:47 GMT</pubDate>
      <description>&lt;p&gt;
Requêtes ayant consommées le plus de cycle CPU
&lt;/p&gt;
&lt;p&gt;
Les DMV sys.dm_exec_query_stats, en association avec sys.dm_exec_sql_text, permet
de connaître les requêtes ayant consommées le plus de cycle CPU.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;TOP&lt;/span&gt; 50
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SUM&lt;/span&gt;(T1.total_worker_time),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;text&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; sys.dm_exec_query_stats
T1 &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CROSS&lt;/span&gt; APPLY
sys.dm_exec_sql_text(T1.plan_handle) T2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;GROUP&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T1.plan_handle,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;text&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SUM&lt;/span&gt;(T1.total_worker_time) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DESC&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=5c61d405-bd2b-4fe9-957e-13aee8a76ce0" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,5c61d405-bd2b-4fe9-957e-13aee8a76ce0.aspx</comments>
      <category>SQL-Server 2005</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=e46ab4e5-c23e-409c-8796-fb58b7b6d15b</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,e46ab4e5-c23e-409c-8796-fb58b7b6d15b.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,e46ab4e5-c23e-409c-8796-fb58b7b6d15b.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=e46ab4e5-c23e-409c-8796-fb58b7b6d15b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Requêtes ayant souffert de blocages
</p>
        <p>
Les DMV <font color="#008000">sys.dm_exec_query_stats</font>, en association avec <font color="#008000">sys.dm_exec_sql_text</font>,
permet de connaître les requêtes ayant le plus souffert de blocages (le temps d’exécution
est supérieur au temps ‘travaillé’, signifiant que la requête à été victime temporairement
d’un blocage).
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">TOP</span> 50    
        <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(T1.total_elapsed_time
- T1.total_worker_time),     T2.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">text</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> sys.dm_exec_query_stats
T1 <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CROSS</span> APPLY
sys.dm_exec_sql_text(T1.plan_handle) T2     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">GROUP</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>         T1.plan_handle,
        T2.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">text</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>         <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(T1.total_elapsed_time
- T1.total_worker_time ) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DESC</span></span>
        </pre>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=e46ab4e5-c23e-409c-8796-fb58b7b6d15b" />
      </body>
      <title>SQL Tips #4</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,e46ab4e5-c23e-409c-8796-fb58b7b6d15b.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/10/25/SQLTips4.aspx</link>
      <pubDate>Thu, 25 Oct 2007 09:47:21 GMT</pubDate>
      <description>&lt;p&gt;
Requêtes ayant souffert de blocages
&lt;/p&gt;
&lt;p&gt;
Les DMV &lt;font color=#008000&gt;sys.dm_exec_query_stats&lt;/font&gt;, en association avec &lt;font color=#008000&gt;sys.dm_exec_sql_text&lt;/font&gt;,
permet de connaître les requêtes ayant le plus souffert de blocages (le temps d’exécution
est supérieur au temps ‘travaillé’, signifiant que la requête à été victime temporairement
d’un blocage).
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;TOP&lt;/span&gt; 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SUM&lt;/span&gt;(T1.total_elapsed_time
- T1.total_worker_time), &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;text&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; sys.dm_exec_query_stats
T1 &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CROSS&lt;/span&gt; APPLY
sys.dm_exec_sql_text(T1.plan_handle) T2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;GROUP&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T1.plan_handle,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;text&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SUM&lt;/span&gt;(T1.total_elapsed_time
- T1.total_worker_time ) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DESC&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=e46ab4e5-c23e-409c-8796-fb58b7b6d15b" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,e46ab4e5-c23e-409c-8796-fb58b7b6d15b.aspx</comments>
      <category>SQL-Server 2005</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=d5ef58fe-e0c9-4f12-9368-b8b7f04273ce</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,d5ef58fe-e0c9-4f12-9368-b8b7f04273ce.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,d5ef58fe-e0c9-4f12-9368-b8b7f04273ce.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=d5ef58fe-e0c9-4f12-9368-b8b7f04273ce</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Les DMV dm_db_missing_index_* permettent de déterminer les indexes manquants. Ces
informations sont basées sur l’analyse de l’exécution des requêtes depuis le démarrage
de SQL-Server 2005.
</p>
        <p>
Quatre DMV permettent d’obtenir des informations, d’un point de vue générale 
jusqu’au détail (détail de colonnes à indexer).
</p>
        <p>
La hiérarchie est la suivante :<br /><font color="#008000">dm_db_missing_index_group_stats</font>          Information
générale<br />
-&gt; <font color="#008000">dm_db_missing_index_groups</font>             Information
sur un groupe d’indexes<br />
     -&gt; <font color="#008000">dm_db_missing_index_details</font>        Information
sur un index<br />
          -&gt; <font color="#008000">dm_db_missing_index_columns</font> Information
des colonnes d’un index
</p>
        <p>
Le calcul de la priorité (l’importance) de création d’un index est basé sur trois
paramètres :<br />
1. Le coût<br />
2. l’impacte<br />
3. le nombre de lecture
</p>
        <p>
En effet, créer un index sur une table n’ayant qu’un index primaire aura un grand
impact sur la performance. Par contre, si cette table n’est accédée qu’un fois pas
année, la création de cet index ne devrait pas être un priorité. Mieux vaut alors
insérer un index sur une table accédée de miliers de fois par minutes, même si l’impacte
par requête est faible. 
</p>
        <p>
La requête suivante indique les indexes manquant a créer, par ordre de priorité (selon
le calcule ci-dessus) :
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>     T1.avg_total_user_cost
* T1.avg_user_impact * (T1.user_seeks + T1.user_scans) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'Priorite'</span>,
        T3.* <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span>     sys.dm_db_missing_index_group_stats
T1 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">INNER</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">JOIN</span> sys.dm_db_missing_index_groups
T2     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ON</span> T2.index_group_handle
= T1.group_handle <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">INNER</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">JOIN</span> sys.dm_db_missing_index_details
T3         <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ON</span> T3.index_handle
= T2.index_handle <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span>         T3.database_id
= 8 – A remplacer par l’ID de la base désirée <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>     avg_total_user_cost
* avg_user_impact * (user_seeks + user_scans) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DESC</span>; </span>
        </pre>
        <p>
Note : 
<br />
Le résultat des DMV est le reflet de la base lors de l’execution des DMV. Lors de
la création d’indexes basé sur ces vues, prendre soins de sauvegarder les informations.
En effet, suite à la création d’un index, les DMV vont réévaluer les informations.
</p>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=d5ef58fe-e0c9-4f12-9368-b8b7f04273ce" />
      </body>
      <title>SQL Tips #3</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,d5ef58fe-e0c9-4f12-9368-b8b7f04273ce.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/10/24/SQLTips3.aspx</link>
      <pubDate>Wed, 24 Oct 2007 13:36:44 GMT</pubDate>
      <description>&lt;p&gt;
Les DMV dm_db_missing_index_* permettent de déterminer les indexes manquants. Ces
informations sont basées sur l’analyse de l’exécution des requêtes depuis le démarrage
de SQL-Server 2005.
&lt;/p&gt;
&lt;p&gt;
Quatre DMV permettent d’obtenir des informations, d’un point de vue générale&amp;nbsp;
jusqu’au détail (détail de colonnes à indexer).
&lt;/p&gt;
&lt;p&gt;
La hiérarchie est la suivante :&lt;br&gt;
&lt;font color=#008000&gt;dm_db_missing_index_group_stats&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Information
générale&lt;br&gt;
-&amp;gt; &lt;font color=#008000&gt;dm_db_missing_index_groups&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Information
sur un groupe d’indexes&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; &lt;font color=#008000&gt;dm_db_missing_index_details&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Information
sur un index&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; &lt;font color=#008000&gt;dm_db_missing_index_columns&lt;/font&gt;&amp;nbsp;Information
des colonnes d’un index
&lt;/p&gt;
&lt;p&gt;
Le calcul de la priorité (l’importance) de création d’un index est basé sur trois
paramètres :&lt;br&gt;
1.&amp;nbsp;Le coût&lt;br&gt;
2.&amp;nbsp;l’impacte&lt;br&gt;
3.&amp;nbsp;le nombre de lecture
&lt;/p&gt;
&lt;p&gt;
En effet, créer un index sur une table n’ayant qu’un index primaire aura un grand
impact sur la performance. Par contre, si cette table n’est accédée qu’un fois pas
année, la création de cet index ne devrait pas être un priorité. Mieux vaut alors
insérer un index sur une table accédée de miliers de fois par minutes, même si l’impacte
par requête est faible. 
&lt;/p&gt;
&lt;p&gt;
La requête suivante indique les indexes manquant a créer, par ordre de priorité (selon
le calcule ci-dessus) :
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T1.avg_total_user_cost
* T1.avg_user_impact * (T1.user_seeks + T1.user_scans) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'Priorite'&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T3.* &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys.dm_db_missing_index_group_stats
T1 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; sys.dm_db_missing_index_groups
T2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; T2.index_group_handle
= T1.group_handle &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; sys.dm_db_missing_index_details
T3 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; T3.index_handle
= T2.index_handle &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T3.database_id
= 8 – A remplacer par l’ID de la base désirée &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;avg_total_user_cost
* avg_user_impact * (user_seeks + user_scans) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DESC&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Note : 
&lt;br&gt;
Le résultat des DMV est le reflet de la base lors de l’execution des DMV. Lors de
la création d’indexes basé sur ces vues, prendre soins de sauvegarder les informations.
En effet, suite à la création d’un index, les DMV vont réévaluer les informations.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=d5ef58fe-e0c9-4f12-9368-b8b7f04273ce" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,d5ef58fe-e0c9-4f12-9368-b8b7f04273ce.aspx</comments>
      <category>SQL-Server 2005</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=af7bd533-aa52-45a6-8cf1-3b0af6033199</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,af7bd533-aa52-45a6-8cf1-3b0af6033199.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,af7bd533-aa52-45a6-8cf1-3b0af6033199.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=af7bd533-aa52-45a6-8cf1-3b0af6033199</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Un index est fragmenté lorsque l’ordre logique des informations stockées dans les
pages (basée sur les clés de l’index) ne correspondent plus à l’ordre physique des
informations stockées dans les fichiers de données.<br /><br />
SQL-Server 2005 offre deux possibilités :<br />
- La réorganisation de l’index<br />
   S’applique lorsque le taux de fragmentation de l’index se situe entre
5% et 30%.<br />
- La reconstruction de l’index<br />
   S’applique lorsque le taux de fragmentation de l’index est supérieur
à  30%.<br /><br />
La DMV sys.dm_db_index_physical_stats nous renseigne sur le taux de fragmentation.
La requête suivante liste tous les indexes d’un serveur (pour lister uniquement une
base, changer le premier paramètre de la DMV), dont le taux de fragmentation est supérieur
à 5%.
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>     T3.Name <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> Table_Name,
    T2.Name <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> Index_Name,
    T1.avg_fragmentation_in_percent <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span>     sys.dm_db_index_physical_stats(<span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>,<span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>,<span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>,<span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>,<span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> T1 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">INNER</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">JOIN</span> sys.indexes
T2     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ON</span> T1.<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">OBJECT_ID</span> =
T2.<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">OBJECT_ID</span>     <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span> T1.INDEX_ID
= T2.INDEX_ID <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">INNER</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">JOIN</span> sys.tables
T3     <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ON</span> T3.<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">OBJECT_ID</span> =
T2.<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">OBJECT_ID</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span>     T1.avg_fragmentation_in_percent
&gt; 5     <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span> T2.Name <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">IS</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">NOT</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">NULL</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>     T1.avg_fragmentation_in_percent <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DESC</span></span>
        </pre>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=af7bd533-aa52-45a6-8cf1-3b0af6033199" />
      </body>
      <title>SQL Tips #2</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,af7bd533-aa52-45a6-8cf1-3b0af6033199.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/10/24/SQLTips2.aspx</link>
      <pubDate>Wed, 24 Oct 2007 12:22:08 GMT</pubDate>
      <description>&lt;p&gt;
Un index est fragmenté lorsque l’ordre logique des informations stockées dans les
pages (basée sur les clés de l’index) ne correspondent plus à l’ordre physique des
informations stockées dans les fichiers de données.&lt;br&gt;
&lt;br&gt;
SQL-Server 2005 offre deux possibilités :&lt;br&gt;
- La réorganisation de l’index&lt;br&gt;
&amp;nbsp;&amp;nbsp; S’applique lorsque le taux de fragmentation de l’index se situe entre
5% et 30%.&lt;br&gt;
- La reconstruction de l’index&lt;br&gt;
&amp;nbsp;&amp;nbsp; S’applique lorsque le taux de fragmentation de l’index est supérieur
à&amp;nbsp; 30%.&lt;br&gt;
&lt;br&gt;
La DMV sys.dm_db_index_physical_stats nous renseigne sur le taux de fragmentation.
La requête suivante liste tous les indexes d’un serveur (pour lister uniquement une
base, changer le premier paramètre de la DMV), dont le taux de fragmentation est supérieur
à 5%.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T3.Name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; Table_Name,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T2.Name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; Index_Name,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T1.avg_fragmentation_in_percent &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys.dm_db_index_physical_stats(&lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;,&lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;,&lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;,&lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;,&lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; T1 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; sys.indexes
T2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; T1.&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;OBJECT_ID&lt;/span&gt; =
T2.&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;OBJECT_ID&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; T1.INDEX_ID
= T2.INDEX_ID &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; sys.tables
T3 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; T3.&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;OBJECT_ID&lt;/span&gt; =
T2.&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;OBJECT_ID&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T1.avg_fragmentation_in_percent
&amp;gt; 5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; T2.Name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;IS&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;NOT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;NULL&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T1.avg_fragmentation_in_percent &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DESC&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=af7bd533-aa52-45a6-8cf1-3b0af6033199" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,af7bd533-aa52-45a6-8cf1-3b0af6033199.aspx</comments>
      <category>SQL-Server 2005</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=342abc0f-3b82-4bad-b9e0-0acf29eb3dc4</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,342abc0f-3b82-4bad-b9e0-0acf29eb3dc4.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,342abc0f-3b82-4bad-b9e0-0acf29eb3dc4.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=342abc0f-3b82-4bad-b9e0-0acf29eb3dc4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Un index devient inutiles lorsque le nombre de mise à jour de l’index (update) est
supérieur au nombre fois que cet index est utilisé pour une lecture (seeks, scans
&amp; lookup). Le moteur passe donc plus de temps à le maintenir à jour qu’il n’est
réellement utilisé … C’est comme maintenir un annuaire téléphonique à jour alors que
les abonnées utilisent d’autre moyen (carnet d’adresse local, …) pour se contacter.
</p>
        <p>
La DMV sys.dm_db_index_usage_stats nous donne ces informations :
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>     user_updates <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'#ECRITURE'</span>,
    user_seeks + user_scans + user_lookups <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'#LECTURE'</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span>         sys.dm_db_index_usage_stats <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span>         user_updates
&gt; (user_seeks + user_scans + user_lookups) </span>
        </pre>
        <img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=342abc0f-3b82-4bad-b9e0-0acf29eb3dc4" />
      </body>
      <title>SQL Tips #1</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,342abc0f-3b82-4bad-b9e0-0acf29eb3dc4.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/10/24/SQLTips1.aspx</link>
      <pubDate>Wed, 24 Oct 2007 12:05:25 GMT</pubDate>
      <description>&lt;p&gt;
Un index devient inutiles lorsque le nombre de mise à jour de l’index (update) est
supérieur au nombre fois que cet index est utilisé pour une lecture (seeks, scans
&amp;amp; lookup). Le moteur passe donc plus de temps à le maintenir à jour qu’il n’est
réellement utilisé … C’est comme maintenir un annuaire téléphonique à jour alors que
les abonnées utilisent d’autre moyen (carnet d’adresse local, …) pour se contacter.
&lt;/p&gt;
&lt;p&gt;
La DMV sys.dm_db_index_usage_stats nous donne ces informations :
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user_updates &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'#ECRITURE'&lt;/span&gt;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user_seeks + user_scans + user_lookups &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'#LECTURE'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys.dm_db_index_usage_stats &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user_updates
&amp;gt; (user_seeks + user_scans + user_lookups) &lt;/span&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=342abc0f-3b82-4bad-b9e0-0acf29eb3dc4" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,342abc0f-3b82-4bad-b9e0-0acf29eb3dc4.aspx</comments>
      <category>Tips</category>
      <category>SQL-Server 2005</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=c4489d22-fc1a-4d5e-95c4-18639ee77711</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,c4489d22-fc1a-4d5e-95c4-18639ee77711.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,c4489d22-fc1a-4d5e-95c4-18639ee77711.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=c4489d22-fc1a-4d5e-95c4-18639ee77711</wfw:commentRss>
      <title>Rendre une méthode obsolète …</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,c4489d22-fc1a-4d5e-95c4-18639ee77711.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/10/16/RendreUneM%c3%a9thodeObsol%c3%a8te.aspx</link>
      <pubDate>Tue, 16 Oct 2007 11:14:50 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;J’ai cherché comment rendre une
méthode obsolète en .NET. En effet, j’ai crée une nouvelle méthode lors de l’évolution
d’un projet, mais ne pouvais pas supprimer (ou remplacer) l’ancienne méthode.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;La solution est simple&amp;nbsp;: il
suffit d’ajouter l’attribut [Obsolete]&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Trois signature s’offrent à nous&amp;nbsp;:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;[Obsolete]&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;font color=#000080&gt;void&lt;/font&gt; &lt;em&gt;Methode&lt;/em&gt;()
{}&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Qui indiquera simplement, via intellisense,
que la méthode est obsolète&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;[Obsolete(«&amp;nbsp;&lt;font color=#0000ff&gt;Cette
méthode à été remplacée par XXX&lt;/font&gt;&amp;nbsp;»&amp;nbsp;)]&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;font color=#000080&gt;void&lt;/font&gt; &lt;em&gt;Methode&lt;/em&gt;()
{}&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Qui indiquera simplement, via intellisense,
que la méthode est obsolète en indiquant la raison.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;[Obsolete(«&amp;nbsp;&lt;font color=#0000ff&gt;Cette
méthode à été remplacée par XXX&lt;/font&gt;&amp;nbsp;», &lt;font color=#000080&gt;true&lt;/font&gt;&amp;nbsp;)]&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;font color=#000080&gt;void&lt;/font&gt; &lt;em&gt;Methode&lt;/em&gt;()
{}&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Générera en plus une erreur lors
de la compilation.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=c4489d22-fc1a-4d5e-95c4-18639ee77711" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,c4489d22-fc1a-4d5e-95c4-18639ee77711.aspx</comments>
      <category>C#</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://www.vsdotnet.ch/Trackback.aspx?guid=47f99d27-3d97-4c41-8d8e-1b7a8cf87743</trackback:ping>
      <pingback:server>http://www.vsdotnet.ch/pingback.aspx</pingback:server>
      <pingback:target>http://www.vsdotnet.ch/PermaLink,guid,47f99d27-3d97-4c41-8d8e-1b7a8cf87743.aspx</pingback:target>
      <dc:creator>Stéphane Schwartz</dc:creator>
      <wfw:comment>http://www.vsdotnet.ch/CommentView,guid,47f99d27-3d97-4c41-8d8e-1b7a8cf87743.aspx</wfw:comment>
      <wfw:commentRss>http://www.vsdotnet.ch/SyndicationService.asmx/GetEntryCommentsRss?guid=47f99d27-3d97-4c41-8d8e-1b7a8cf87743</wfw:commentRss>
      <title>Vaut son pesant de cacahouètes …</title>
      <guid isPermaLink="false">http://www.vsdotnet.ch/PermaLink,guid,47f99d27-3d97-4c41-8d8e-1b7a8cf87743.aspx</guid>
      <link>http://www.vsdotnet.ch/2007/08/31/VautSonPesantDeCacahou%c3%a8tes.aspx</link>
      <pubDate>Fri, 31 Aug 2007 07:10:46 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"&gt;&lt;font color=#000000&gt;&lt;a href="http://images.google.ch/imgres?imgurl=http://www.positron-libre.com/cours/codage/images/tips.gif&amp;amp;imgrefurl=http://www.positron-libre.com/cours/codage/code-decimal-bcd.htm&amp;amp;h=36&amp;amp;w=27&amp;amp;sz=2&amp;amp;hl=fr&amp;amp;start=72&amp;amp;sig2=qmGsIC_ulTDgmoNufbOrNQ&amp;amp;tbnid=Za5yV_q6lJl62M:&amp;amp;tbnh=36&amp;amp;tbnw=27&amp;amp;ei=0b7XRqqDFJLK0QSY35jzCA&amp;amp;prev=/images%3Fq%3Dtips%26start%3D63%26imgsz%3Dicon%26gbv%3D2%26ndsp%3D21%26svnum%3D10%26hl%3Dfr%26sa%3DN"&gt;&lt;img style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid" height=36 src="http://tbn0.google.com/images?q=tbn:Za5yV_q6lJl62M:http://www.positron-libre.com/cours/codage/images/tips.gif" width=27&gt;&lt;/a&gt;&amp;nbsp;Dans
une ListView, on ajoute les colonnes en ajoutant des &lt;/font&gt;&lt;/span&gt;&lt;span lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 8.5pt; mso-ansi-language: EN-US"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.columnheader(VS.71).aspx"&gt;ColumnHeader&lt;/a&gt;&lt;font color=#000000&gt;. &lt;/font&gt;&lt;/span&gt;&lt;span lang=FR-CH style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 8.5pt; mso-ansi-language: FR-CH"&gt;&lt;font color=#000000&gt;Cette
objet à une propriété &lt;/font&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.columnheader.width(VS.71).aspx"&gt;Width&lt;/a&gt;&lt;font color=#000000&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;,
qui permet de définir la largeur de la colonne en pixels.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=FR-CH style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 8.5pt; mso-ansi-language: FR-CH"&gt;&lt;font color=#000000&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=FR-CH style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 8.5pt; mso-ansi-language: FR-CH"&gt;&lt;font color=#000000&gt;C’est
maintenant que cela devient rigolo&amp;nbsp;! Il est possible (et c’est même &lt;/font&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.columnheader.width(VS.71).aspxhttp://msdn2.microsoft.com/en-us/library/system.windows.forms.columnheader.width(VS.71).aspx"&gt;documenté
ici&lt;/a&gt;&lt;font color=#000000&gt;) d’assigner une valeur négative (-1 ou –2) … -1 ajustera
la largeur de la colonne à la largeur maximum des éléments affichés dans celle-ci.
–2 ajustera la largeur de la colonne à la largeur du texte du header …&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=FR-CH style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 8.5pt; mso-ansi-language: FR-CH"&gt;&lt;font color=#000000&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=FR-CH style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: FR-CH; mso-fareast-language: FR; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;font color=#000000&gt;Il
aura fallu combien d’ingénieurs pour arriver à cette solution&amp;nbsp;?&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.vsdotnet.ch/aggbug.ashx?id=47f99d27-3d97-4c41-8d8e-1b7a8cf87743" /&gt;</description>
      <comments>http://www.vsdotnet.ch/CommentView,guid,47f99d27-3d97-4c41-8d8e-1b7a8cf87743.aspx</comments>
      <category>Tips</category>
      <category>WinForms</category>
    </item>
  </channel>
</rss>