tag:blogger.com,1999:blog-50835981871479274492024-02-19T22:22:26.327-08:00SQL Server Trucs & AstucesTechniques & Solutions pour les utilisateurs d'SQL Serveurb.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-5083598187147927449.post-48843896830000555742023-03-07T03:25:00.005-08:002023-03-07T03:25:39.180-08:00Où en est Microsoft Reporting Services (SSRS) aujourd'hui ?<p>Vous rappelez-vous de Cristal Report ? Oui, c'est devenu Reporting Services mais avouez ce n'est pas d'un maniement intuitif. Alors aujourd'hui où on en est de MS Reporting Services.</p><p>Il existe la version 2022 de MS SQL Server Reporting Services, seulement in faut installer d'abord SQL Server, c'est une installation lourde.</p><p><a href="https://sql-server-astuces.sodevlog.com/2016/08/microsoft-business-intelligence-bi-data_23.html" target="_blank">SQL Server Trucs & Astuces: Microsoft Business Intelligence (BI) Data Tools SQL Server</a></p><p>C'est le moyen de découvrir ou redécouvrir rapidement ce que fait SQL Server Reporting Services (SSRS).</p><p><a href="https://learn.microsoft.com/en-us/sql/reporting-services/create-deploy-and-manage-mobile-and-paginated-reports" target="_blank">Learn Microsoft - What is SQL Server Reporting Services (SSRS)?</a></p><p>Donc à priori en 2023, on peut encore faire du MS Reporting Services avec SQL Server 2022.</p>b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-17453249789464367532022-05-06T02:11:00.009-07:002022-05-06T03:00:30.267-07:00SQL Server - Technical Points Fundamentals - Intreview Questions<p>Voici les questions et les réponses fondamentales pour la maîtrise totale des Bases de Données SQL Server. Vous souhaitez parfaire vos connaissances d'SQL Server et de la conception des bases de données. C'est ici qu'il faut commencer à lire attentivement.</p><p>Je regarde toujours les articles sur la Microsoft Technologie et là je trouve ce site est la réponse aux questions que l'on se pose toujours.</p><p>Voici les questions en français :</p><p>Q01. Quelle est la différence entre INDEX et KEY ?<br />Q02. Quelle est la différence entre la CLÉ PRIMAIRE et la CLÉ UNIQUE ?<br />Q03. Quelle est la différence entre UNIQUE KEY et UNIQUE KEY Non-Nullable?<br />Q04. Quelle est la différence entre UNIQUE KEY et UNIQUE Index ?<br />Q05. Les valeurs NULL sont-elles autorisées dans une colonne UNIQUE KEY ?<br />Q06. Une CLÉ UNIQUE peut-elle contenir une valeur vide (vide) ou un espace ?<br />Q07. Une colonne UNIQUE KEY peut-elle contenir des valeurs en double ?<br />Q08. Pouvez-vous ajouter un index non clusterisé explicitement sur n'importe quelle colonne dans SQL ?<br />Q09. La CLÉ UNIQUE doit-elle obligatoirement être un index non clusterisé ? Une CLÉ UNIQUE peut-elle avoir un index cluster ?<br />Q10. Pouvez-vous créer une CLÉ UNIQUE sur une table qui a déjà un index cluster ?<br />Q11. Pouvez-vous ajouter des index clusterisés et non clusterisés sur une colonne ?<br />Q12. Si une colonne contient un index non clusterisé, est-il obligatoire que la colonne soit également UNIQUE KEY ?<br />Q13. Pouvez-vous ajouter plusieurs index UNIQUE KEY ou non clusterisés sur n'importe quelle table ?<br />Q14. Pouvez-vous créer une CLÉ UNIQUE sur la table temporaire ?<br />Q15. Pouvez-vous ajouter une CLÉ UNIQUE à la vue ?<br />Q16. Quelle est la différence entre la contrainte UNIQUE KEY au niveau de la table et au niveau de la colonne ?<br />Q17. Lorsque la table de la base de données est en première forme normale (1NF) ?<br />Q18. Pouvez-vous mettre à jour ou supprimer la valeur UNIQUE KEY d'une table ?<br />Q19. Pouvez-vous ajouter la contrainte UNIQUE KEY sur une colonne qui contient déjà des données ?<br />Q20. Qu'est-ce que la page IAM (Index Allocation Map) dans SQL ?<br />Q21. Qu'est-ce qu'une clé composée ?<br />Q22. Qu'est-ce qu'une clé de candidat ?<br />Q23. Qu'est-ce qu'une clé alternative ?<br />Q24. Pouvez-vous ajouter une contrainte de clé UNIQUE sur une colonne nullable ?<br />Q25. Combien de clés UNIQUE sont autorisées dans une table ?<br />Q26. Combien d'index non clusterisés sont autorisés dans une table ?<br />Q27. Pouvez-vous supprimer l'index créé par la clé unique ?<br />Q28. Comment supprimer la contrainte de clé unique ?<br />Q29. Pouvez-vous ajouter UNIQUE KEY sur une colonne VARCHAR(MAX), pourquoi ?<br />Q30. Pouvez-vous faire de la colonne UNIQUE KEY une colonne d'identité ?<br />Q31. Pouvez-vous utiliser UNIQUE KEY en remplacement de la clé primaire ? Si la clé primaire peut identifier de manière unique chaque ligne, alors pourquoi se soucier de la clé UNIQUE ?<br />Q32. Pouvez-vous ajouter UNIQUE KEY à la colonne Primary Key ?<br />Q33. Si une valeur NULL n'est jamais égale à d'autres valeurs NULL, cela signifie qu'elles sont uniques. Alors pourquoi une seule valeur NULL est autorisée dans la colonne UNIQUE Key ?<br />Q34. Qu'est-ce qu'un tas en SQL ?<br />Q35. Pouvez-vous créer une CLÉ UNIQUE sur la variable de table ?<br />Q36. Pouvez-vous créer une CLÉ UNIQUE sur le type de valeur de table (TVP) ?</p><p>Et voici les réponses et les questions en anglais sur le Site Tech Point Fundamental :</p><p></p>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><a href="https://www.techpointfunda.com/2022/05/sql-interview-unique-key.html" target="_blank"><img alt="SQL UNIQUE KEY - Tech Point Fundamentals" data-original-height="519" data-original-width="650" height="510" src="https://blogger.googleusercontent.com/img/a/AVvXsEhysjyrTv2QrgRP_bi6R0LOAcWybR1RBoZqYKYljBOr5Vljf6RpbZRBMyDsw8KMcF3gUG2D3hdQy-fBO1PDiVhgoEc4FiCTR7-YWMvJaPNLqqevDobo01Ad5U0YYBjLB5bsow_hgFK9vcWoa9UYeubd4uyWGvHJwlfOKqqq07pmReRAvexsTh9e4qmQXA=w640-h510" title="SQL UNIQUE KEY - Tech Point Fundamentals" width="640" /></a></span></td></tr><tr><td class="tr-caption" style="text-align: center;"><a href="https://www.techpointfunda.com/2022/05/sql-interview-unique-key.html" target="_blank">SQL UNIQUE KEY - Tech Point Fundamentals</a></td></tr></tbody></table>
<p>C'est une mine d'informations techniques sur SQL, il est clair que si vous maîtrisez l'ensemble de ces questions vous allez devenir un véritable concepteur de Base de Données SQL.</p><p>Connaitre la réponse à ces questions fera de vous un réel spécialiste SQL, Concepteur de Bases de Données.</p><p>Par la suite sur ce site vous trouverez tout un tas de questionnaires à connaitre pour mieux réussir vos entretiens sur les technologies C#.NET.</p><p>Avec par exemple un interview sur les questions du langage C# :</p><p><a href="https://www.techpointfunda.com/2021/07/csharp-interview-questions.html" target="_blank">Tech Point Fundamentals - Most Frequently Asked C# Interview Questions</a></p><p>Cette fois, il n'y a pas toutes les réponses que des bribes mais rien ne vous empêche de chercher les réponses vous même c'est un très bon exercice.</p><p>Vous reconnaîtrez dans les vidéos ce formidable accent Indien qui rend les choses difficilement compréhensibles. Il donc important d'écrire et de ne pas faire des vidéo pour tout </p>
<p></p>b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-44494191117261497522020-09-16T09:21:00.003-07:002022-05-06T01:47:41.036-07:00SQL Server comment faire pour gérer les Backup Correctement<p>C'est vraiment épineux comme je l'ai montré dans le <a href="https://sql-server-astuces.sodevlog.com/2020/07/sql-server-gestion-des-backup.html" target="_blank">post précédent</a> si vous cliquez bille en tête sur les options proposées de base, c'est la catastrophe et Restore Database Failed ! Et pourtant ce n'est pas ce que vous souhaitez car lorsque l'on restaure une base de donnée à une version précédente et bien c'est déjà que l'on a un gros problème et le stress monte ce n'est pas la peine d'en rajouter.</p>
<h2>SQL Server Backup Database</h2>
<p>Donc, il faut donner le nom que vous souhaitez et pas vous laisser conduire par MSSMS avec ses options par défaut qui vous mène vers le Restore Failed !</p>
<p>Donc vous cliquez sur Add, puis Destination on disk -> File name :</p>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6VM7b44qpW1Y3VE39wl5oMkVphHLrCylTehPy700OiLUmXNViLadEBp5oCiHhOOBdXer44PP5-jojOkpnh7mffuXSDex86vBNAnBRKILWwZ2DG9MQ0MEcLvJUjrxyogQMpxRIg74RH6M0/s1600/2020-07-28_17h02_20.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6VM7b44qpW1Y3VE39wl5oMkVphHLrCylTehPy700OiLUmXNViLadEBp5oCiHhOOBdXer44PP5-jojOkpnh7mffuXSDex86vBNAnBRKILWwZ2DG9MQ0MEcLvJUjrxyogQMpxRIg74RH6M0/s640/2020-07-28_17h02_20.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Backup Database où je veux</td></tr>
</tbody></table>
<p>Ainsi une troisième boite de dialogue s'ouvre et vous pouvez donner le nom que vous souhaitez au backup ...</p>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyvqxzF6FBIXGWqHTR2yFzFp9qVZJ-WoRL7fObKO_jbKcXG3RB68opHMZuNZZCvPJ2_p-jY7uQvaayo5ltKLuNQuzUcm2ldDF7L03yyLkPD60YTcNReynm4oVJ5M8fdPgtDWH7d4ye6oqi/s1600/2020-07-28_17h08_05.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyvqxzF6FBIXGWqHTR2yFzFp9qVZJ-WoRL7fObKO_jbKcXG3RB68opHMZuNZZCvPJ2_p-jY7uQvaayo5ltKLuNQuzUcm2ldDF7L03yyLkPD60YTcNReynm4oVJ5M8fdPgtDWH7d4ye6oqi/s640/2020-07-28_17h08_05.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: 12.8px;">SQL Server Backup Database avec le nom que je veux</span></td></tr>
</tbody></table>
<p>Attention de préciser l'extension du fichier .bak sinon SQL Server ne vous le proposera pas lors de la restauration de la base de données. Et oui SQL Server est idiot mais ça on le savait déjà.</p>
<h2>SQL Server Database Restore</h2>
<p>
Pour le processus de restauration, idem, on ne se laisse pas guider par SQL Server et ses options stupides qui vous mènent vers l'échec le Failed !</p>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqaK1nulQI-8lSQ2xFMlDaKVEIwl5Zusq2m-ChYMcYUEY1jeUGTZYpIgLtaNgr_XHX4Wudag8AimLnZdkigeHoMvDw-BmC_wmB3P8DwXOnPYfjIO2agDD9QVI-d7q2Tmkm7g5orhJ0jxhL/s1600/Sans+titre.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="483" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqaK1nulQI-8lSQ2xFMlDaKVEIwl5Zusq2m-ChYMcYUEY1jeUGTZYpIgLtaNgr_XHX4Wudag8AimLnZdkigeHoMvDw-BmC_wmB3P8DwXOnPYfjIO2agDD9QVI-d7q2Tmkm7g5orhJ0jxhL/s640/Sans+titre.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br />SQL Server Restore Database comme je veux</td></tr>
</tbody></table>
</div>
<p>Et cela commence tout en haut on ne choisit pas l'option par défaut mais l'option "Device" dans la radio button en suite en 2 on va pouvoir choisir le backup à restorer en 3 on voit les différentes backup on peut choisir et cliquer sur Ok.</p>
<p>Voilà on a appris à ne pas se laisser mener par SQL Server et gérer les backups correctement ce qui sinon on va inévitablement vers un Failed !</p>
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-63801190223778880282020-07-28T07:47:00.006-07:002020-09-16T09:24:35.000-07:00SQL Server - Gestion des BackupCela m'a toujours paru être un sujet épineux car au moment de restaurer votre base de données vous allez avoir des sueurs froides dans mon souvenir ça toujours été comme ça ! SQL Server fait toujours des siennes alors aujourd'hui, on en est où ?<br />
<br />
<a href="https://docs.microsoft.com/fr-fr/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server?view=sql-server-ver15" target="_blank">Microsoft - Créer une sauvegarde complète de base de données</a><br />
<br />
Déjà ça commence par des restrictions ... Vous ne pourrez pas faire ceci, vous ne pouvez pas faire cela Grrrr !<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMSCCnCc0rGAy119IQlFYy43HiottP7HbBKivsa7FFzvsndV_cEPVUTOy3hIHTuEyf5IgmG6m3kpcEoa5dzoLKtnLdlhNwwUakokcnn-jRv2jBi1adRpzEJHVsYe2r-mg-xw54S_VZDoO1/s1600/2020-07-28_16h07_35.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMSCCnCc0rGAy119IQlFYy43HiottP7HbBKivsa7FFzvsndV_cEPVUTOy3hIHTuEyf5IgmG6m3kpcEoa5dzoLKtnLdlhNwwUakokcnn-jRv2jBi1adRpzEJHVsYe2r-mg-xw54S_VZDoO1/s640/2020-07-28_16h07_35.png" width="630" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server créer une sauvegarde</td></tr>
</tbody></table><br /><div>
Jusque là tout va bien ... Je choisie quelques petites options histoire de corser les choses ... Un deuxième nom de fichier plus parlant pour moi ...<a href="https://docs.microsoft.com/fr-fr/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server?view=sql-server-ver15" target="_blank"></a><br />
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSb3Rqq89fWCSw8xr-gS6fQz0t9XuzvP2YrHm8u6fG9H2V9efxZV8iwOS0IN2CJ-hYuFBL9tkXwBCl6_e2iYSumIl8JwEMIPL2X6StGIdoXJYKgKUx2OsD6amJp9-26dAOD4pgRS7E45Kg/s1600/2020-07-28_16h12_23.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSb3Rqq89fWCSw8xr-gS6fQz0t9XuzvP2YrHm8u6fG9H2V9efxZV8iwOS0IN2CJ-hYuFBL9tkXwBCl6_e2iYSumIl8JwEMIPL2X6StGIdoXJYKgKUx2OsD6amJp9-26dAOD4pgRS7E45Kg/s640/2020-07-28_16h12_23.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: 12.8px;">SQL Server créer une sauvegarde</span></td></tr>
</tbody></table>
<div><br /></div><div>
Bon, ça parait bien compliqué tout ca ... pour une simple sauvegarde.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMJ_TepB1NIe2EkKQO_tm6B3xtIVb5E9yiVekry_0nhDHXgWxZAzwjI3sLRzj3i4aolz-9cvjp9Uv5Jmv3cAzXeE6wke_v8gPXnZG3jaPWa_W7bzObsMaVRUBsMbyQnEoDeXhFMTCIEatv/s1600/2020-07-28_16h13_20.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="536" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMJ_TepB1NIe2EkKQO_tm6B3xtIVb5E9yiVekry_0nhDHXgWxZAzwjI3sLRzj3i4aolz-9cvjp9Uv5Jmv3cAzXeE6wke_v8gPXnZG3jaPWa_W7bzObsMaVRUBsMbyQnEoDeXhFMTCIEatv/s640/2020-07-28_16h13_20.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: 12.8px;">SQL Server créer une sauvegarde</span></td></tr>
</tbody></table>
<div><br /></div><div>
Du coup, je fais tout de suite l'opération inverse ... La base de vit pas rien ne peut se passer.</div>
<h2>
SQL Server Restore Database</h2>
<div>
Je sélectionne tout ça, tout ça ... Restore -> Database</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWtbr0oYB3O4enieaqhS2OeZ2OgmkOMq3B148zR6EzXFsLECY2IzkSu3JUUNop1RIXzUoeN23ECnV3YJaS9kYGNVyu_JDBJi4uRR0lUDbR9FbHu6oTLC-Rjr7_xeFoNRuIFqz5198gVS18/s1600/2020-07-28_16h26_48.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="490" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWtbr0oYB3O4enieaqhS2OeZ2OgmkOMq3B148zR6EzXFsLECY2IzkSu3JUUNop1RIXzUoeN23ECnV3YJaS9kYGNVyu_JDBJi4uRR0lUDbR9FbHu6oTLC-Rjr7_xeFoNRuIFqz5198gVS18/s640/2020-07-28_16h26_48.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: 12.8px;">SQL Server Restaurer une Base sauvegardée</span></td></tr>
</tbody></table>
<div>
</div>
<div><br /></div><div>
Je n'ai rien fait d'autre que de cliquer sur le bouton Restore ... <span style="font-size: large;">et <span style="color: red;"><b>BOUM !!!</b></span></span></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiluopllx8gtlc-2ZCwbgA8UJ8ciWjSx3uqzOE08ReX1CUdQvFBOS1Z4Pl50GXEQFCseZnsd2s9VO7NEug2pBHUAOfYcJa4H8IHJE11ZVfVLWaIkf_JsXERCQaPOUbqM8P9aV3l4dNEOYPu/s1600/2020-07-28_16h31_51.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiluopllx8gtlc-2ZCwbgA8UJ8ciWjSx3uqzOE08ReX1CUdQvFBOS1Z4Pl50GXEQFCseZnsd2s9VO7NEug2pBHUAOfYcJa4H8IHJE11ZVfVLWaIkf_JsXERCQaPOUbqM8P9aV3l4dNEOYPu/s640/2020-07-28_16h31_51.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: 12.8px;">SQL Server Restaurer une Base sauvegardée c'est impossible</span></td></tr>
</tbody></table>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="color: red; font-size: large;"><b>Restore Database Failed !!!</b></span></div>
<div>
<br /></div>
<div>
C'est nul, c'est vraiment de la daube <b><span style="color: #0b5394;">SQL Server</span></b>. Il n'y a vraiment que les masos pour continuer à travailler avec une telle Daube.</div>
<div>
<br /></div>
<div>
C'est comme le "Detach" et "Attach" de la base de données. le Detach avec les options "Drop Connections" et "Update Statistics" que vous êtes obligé de systématiquement cocher sinon c'est la cata. C'est les seuls a avoir une concept aussi débile. C'est super chiant vous tentez une opération comme et POUF !!! Cet abrutit de SQL Server vous dit que vous ave oublié de Détacher la base de donnée ! Mais peut-on inventer un concept plus idiot, vous avez envie de lui dire mais si l'opération ne peut avoir lieu qu'avec une Base détachée et bien détache la cette foutue Base.<br />
<br />
<b><span style="color: red;">CRRRR !!!!!</span></b></div>
<div>
<br /></div>
<div>
Pourquoi est ce que cette espèce de grosse Daube d'SQL Server ne le fait pas lui même. On dirait une femme de ménage qui laisse le saut et la serpillière au milieu du salon pour montrer qu'elle a fait le ménage... c'est à chier.</div>
<div>
<br /></div>
<div>
Le souci, c'est que moi, j'en ai marre de cette nullité crasse. Le prochain projet, je le jure, je change de moteur de BD.</div>
<div>
<br /></div>
<div>
Pas fun mais alors pas fun du tout !</div>
<div>
<br /></div>
</div>b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-40883729689032470712020-07-22T06:06:00.003-07:002023-03-06T08:47:22.214-08:00SQL Server - SQL Server Agent (MSSQL SERVER) won't start !SQL Server Agent ne démarre pas ! Vous la connaissez celle là ? C'est pour ça que j'écris ce blog, pour répertorier les bêtises des ingénieurs de Redmond. SQL Server est un ramassis d'absurdités et si vous cliquez ici c'est que vous le savez et que vous souhaitez trouver une réponse rapide à votre problème avec SQL Server !<br />
<br />
Alors cette fois, il s'agit d'SQL Server Agent (MSSQL SERVER) qui ne souhaite pas démarrer. Vous êtes en train de vouloir transférer des données d'uns instance d'SQL Server à une autre et vous ne pouvez pas car vous ne pouvez pas démarrer SQL Server Agent !<br />
<br />
A ce stade, vous vous dites, c'est simple, il suffit d'aller dans les services et de faire bouton droit sur démarrer. La plus part du temps avec d'autres services c'est exactement ce qu'il faut faire mais pas avec <b><span style="color: #0b5394;">SQL Server Agent</span></b>, lui il ne voudra pas démarrer, c'est la misère.<br />
<br />
Alors vous exécutez <b><span style="color: #0b5394;">services.msc</span></b> et :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbnlJ_ifHxRTu69pQdCf5OAFTc8mYZ1ClRwxlizG6fxbWG0HXUPqB9D3TYTHQ0A1K2puos3e2yTuqE12BdHwixOxtubp3UbX7aSNxuQ1Fxd2YcC9XCFLIxQqltO6FCW54a_rB_9tlPK6Is/s1600/2020-07-22_14h48_38.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="SQL Server Agent won't Start !" border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbnlJ_ifHxRTu69pQdCf5OAFTc8mYZ1ClRwxlizG6fxbWG0HXUPqB9D3TYTHQ0A1K2puos3e2yTuqE12BdHwixOxtubp3UbX7aSNxuQ1Fxd2YcC9XCFLIxQqltO6FCW54a_rB_9tlPK6Is/s640/2020-07-22_14h48_38.png" title="SQL Server Agent won't Start !" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Agent won't Start !</td></tr>
</tbody></table>
Et oui, comme moi vous êtes stupéfait tout est grisé, vous ne pouvez pas starter <b><span style="color: #0b5394;">SQL Server Agent</span></b>. Alors que faire ?<br />
<h2>
SQL Server Agent ne veut pas démarrer - Solution</h2>
Le Solution, c'est d'aller dans "<b><span style="color: #0b5394;">Properties</span></b>" et de choisir "<b><span style="color: #0b5394;">Automatic</span></b>" plutôt que "<b><span style="color: #0b5394;">Disabled</span></b>". Comme sur la figure ci-dessous :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEPuXXGc63DTMYReitCosMYKGbpxweC2JuHKeXHeHmFe1u_uSUWquT0LnzKXOZbYpA6YxzIWK1148exM4YJ3xNe9YxS3U5DO1DLAXpd1j64CoZGfJdrG1sTPntbwRqrxDUjEGB4a1Jerrp/s1600/2020-07-22_14h55_28.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="SQL Server Agent won't Start !" border="0" height="386" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEPuXXGc63DTMYReitCosMYKGbpxweC2JuHKeXHeHmFe1u_uSUWquT0LnzKXOZbYpA6YxzIWK1148exM4YJ3xNe9YxS3U5DO1DLAXpd1j64CoZGfJdrG1sTPntbwRqrxDUjEGB4a1Jerrp/s640/2020-07-22_14h55_28.png" title="SQL Server Agent won't Start !" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: 12.8px;">SQL Server Agent won't Start !</span></td></tr>
</tbody></table>
Ainsi <b><span style="color: #0b5394;">SQL Server Agent</span></b> pourra démarrer lorsque ce sera nécessaire. C'est pas débile, ça, hein ? Franchement !<br />
<br />b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-71222085729708973382020-07-09T05:46:00.000-07:002020-07-10T02:16:31.539-07:00SQL Server - The server was not found or was not accessible.Encore un petit message sympathique de notre ami le serveur SQL. J'ai de plus en plus de mal à comprendre les gens qui travaillent encore avec ce serveur de base de données, il faut vraiment être maso. Cette fois je suis sur une machine du Cloud Azure alors j'ai eu même du mal à faire accéder l'application web qui était installé sur le serveur même. Maintenant j'essaye depuis internet.<br />
<br />
Voici le message d'erreur :<br />
<br />
<span style="color: red; font-size: x-small;">SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)</span><br />
<span style="color: red; font-size: x-small;">Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, uint waitForMultipleObjectsTimeout, bool allowCreate, bool onlyOneCheckConnection, DbConnectionOptions userOptions, out DbConnectionInternal connection)</span><br />
<br />
Franchement n'en jetez plus ! C'est quoi ce message de 10 km alors que le problème c'est juste SQL Server qui est une grosse daub(bip) !<br />
<br />
Ce qui est sympa avec Internet c'est que le style change suivant les navigateurs :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjatILaMzJkKlNQpCouLVl_0wH1lwlcTXrtazwvE9fYNWoJVeskv2VxW1iXO9kQfVZoH4dy9LBnOdEhbtWRwO34NN6uquOZisMCFKT_1eQ3wnMaJ4g1QHAQArB5X-8t4cE2T2Hdw4NNnMss/s1600/2020-06-17_10h40_27.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="SQL Server - SQL Server is configured to allow remote connections." border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjatILaMzJkKlNQpCouLVl_0wH1lwlcTXrtazwvE9fYNWoJVeskv2VxW1iXO9kQfVZoH4dy9LBnOdEhbtWRwO34NN6uquOZisMCFKT_1eQ3wnMaJ4g1QHAQArB5X-8t4cE2T2Hdw4NNnMss/s1600/2020-06-17_10h40_27.png" title="SQL Server - SQL Server is configured to allow remote connections." /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server - SQL Server is configured to allow remote connections.</td></tr>
</tbody></table>
<br />
Le style change mais c'est toujours le même message de mer... ! Il n'a rien à voir avec le problème c'est sans soute pour nous égarer.<br />
<br />
Tellement d'années plus de dix ans que la configuration du moteur de base de données SQL Server est toujours à ce niveau de difficulté, remarquez avec lui vous balayez l'ensemble des problèmes que vous pouvez avoir lors d'une connexion réseau.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><a href="https://docs.microsoft.com/fr-fr/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view=sql-server-ver15" target="_blank"><img border="0" height="159" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQAjQD1lu17YumeiRtrGRtIN5u77OyhatTNJJhDEQHz1PgqPL9B4Fr7QJpGAtDnjoWCewdPtqjeWbkLMhQzIHPf_LjAIHqAaB4zs9yegAk-4Z8hTv_iinrrU6Y8q4FiUxrc23rtNbkdltl/s640/2020-06-17_10h48_49.png" width="640" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://docs.microsoft.com/fr-fr/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view=sql-server-ver15" target="_blank">Résoudre les problèmes avec SQL Server</a></td></tr>
</tbody></table>
<br />
Du coup la littérature s'est drôlement étoffée.<br />
<br />
Vous avez également de la lecture Ici :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><a href="https://stackoverflow.com/questions/9945409/how-do-i-fix-the-error-named-pipes-provider-error-40-could-not-open-a-connec" target="_blank"><img border="0" height="440" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_qeZRY-5RcncGfnsqiJYFB5-iT9LcuK7Ji8OGqnmJiCwiQdOLF4VNzirGp9ycDeSczZJFX2ykQBt8phdhIUdyLfUKLSYRZPoy14arFC835HlBIEhDICKQsctKNqg6ez3bmdiVUpBUs5vU/s640/2020-06-17_11h21_41.png" width="640" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://stackoverflow.com/questions/9945409/how-do-i-fix-the-error-named-pipes-provider-error-40-could-not-open-a-connec" target="_blank">Stackoverflow - How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?</a></td></tr>
</tbody></table>
<br />
Là vous avez un pauvre hère qui a tout fait bien mais qui ne comprend pas pourquoi il ne peut toujours pas se connecter à son Server SQL !<br />
<br />
Alors ils partent en pleins délires pour récapituler et finalement ne pas trouver en définitive de solution c'est grave !<br />
<br />
Mais bon ça reste un truc de maso !<br />
<br />
Si non au autre type de solutions Ici :<br />
<br />
<a href="https://web.archive.org/web/20151027020437/http://microsoft-sql-ssis.blogspot.in/2015/09/how-to-fix-named-pipes-provider-error.html" target="_blank">MS-BI Tutorials - How to Fix named Pipes Provider Error 40 cannot open connection to Sql server instance</a><br />
<br />
<br />
<br />
<br />
<br />b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-65139383334556194732020-03-18T05:27:00.004-07:002020-09-16T09:28:01.134-07:00The user instance login flag is not supported on this version of SQL Server. The connection will be closed.Je comprends que l'on ait envie de passer à une version de Postgres ou SQLite car avec SQL Server c'est toujours la même chose et c'est un peu fatiguant ces problèmes de compatibilité d'une version à l'autre. J'ai une base qui fonctionnait parfaitement avec SQLExpress en développement, il y a quelques années, j'essaye de rependre mon projet et pouf :<br />
<br />
Error Message<br />
<br />
<span style="color: red; font-size: x-small;"><strong>The user instance login flag is not supported on this version of SQL Server. The connection will be closed.</strong></span><br /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEoExo9r_Aa9aD2hjt7TEC-ic6d31VKDu1mIV6MrgiRiONKIsT0XhxWIEb21Z2qao5pFwAJpfOYEwsvA4EooKYaWOEyIr_4GiQYy8hads-W8PHKbKZAF41XbS8j-nUd2HwfdW7wY1AsQsK/s1600/2020-03-18_12h22_21.png" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEoExo9r_Aa9aD2hjt7TEC-ic6d31VKDu1mIV6MrgiRiONKIsT0XhxWIEb21Z2qao5pFwAJpfOYEwsvA4EooKYaWOEyIr_4GiQYy8hads-W8PHKbKZAF41XbS8j-nUd2HwfdW7wY1AsQsK/s640/2020-03-18_12h22_21.png" title="The user instance login flag is not supported on this version of SQL Server. The connection will be closed." width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The user instance login flag is not supported on this version of SQL Server. The connection will be closed.</td></tr>
</tbody></table>
<br />
Franchement, j'ai autre chose à faire que ça !<br />
<br />
Alors là, c'est à l'exécution de l'application pour aller un peu plus loin, je remonte le projet et je me retrouve avec une application ASP.NET Aspx avec les Bases de données dans le répertoire <strong><span style="color: #0b5394;">App_Data</span></strong> quand j'y pense c'était bien pratique pour le déploiement.<br />
<h2>
Donner le droit d'accès</h2>
Du coup je dis que c'est peut être un problème de droits d'accès au répertoire App_Data sur ma nouvelle plateforme de développement.<br />
<br />
Vous vous souvenez de la galère ... que c'est avec <strong><span style="color: #3d85c6;">SQL Server</span></strong> d'octroyer les droits d'accès à un répertoire pour y poser vos Bases de Données ailleurs que dans le répertoire DATA :<br />
<br />
<strong><span style="color: red;">C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA</span></strong><br />
<br />
Alors pour mémoire, on y va :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLeKYQb0njSAxqa7QcB51I2aRXDZAzjMGVIYl_wfVcHhOfVfjZtkGOGk1is2nUh6q5ezKlhCUqq66j6PLAt0d_jF2uPGsldGvi5L1qLti6jh1xUyGd-GKZ2aWJi_mYRoaD-gxm4j-R5ctb/s1600/2020-03-18_12h58_19.png" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" height="610" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLeKYQb0njSAxqa7QcB51I2aRXDZAzjMGVIYl_wfVcHhOfVfjZtkGOGk1is2nUh6q5ezKlhCUqq66j6PLAt0d_jF2uPGsldGvi5L1qLti6jh1xUyGd-GKZ2aWJi_mYRoaD-gxm4j-R5ctb/s640/2020-03-18_12h58_19.png" title="SQL Server - Octroyez les droits d'accès à un répertoire" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server - Octroyez les droits d'accès à un répertoire</td></tr>
</tbody></table><br /><div>
Bouton droit sur le répertoire puis <strong><span style="color: #3d85c6;">Propriétés->Security Add ...</span></strong><br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG_K9x0mL4v2pLGGP5KldDg7f6sEVexLpjwQa0XBtGqwEi424hmjfTAaxwgG8EX1r-a5rdc7F5d0oNwKgrc_dP8ZdE4GB59cmIOb3VRxMTACM5qlQunNWzgGCoav_e41WvLpGY6aW5EdOc/s1600/2020-03-18_12h58_22.png" style="margin-left: auto; margin-right: auto;"><img alt="SQL Server - Octroyez les droits d'accès à un répertoire" border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG_K9x0mL4v2pLGGP5KldDg7f6sEVexLpjwQa0XBtGqwEi424hmjfTAaxwgG8EX1r-a5rdc7F5d0oNwKgrc_dP8ZdE4GB59cmIOb3VRxMTACM5qlQunNWzgGCoav_e41WvLpGY6aW5EdOc/s640/2020-03-18_12h58_22.png" title="SQL Server - Octroyez les droits d'accès à un répertoire" width="568" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server - Octroyez les droits d'accès à un répertoire</td></tr>
</tbody></table>
<br />
Mais quelle galère ... J'essaye d'ajouter des droits à "User" pour que mon SQL Server qui prend l'Identity User puisse accéder aux bases de données qui sont dans le répertoire <strong><span style="color: #3d85c6;">App_Data</span></strong>.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs_upPQjdkvv1YLC2_fLpiDxn4CQ-cjbO4xvygsUkZBDRaq9yeKyWnw53lfD4uQiWf2Srp6iCo8kNVuoUdgoZ5mkFuAjAS_5YQ6jhdIB5mNiaP4FxuTMo03Gf5XN9SrGWCPI9Vpc40Z56c/s1600/2020-03-18_12h58_32.png" style="margin-left: auto; margin-right: auto;"><img alt="SQL Server - Octroyez les droits d'accès à un répertoire" border="0" height="632" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs_upPQjdkvv1YLC2_fLpiDxn4CQ-cjbO4xvygsUkZBDRaq9yeKyWnw53lfD4uQiWf2Srp6iCo8kNVuoUdgoZ5mkFuAjAS_5YQ6jhdIB5mNiaP4FxuTMo03Gf5XN9SrGWCPI9Vpc40Z56c/s640/2020-03-18_12h58_32.png" title="" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server - Octroyez les droits d'accès à un répertoire</td></tr>
</tbody></table>
<br />
Non mais c'est vraiment insupportable cette façon de gérer les droits d'accès, j'y perds ma vie !<br />
<br />
Bon allez ça suffit, je vais déplacer mes Base de donnée dans le seul répertoire qui a les droits de SQL Serveur : <br />
<br />
<strong><span style="color: red;">C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA</span></strong><br />
<br />
Franchement, je peux vous dire que c'est fatiguant, s'il devait avoir quelque chose qui change dans MS SQL c'est bien ça, toutes ces versions du moteur qui toutes sont aussi pénibles les une que les autres à gérer. Il faut que je me mette à scripter.<br />
<h2>
Attacher mes Bases de données à SQL Server</h2>
Du coup, comme j'ai déplacé mes BDs je dois modifier les chaines de connexion en conséquence et je dois attacher mes bases de données à SQL Server.<br />
<br />
Allez on y vas haut les cœurs :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifVrajjgqbYcnsfY843VC1dW1TAMgBGhYjqtNZSAhqjuob3cCquHyIN75zRO-YxLCu1u1FVVXE8W2XhHtGmloFlS8XH1BMOM8tYzcakRSPIIp7gwYLwc6KAJm72g2hteCWzYqqkCdohbMi/s1600/2020-03-18_13h14_33.png" style="margin-left: auto; margin-right: auto;"><img alt="SQL Server DataBase - Attach ..." border="0" height="525" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifVrajjgqbYcnsfY843VC1dW1TAMgBGhYjqtNZSAhqjuob3cCquHyIN75zRO-YxLCu1u1FVVXE8W2XhHtGmloFlS8XH1BMOM8tYzcakRSPIIp7gwYLwc6KAJm72g2hteCWzYqqkCdohbMi/s640/2020-03-18_13h14_33.png" title="" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server DataBase - Attach ...</td></tr>
</tbody></table><br /></div><div>
Et ça continue Avec quelques bons scripts sous SQLite j'aurais déjà terminé.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQwat5ruNY3zvPnjXGmzlyr0W5D74mCNSwpg5-KnUyiDfN2vVm38gusdLk_hVr3WWKEu6oBmAubzTfGgYnUvqZizjD8_5I2lAcvHgm1FOHxVCoX5oVn06vaeZODQitGXHrki0X58PXNwGq/s1600/2020-03-18_12h58_36.png" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQwat5ruNY3zvPnjXGmzlyr0W5D74mCNSwpg5-KnUyiDfN2vVm38gusdLk_hVr3WWKEu6oBmAubzTfGgYnUvqZizjD8_5I2lAcvHgm1FOHxVCoX5oVn06vaeZODQitGXHrki0X58PXNwGq/s640/2020-03-18_12h58_36.png" title="SQL Server DataBase - Attach ..." width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server DataBase - Attach ...</td></tr>
</tbody></table><br /></div><div>
Et vous vous souvenez qu'à la fin, il vous faut renommer la Base de Données ...<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj76lnT9eTBhL6CIggIq-nZpPBzK1xWZFyxLsi91RngdVWhFfh29ZKVw-UQsmDgaR8g1mriu_KhwcLhYS4LPl_emqrinG9JxLbsen9ON8grYssk52E9Juo3MaaC22sEKHsj9qiQUFyDq88m/s1600/2020-03-18_12h58_41.png" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" height="390" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj76lnT9eTBhL6CIggIq-nZpPBzK1xWZFyxLsi91RngdVWhFfh29ZKVw-UQsmDgaR8g1mriu_KhwcLhYS4LPl_emqrinG9JxLbsen9ON8grYssk52E9Juo3MaaC22sEKHsj9qiQUFyDq88m/s640/2020-03-18_12h58_41.png" title="SQL Server DataBase - Attach ..." width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server DataBase - Attach ...</td></tr>
</tbody></table><br /></div><div>
Tout ceci pour finir par essayer d'utiliser la base de mon ancienne application que j'aimerais tout simplement retravailler avec Visual Studio 2019 Community.<br />
<br />
Me voici donc avec Visual Studio Community et son Server Explorer Tools :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgReyTeLnvOZztO6f_H4-HsEik11xu-voNl8JJafYig8o4U1xfw2ejger7jTxPiGuuex3JEkkktezF3z4hHCNPSXPyDyuEBrT7otq7lKU2QHE-vRrfA8AZfEIDhyEr0IG7EnhRRg1klldZq/s1600/2020-03-18_13h25_24.png" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgReyTeLnvOZztO6f_H4-HsEik11xu-voNl8JJafYig8o4U1xfw2ejger7jTxPiGuuex3JEkkktezF3z4hHCNPSXPyDyuEBrT7otq7lKU2QHE-vRrfA8AZfEIDhyEr0IG7EnhRRg1klldZq/s640/2020-03-18_13h25_24.png" title="The user instance login flag is not supported on this version of SQL Server. The connection will be closed." width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The user instance login flag is not supported on this version of SQL Server. The connection will be closed.</td></tr>
</tbody></table><br /></div><div>
Oh quelle tristesse tout cela pour ça ... Pouf !<br />
<br />
Je pars chercher la solution et je reviens vous la donner.<br />
<h2>
Solution</h2>
<strong><span style="color: red;">The user instance login flag is not supported on this version of SQL Server. </span></strong><br />
<br />
La solution est supprimer la partie : <strong><span style="color: #3d85c6;">User Instance=True</span></strong> de la chaine de connexion. OH sans blague vous auriez pensé à ça ...<br />
<br />
CQFD !<br />
</div>b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-71181491471531858502019-11-25T02:25:00.000-08:002020-03-17T09:56:51.043-07:00Comment connaitre de nom de l'instance SQL Server sur ma machine ?C'est toujours un problème ce fameux <strong><span style="color: #0b5394;">Nom d'instance</span></strong> de <strong><span style="color: #0b5394;">SQL Server</span></strong> et c'est très Microsoftien car aucune doc ne donne vraiment la bonne réponse. Ce qu'il faut savoir c'est : L'instance nommée d'un Server SQL c'est le nom de la machine si il n'y a qu'une instance SQL Server d'installée sur cette machine. <br />
<br />
Voilà déjà cette règle est essentielle. Ensuite, le nom de la machine est équivalent au point : "." lors de la connexion au server SQL vous pouvez utiliser "." pour vous connecter. Vous avez compris et si vous installez une deuxième instance de SQL Server alors la deuxième instance prend le nom de MSSQLSERVER01 ...<br />
<br />
Et sinon vous pouvez consulter les noms des instances installées sur votre machine grâce au <strong><span style="color: #0b5394;">Tools</span></strong> de l'article suivant :<br />
<br />
<a href="https://sql-server-astuces.blogspot.com/2019/09/sql-server-installation-center.html" target="_blank">Vérifiez votre installation de SQL Server</a><br />
<br />
Ici :<br />
<br />
<a href="https://blog.developpez.com/elsuket/p7725/snippets/trouver_le_numero_d_une_instance_nommee" target="_blank">Le Blog SQL Server d'ElSüket - Trouver le numéro d’une instance nommée de SQL Server</a><br />
<br />
Il y a un gars qui vous explique un truc du moyen âge mais ça fonctionne c'est d'aller de lire les clefs du Registre :<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2PLiSex3bubOQg8W8PmU0RjAR7CPrk66azXP4uCG6I4U1gBgY1CXfJg-aYID_2ZdnfiAl0SBzE0QV4ltkV9orYu36XIvoCJz6PpoRkPzPg0JfNJeF0UwcVuhnJVegS-pZgiFtAkL0sVaE/s1600/2019-11-20_11h19_19.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Comment connaitre de nom de l'instance SQL Server sur ma machine ?" border="0" height="314" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2PLiSex3bubOQg8W8PmU0RjAR7CPrk66azXP4uCG6I4U1gBgY1CXfJg-aYID_2ZdnfiAl0SBzE0QV4ltkV9orYu36XIvoCJz6PpoRkPzPg0JfNJeF0UwcVuhnJVegS-pZgiFtAkL0sVaE/s640/2019-11-20_11h19_19.png" title="Comment connaitre de nom de l'instance SQL Server sur ma machine ?" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Comment connaitre de nom de l'instance SQL Server sur ma machine ?</td></tr>
</tbody></table>
Donc dans mon exemple le nom de l'instance de mon Server SQL est : MSSQLSERVER<br />
<br />
Et voilà !<br />
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-250808762997968112019-11-19T05:47:00.001-08:002020-06-12T03:42:41.097-07:00Can't connect to localhost on SQL ServerSouvent le problème c'est de bien poser la bonne question. C'est pourquoi je prends note ici de cette question car je suis avec Mon <strong><span style="color: #0b5394;">SQL Server Management Studio</span></strong> et j'essaye de me connecter à ".". Oui le petit nom de localhost c'est "." dans SQL Server le point c'est la même chose que localhost 127.0.0.1.<br />
<br />
Au bout de trois heures (à peu prêt) <strong><span style="color: #0b5394;">SQL Server Management Studio</span></strong> me répond par une insulte : <br />
<br />
<span style="color: red; font-size: x-small;"><strong>Cannot connect to .. (notez les deux points donc localhost).</strong></span><br />
<span style="color: red; font-size: x-small;"><strong>A network-related or specific error occured while establishing a connection to SQL Server.</strong></span><br />
<strong><span style="color: red; font-size: x-small;"></span></strong><br />
Mais qu'est ce qu'il a encore SQL Server, c'est ce que je vais découvrir.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS6fKwQZQ_n7G5Pi6jHm5vkMX3KPtfXOAjw5pPulEfYlspySh2QWoaudAKiPMKdCtRky4Itbr1vdfRzk6NFlOJ6Pz8uHijPpm5Kwu6biKJ4mml2153ffAUXRG-XXHR2aFBl-k3DhU6MRWr/s1600/2019-11-19_14h29_14.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Can't connect to localhost on SQL Server" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS6fKwQZQ_n7G5Pi6jHm5vkMX3KPtfXOAjw5pPulEfYlspySh2QWoaudAKiPMKdCtRky4Itbr1vdfRzk6NFlOJ6Pz8uHijPpm5Kwu6biKJ4mml2153ffAUXRG-XXHR2aFBl-k3DhU6MRWr/s1600/2019-11-19_14h29_14.png" title="Can't connect to localhost on SQL Server" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Can't connect to localhost on SQL Server</td></tr>
</tbody></table>
Du coup de googoolise et je trouve l'excellent site de StackOverflow :<br />
<br />
<a href="https://stackoverflow.com/questions/12774827/cant-connect-to-localhost-on-sql-server-express-2012-2016" target="_blank">stackoverflow - Can't connect to localhost on SQL Server Express 2012 / 2016</a><br />
<br />
Je me dis que si c'est bon pour <strong><span style="color: #0b5394;">SQL Server Express 2012/2016</span></strong> ça doit être bon pour SQL Server 2019 ...<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsix_47dYdKIaOSlWZjK6vt6-GbnmNvAvA0AZvJXmG83UtSrxz0IX_5Svt1DlSwZtyRX7A1EVP2bd6S-6hycBBbbFtTMCUJ47rX6ALs6ndAnlDNc7oWElh1hgiP5ceOol0wH9fk2YNaz6L/s1600/2019-11-19_14h34_11.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsix_47dYdKIaOSlWZjK6vt6-GbnmNvAvA0AZvJXmG83UtSrxz0IX_5Svt1DlSwZtyRX7A1EVP2bd6S-6hycBBbbFtTMCUJ47rX6ALs6ndAnlDNc7oWElh1hgiP5ceOol0wH9fk2YNaz6L/s1600/2019-11-19_14h34_11.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Ajouter une légende</td></tr>
</tbody></table>
<br />
On me dit dans <strong><span style="color: #0b5394;">SQL Server Configruation</span></strong> de regardez si les deux options <strong><span style="color: #0b5394;">TCP/IP</span></strong> et <strong><span style="color: #0b5394;">Named Pipes</span></strong> sont "enable" c'est à dire valides.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTlViRB7d7vcc_dkSar_9dBLvRklxLNDO5vMM71mAuaL4Lm_O91uPCzItCE8zPb9Y-GsmdExmZTWN2nIjrKoovYSSwzgoEGdcw-R4MCzejmJUlh47rqYFevg7cNjtInZaid5wmUFwyZ3Qy/s1600/2019-11-19_14h42_42.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="SQL Server Configuration - Enable PCP/IP and Named Pipes" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTlViRB7d7vcc_dkSar_9dBLvRklxLNDO5vMM71mAuaL4Lm_O91uPCzItCE8zPb9Y-GsmdExmZTWN2nIjrKoovYSSwzgoEGdcw-R4MCzejmJUlh47rqYFevg7cNjtInZaid5wmUFwyZ3Qy/s1600/2019-11-19_14h42_42.png" title="SQL Server Configuration - Enable PCP/IP and Named Pipes" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Configuration - Enable PCP/IP and Named Pipes</td></tr>
</tbody></table>
<br />
La réponse de Stackoverflow est parfaite, elle va plus loin mais franchement pourquoi alors que je viens d'installer SQL Server, je ne peux pas accéder à "localhost" ...<br />
<br />
Les mystères de <strong><span style="color: #0b5394;">SQL Server</span></strong> sont impénétrables (mais chiants surtout ;-)<br />
<br />
Après quelques manipes, je m'aperçois que j'ai installé <strong><span style="color: #0b5394;">deux instances d'SQL Server</span></strong> sur ma machine vous le voyez sur cette figure il y a MSSQLSERVER et MSSQLSERVER01. J'ai essayé de supprimer la deuxième instance, j'ai bricolé les droits j'ai trouvé encore d'autres trucs à faire etc... rien n'y fait.<br />
<br />
Quoi qu'il en soit, j'ai du <strong><span style="color: #0b5394;">tout désinstaller</span></strong> et <strong><span style="color: #0b5394;">tout réinstaller</span></strong> pour qu'enfin je puisse faire <strong><span style="color: #0b5394;">Connect "."</span></strong>.<br />
<br />
Quel Bordel ce SQL Server !<br />
<br />
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-31791851656497505812019-10-10T06:41:00.002-07:002023-03-06T08:50:14.470-08:00Visual Studio Class Designer - Editez vos modèles de donnéesCa c'est cool, vraiment cool ! Pour nous aider à prendre en main les modèles de bases de données complexes maintenant nous avons accès à un outil qui était auparavant réservé aux versions payantes de SQL Server Entreprise et SQL Server Ultimate, voici le <strong><span style="color: #0b5394;">Class Designer</span></strong> (l'éditeur de modèles de données à la portée de tous).<br />
<h2>
Installation du Code Tools Class Designer</h2>
J'ai découverts avec bonheur cette fonctionnalité dans Visual Studio Community 2019 alors qu'elle n'était réservée qu'aux versions prémium de SQL Server, je vous montre comment l'installer :<br />
<br />
Je vais chercher le <strong><span style="color: #0b5394;">Visual Studio Installer</span></strong> et je l'exécute :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCCemFmAkU2TjTU4XuIdTJWxfIZl3tWv_0HxyhazBYt8n16YN-FRXXVIacjTic0HdCWB-rYnvb8Vkw_oEaw0o-ZSuaauwH6bTajtcZLi8iRFvCDo1sFFMzlq9cvww6OZvr9LncJDTGmdrM/s1600/2019-10-10_15h31_22.png" style="margin-left: auto; margin-right: auto;"><img alt="Visual Studio Installer" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCCemFmAkU2TjTU4XuIdTJWxfIZl3tWv_0HxyhazBYt8n16YN-FRXXVIacjTic0HdCWB-rYnvb8Vkw_oEaw0o-ZSuaauwH6bTajtcZLi8iRFvCDo1sFFMzlq9cvww6OZvr9LncJDTGmdrM/s1600/2019-10-10_15h31_22.png" title="Visual Studio Installer" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Visual Studio Installer </td></tr>
</tbody></table>
Je cherche à modifier mon installation de Visual Studio existante sur ma machine :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-iujHh8xJzg6Bd0aBNTGUyWNnyvXN7Dl22e9qRe1iKLFkV1svur4klRoG5OZmCaAFPdyeW_V0hQ2Hbxe2KoT2u5rjNgf8kAq186DwFUrxChOGFnhU1Coz8oD9P3FArs1MOUXmYz0ZbnT3/s1600/2019-12-02_15h35_14.png" style="margin-left: auto; margin-right: auto;"><img alt="Modifier une installation de Visual Studio Community 2019" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-iujHh8xJzg6Bd0aBNTGUyWNnyvXN7Dl22e9qRe1iKLFkV1svur4klRoG5OZmCaAFPdyeW_V0hQ2Hbxe2KoT2u5rjNgf8kAq186DwFUrxChOGFnhU1Coz8oD9P3FArs1MOUXmYz0ZbnT3/s1600/2019-12-02_15h35_14.png" title="Modifier une installation de Visual Studio Community 2019" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Modifier une installation de Visual Studio Community 2019</td></tr>
</tbody></table>
<br />
Puis je vais chercher dans <strong><span style="color: #0b5394;">Individual components</span></strong> -> <strong><span style="color: #3d85c6;">Code tools</span></strong> -> <strong><span style="color: #0b5394;">Class Designer</span></strong> :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwv9RSGNszp3VXKGuFsHS93WpyHivry6qlp8NAqjfq0AWX3Lem-irPNlfPuaWYWe__Lo-rF4ildC86FOJeVMXn6TWydGhh5ywZaT2twPRfDn3WG8sUDM3qwAiu9fAN4Q4Z6K44-qYNpXcb/s1600/2019-10-10_15h17_13.png" style="margin-left: auto; margin-right: auto;"><img alt="Installation du Code tools -> Class Designer dans Visual Studio Community 2019" border="0" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwv9RSGNszp3VXKGuFsHS93WpyHivry6qlp8NAqjfq0AWX3Lem-irPNlfPuaWYWe__Lo-rF4ildC86FOJeVMXn6TWydGhh5ywZaT2twPRfDn3WG8sUDM3qwAiu9fAN4Q4Z6K44-qYNpXcb/s640/2019-10-10_15h17_13.png" title="Installation du Code tools -> Class Designer dans Visual Studio Community 2019" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Installation du Code tools -> Class Designer dans Visual Studio Community 2019</td></tr>
</tbody></table>
Puis je cherche à ouvrir le fichier <strong><span style="color: #0b5394;">.cd (Class Diagram)</span></strong> de mon projet et voici que le modèle de données de mon projet apparait.<br />
<br />
<h2>
Ajouter un Diagramme de Classe dans un projet existant</h2>
Il vous suffit de faire Bouton droit sur votre projet :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjB6EROx6d2G2TfbBIXipupTI7ZhhBDHS-QDGrEGFiayPBLvWvVmiPvV2f2zYKVRie91-Dt8Da1Ps4JJneGCB-UwNMRUjtUK4K5v9MGfQ9hoe5WHLsKHeP_oXDIVR0cz47HIuOxQIp2ur/s1600/2020-04-03_12h50_22.png" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjB6EROx6d2G2TfbBIXipupTI7ZhhBDHS-QDGrEGFiayPBLvWvVmiPvV2f2zYKVRie91-Dt8Da1Ps4JJneGCB-UwNMRUjtUK4K5v9MGfQ9hoe5WHLsKHeP_oXDIVR0cz47HIuOxQIp2ur/s1600/2020-04-03_12h50_22.png" title="Ajouter un Class Diagram à un projet existant" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Ajouter un Class Diagram à un projet existant</td></tr>
</tbody></table>
Puis de trouver l'icône du fichier de Class. En tapant par exemple <strong><span style="color: #0b5394;">Class Diagram</span></strong> dans la barre de recherche :<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaEnKfxuIiWuHcgjIHe3shH95HCcBgO32jqxYvmfEAYrw2rCSTJGuAOQUcIrLSrbl9D0TjEnXiTdl9F1RuAUeL1mVkXnF9frgkHrllcafawjGgnj3VV82C3-1Uw0b5n9MJc0lHxdllia2A/s1600/2020-04-03_12h50_32.png" style="margin-left: auto; margin-right: auto;"><img alt="Ajouter un Class Diagram à un projet existant" border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaEnKfxuIiWuHcgjIHe3shH95HCcBgO32jqxYvmfEAYrw2rCSTJGuAOQUcIrLSrbl9D0TjEnXiTdl9F1RuAUeL1mVkXnF9frgkHrllcafawjGgnj3VV82C3-1Uw0b5n9MJc0lHxdllia2A/s640/2020-04-03_12h50_32.png" title="Ajouter un Class Diagram à un projet existant" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Ajouter un Class Diagram à un projet existant</td></tr>
</tbody></table>
<br />
<u><strong>Remarque :</strong></u> Vous ne pourrez pas utiliser le ClassDiagram dans tous vos projets. Par exemple, vous ne pourrez pas ajouter un Diagramme de Class dans les projets ASP.NET Core. Quand on fait ajouter <strong><span style="color: #0b5394;">New Item</span></strong> on ne le trouve tout simplement pas ! Vous devez donc créer un Projet de Standard Librairie associé à votre projet, là vous pourrez ajouter votre fichier <strong><span style="color: #0b5394;">.cd</span></strong>.<br />
<br />
<h2>
Edition du modèle de données .cd (Class Diagram)</h2>
Voici le modèle de données de mon projet dans l'éditeur de Class Diagram avec <strong><span style="color: #0b5394;">Visual Studio Community</span></strong> :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnrCM4yXFabC9upEWyM9LfoSqepKkwVw87mIo2HC1lXWDmz3P_c5ecoYAw1Y9wXfjHj0Ct2Kn4xvca3XuUhGoXhc1sTbwWWSXch5fKUnc3DynkUPPQZvdMRRv__kervV__8NSnO9PGMBtW/s1600/2019-12-02_15h50_37.png" style="margin-left: auto; margin-right: auto;"><img alt="Visual Studio Community - Création du ClassDiagram ContosoUniversity" border="0" height="525" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnrCM4yXFabC9upEWyM9LfoSqepKkwVw87mIo2HC1lXWDmz3P_c5ecoYAw1Y9wXfjHj0Ct2Kn4xvca3XuUhGoXhc1sTbwWWSXch5fKUnc3DynkUPPQZvdMRRv__kervV__8NSnO9PGMBtW/s640/2019-12-02_15h50_37.png" title="Visual Studio Community - Création du ClassDiagram ContosoUniversity" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Visual Studio Community - Création du ClassDiagram ContosoUniversity</td></tr>
</tbody></table>
<br />
Oh c'est classe ! Avec la touche <strong><span style="color: #0b5394;">Ctrl</span></strong> et la molette de ma souris, je peux afficher plus de diagrammes de classe.<br />
<br />
Voilà, nous venons d'apprendre <strong><span style="color: #0b5394;">à éditer nos modèles de données</span></strong> grâce à l'éditeur <strong><span style="color: #0b5394;">Class Diagram</span></strong> qui est maintenant une fonction de <strong><span style="color: #0b5394;">Visual Studio Community</span></strong>.<br />
<br />
Have fun! No pain!b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-47426433074954680012019-09-20T06:39:00.000-07:002019-11-20T01:58:31.042-08:00SQL Server Installation Center - Vérifier votre install de SQL ServerIl est toujours bon de prendre quelques notes à l'<strong><span style="color: #0b5394;">installation d'une nouvelle version de SQL Server</span></strong> car il y a maintenant de nombreuses versions et je voudrais installer une machine avec ASP.NET Core travailler le Front avec Angular et avoir un moteur de base de données performant avec tout ça.<br />
<br />
Donc j'installe la version <strong><span style="color: #0b5394;">MS SQL Server Express</span></strong> :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFVqKKS6DgJP5UmJ4UR2i3kdt5uzwPYAMO3j5vVF3qUJSVw3Yj6HG1orSfqXVGfJoOOekjVGif0lPbtn6n7L3LjYQtpdGFdEsO-JHCkt15hE0Y2FdV7nQFhJtU7ExvgvmEGV_y1aVNAb9n/s1600/2019-09-19_12h02_53.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFVqKKS6DgJP5UmJ4UR2i3kdt5uzwPYAMO3j5vVF3qUJSVw3Yj6HG1orSfqXVGfJoOOekjVGif0lPbtn6n7L3LjYQtpdGFdEsO-JHCkt15hE0Y2FdV7nQFhJtU7ExvgvmEGV_y1aVNAb9n/s640/2019-09-19_12h02_53.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Installation de MS SQL Server - Les version proposées - Evaluation - Developer - Express</td></tr>
</tbody></table>
Je n'ai pas envie de me taper l'achat d'une licence SQL Server, je choisie donc <strong><span style="color: #0b5394;">Express</span></strong> ... mais encore que j'ai un doute et si la version <strong><span style="color: #0b5394;">Developer</span></strong> était maintenant gratuite ... puisque la case à cocher demande de spécifier : "<strong><span style="color: #0b5394;">Specify a free version</span></strong>".<br />
<br />
Je cherche "sql server developer édition vs express" et je trouve le document suivant :<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXSPJjzakBQuO_2xaV0QcR58ZUnppvG_BzBlYTpKHyj1Pa-nV9_Zp0YIWJSvZNKl9FKC83yYcVabHwBMUzfyPcxFFhwfFYos_Pqni0d-Z8qAPTGg-wHPAG_gOBfXRloM1Gzmf2UpXiqZMs/s1600/2019-09-19_12h22_40.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Comparatif des versions SQL Server 2017" border="0" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXSPJjzakBQuO_2xaV0QcR58ZUnppvG_BzBlYTpKHyj1Pa-nV9_Zp0YIWJSvZNKl9FKC83yYcVabHwBMUzfyPcxFFhwfFYos_Pqni0d-Z8qAPTGg-wHPAG_gOBfXRloM1Gzmf2UpXiqZMs/s640/2019-09-19_12h22_40.png" title="Comparatif des versions SQL Server 2017" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Comparatif des versions SQL Server 2017</td></tr>
</tbody></table>
Du coup j'installe la version <strong><span style="color: #0b5394;">Développeur</span></strong> c'est toujours ça de gagné.<br />
<br />
Vous voyez bien, à chaque nouvelle installation de SQL Server, il faut faire très attention pour arriver à ses fins et retrouver ses petits.<br />
<br />
Je clique sur "<strong><span style="color: #0b5394;">Continuer</span></strong>" et me voici avec un tas de fonctionnalités :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNAU0lDiw0b1OHnTOJW-GVKe8Sp0mDB49pR2Y5xA1TZBR8oZcMMRFcQzPxaSaL6uoWaV3G38yDrKsFHB71sX2tqUQNI0Izg0DxJN_9YXOOB3XfImNR19nC1wQjXfng58T8ACEhuhVxEgJr/s1600/2019-09-19_12h29_56.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="522" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNAU0lDiw0b1OHnTOJW-GVKe8Sp0mDB49pR2Y5xA1TZBR8oZcMMRFcQzPxaSaL6uoWaV3G38yDrKsFHB71sX2tqUQNI0Izg0DxJN_9YXOOB3XfImNR19nC1wQjXfng58T8ACEhuhVxEgJr/s640/2019-09-19_12h29_56.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server - Fonctionnalités</td></tr>
</tbody></table>
Voilà ce que je choisie en gros, tout sauf la "Machine Learning" :<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNadeM517Y0L9IqrU0euqqt1K0tDoFZzUH9nmZshmFa7Z9Fs-3MFAxrjgBb1MaIlkgH_z5GPXlx89bwDKRRNEWp4qegVVhl-GlLqGOSwiy6i2RtcPZzmJo0RmIIipcRrWRx64L74T1oMti/s1600/2019-09-19_12h33_18.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNadeM517Y0L9IqrU0euqqt1K0tDoFZzUH9nmZshmFa7Z9Fs-3MFAxrjgBb1MaIlkgH_z5GPXlx89bwDKRRNEWp4qegVVhl-GlLqGOSwiy6i2RtcPZzmJo0RmIIipcRrWRx64L74T1oMti/s640/2019-09-19_12h33_18.png" width="511" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Fonctionnalités installées</td></tr>
</tbody></table>
Je clique sur Installer :<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhMqqYK1w2tVFMza1GHl6upNHGq6Jsfo_Tc1tgRodN90X_VDRhaDvwJu-c5iACOVW3NcOEBR9j7V_51ZFH_-kaWZCg1ZekBBgHkjiHXjoktQnlz53kznmVsLdYb1HZVrVs7DR4u1HX-1Ph/s1600/2019-09-19_12h35_00.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhMqqYK1w2tVFMza1GHl6upNHGq6Jsfo_Tc1tgRodN90X_VDRhaDvwJu-c5iACOVW3NcOEBR9j7V_51ZFH_-kaWZCg1ZekBBgHkjiHXjoktQnlz53kznmVsLdYb1HZVrVs7DR4u1HX-1Ph/s1600/2019-09-19_12h35_00.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Installation Failed</td></tr>
</tbody></table>
<a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk13-downloads-5672538.html" target="_blank">Oracle Java SE Development Kit</a><br />
<br />
Je clique sur Installer :<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCIuC8Nq_Vnachpxo_V-XNNujuF5aVWWYIseRkeA10G-NvXqMg6ABJ68myey5f7TeT-C-qXciUQEx7aCGexzMLufP253W5BdI95UomhkLKQ36nqf1pzZKqNm4ZLos7zpyPS5Zm288ik5F1/s1600/2019-09-19_12h43_50.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCIuC8Nq_Vnachpxo_V-XNNujuF5aVWWYIseRkeA10G-NvXqMg6ABJ68myey5f7TeT-C-qXciUQEx7aCGexzMLufP253W5BdI95UomhkLKQ36nqf1pzZKqNm4ZLos7zpyPS5Zm288ik5F1/s1600/2019-09-19_12h43_50.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Install Java SE</td></tr>
</tbody></table>
<a href="https://blog.sqlauthority.com/2015/07/08/sql-server-2016-fix-install-rule-oracle-jre-7-update-51-64-bit-or-higher-is-required-failed/" target="_blank">Install – Rule “Oracle JRE 7 Update 51 (64-bit) or higher is required” failed</a><br />
<br />
Et ça ne marche pas ! Quel foutoir ce truc sur le site de Java, si je veux le JRE, je dois m'inscrire !<br />
<br />
Le gars me dit que l'erreur lors de la vérification des Features Rules est due au choix de l'option <br />
<br />
Du coup, je décoche l'option : <strong><span style="color: #3d85c6;">"PolyBase Query Service for External Data"</span></strong><br />
<br />
Cette fois ça fonctionne :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRcy8JAkSm3Fazq9ufUYYCrY9M1n9IacElwplTDuZLcdI80OpTbPMiYqWuZa70lz69GXUhxHFWe2to50nwBhyphenhyphenHdLAgXMrayi-NA0kBwwAusfwzr1Ko8L9zP9v07Wx5ogmUIKVphKybyVDT/s1600/2019-09-20_15h31_09.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="439" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRcy8JAkSm3Fazq9ufUYYCrY9M1n9IacElwplTDuZLcdI80OpTbPMiYqWuZa70lz69GXUhxHFWe2to50nwBhyphenhyphenHdLAgXMrayi-NA0kBwwAusfwzr1Ko8L9zP9v07Wx5ogmUIKVphKybyVDT/s640/2019-09-20_15h31_09.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Installation d'une Instance SQL Server</td></tr>
</tbody></table>
On peut voir d'ailleurs que je me suis trompé j'ai installé deux instances ! Grrr !<br />
<h2>
Pour vérifier ce que vous avez d'installé sur votre Serveur</h2>
Au passage, je note un outils intéressants pour valider mon installation de SQL Server :<br />
<br />
<a href="https://docs.microsoft.com/fr-fr/sql/database-engine/install-windows/validate-a-sql-server-installation?view=sql-server-2017" target="_blank">Microsoft - Valider une installation de SQL Server</a><br />
<br />
Le <strong><span style="color: #0b5394;">Tools</span></strong> dans SQL Server Installation Center :<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIHRUiO4N82yvpwUacb65XzntQUfkZRI0-elz5ZsXi1irr4_g5JNqbCYYplrFdl0I9MGB65kvqKvQJTL3AIsPfk3bdkdvQbOtmimvMkxpNE7oiySaIBMv5azjRBD_zmJbd8Q0dS0jhsR-7/s1600/2019-09-23_12h49_18.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="SQL Server Installation Center - Tools" border="0" height="482" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIHRUiO4N82yvpwUacb65XzntQUfkZRI0-elz5ZsXi1irr4_g5JNqbCYYplrFdl0I9MGB65kvqKvQJTL3AIsPfk3bdkdvQbOtmimvMkxpNE7oiySaIBMv5azjRBD_zmJbd8Q0dS0jhsR-7/s640/2019-09-23_12h49_18.png" title="SQL Server Installation Center - Tools" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Installation Center - Tools</td></tr>
</tbody></table>
Qui m'affiche le résultat suivant :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmVqnn_LxsD02uIbgTQFVWF6jf9kZRrtFhTv6g8GeXuY462HJ4zWgbFhPl4YGr-BZA7TR0RYesfGz6w_wa4w929kr7GPQ2ZM5lrPcOt-rMjNsgPXFMpKrXsr3ibHZieB4sKFAB4lSvCn6J/s1600/2019-09-23_12h46_22.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Setup Discovery Report" border="0" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmVqnn_LxsD02uIbgTQFVWF6jf9kZRrtFhTv6g8GeXuY462HJ4zWgbFhPl4YGr-BZA7TR0RYesfGz6w_wa4w929kr7GPQ2ZM5lrPcOt-rMjNsgPXFMpKrXsr3ibHZieB4sKFAB4lSvCn6J/s640/2019-09-23_12h46_22.png" title="Setup Discovery Report" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Setup Discovery Report</td></tr>
</tbody></table>
Je ne savais pas que j'avais tout ceci d'installé ... ;)<br />
<br />
Voilà, maintenant je peux passer à l'installation de MS SQL Management Studio ...<br />
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-38432979759689344942019-04-26T07:16:00.002-07:002019-11-20T02:28:13.498-08:00SQL Server Express LocalDB c'est quoi ?Encore une nouvelle mouture de SQL Server, décidément Microsoft multiplie les moutures de son moteur de Bases de Données pourquoi ? Pour ne pas livrer la version Serveur complète que l'on trouve encore sous forme de licence pour quelques milliers d'euros, oui des milliers.<br />
<br />
Pour développer des applications ASP.NET Core il me faut SQL Server Express LocalDB alors c'est quoi cette version de SQL Server. On peut tout de même constater que SQL Server se démocratise bien obligé par la communauté qui fournit des moteurs de bases de données SQL performants et gratuits.<br />
<br />
<a href="https://docs.microsoft.com/fr-fr/aspnet/core/tutorials/razor-pages/sql?view=aspnetcore-2.2&tabs=visual-studio" target="_blank">Utiliser une base de données et ASP.NET Core</a><br />
<br />
On nous dit que <strong><span style="color: #0b5394;">LocalDB</span></strong> est une version allégée du moteur de base de données SQL Server Express et on est bien obligé de le croire. Et moi qui croyais que SQL Server Express était déjà une version allégée de MS SQL Server, à n'y rien comprendre.<br />
<br />
Bref ! LocalDB est le moteur intégré et livré avec ASP.NET Core.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN4c_RCaK7ui38uCCtVFzRuHgV8T3QC10WszD3Z4EaPU5t3goU1VgOk9cPW9gWaCbayhrUNxG5i637T2JJPNDzvwx1qpSl7sAj5D8JxMlTTzeTiWcpfuqpI2WA0VV4qr1VLFenaSSCX3nm/s1600/ASP.NET+Core.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN4c_RCaK7ui38uCCtVFzRuHgV8T3QC10WszD3Z4EaPU5t3goU1VgOk9cPW9gWaCbayhrUNxG5i637T2JJPNDzvwx1qpSl7sAj5D8JxMlTTzeTiWcpfuqpI2WA0VV4qr1VLFenaSSCX3nm/s400/ASP.NET+Core.jpg" title="SQL Server Express LocalDB le moteur SQL de ASP.NET Core" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Express LocalDB le moteur SQL de ASP.NET Core</td></tr>
</tbody></table>
<br />
Et pour faire le tour du développement d'applications web avec ASP.NET Core le tutoriel suivant les parfaitement bien fait un CRUD complet :<br />
<br />
<a href="https://docs.microsoft.com/fr-fr/aspnet/core/tutorials/razor-pages/?view=aspnetcore-2.2" target="_blank">Tutoriel : Créer une application web de pages Razor avec ASP.NET Core</a><br />
<br />
Et on voit de plus en plus de code par exemple l'aspect "Migration" qui créé automatiquement du code pour créer votre base de donnée à la première exécution de l'application et qui prendre en charge les modifications de structure.<br />
<br />
<br />
<br />b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-82847577404779460052017-10-25T10:05:00.001-07:002019-04-26T05:48:40.046-07:00Entity Framework - Utilisation de Code First MigrationsComment utiliser le répertoire <strong><span style="color: #3d85c6;">"Migrations"</span></strong> que l'on voit maintenant dans les applications Microsoft ASP.NET WebAPI ou MVC dont on trouve les codes sources sur Internet ?<br />
<br />
Ce truc, cet article est assez cool pour que je prenne note alors que je ne suis pas venu ici depuis presque 1 an. Je cherche à travailler avec Visual Studio 20017 sur les applications ASP.NET JS, MVC, WebAPI et je trouve dans exemples d'application dans lesquels il y a un répertoire <span style="color: #3d85c6;"><strong>"Migrations"</strong></span> mais qu'en faire ?<br />
<br />
Si l'application possède une fonctionnalité de création d'un élément de la base. La base sera crée toute seule comme dans l'exemple suivant :<br />
<br />
BookService-master<br />
<a href="https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity-framework/part-1">https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity-framework/part-1</a><br />
<br />
Et s'il n'y a pas de création d'enregistrement, il faut créer la BD comme dans l'exemple :<br />
<br />
<a href="https://github.com/MikeWasson/MoviesSPA">https://github.com/MikeWasson/MoviesSPA</a><br />
<br />
En faisant : Afficher la Console du gestionnaire de packages<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZfyotPDJI7ucSJ0rUvBpsZICWic0LEH-5wAvopSqMQPI-8YuKGNKcSeTevt6eS_VXbTzAOovNpcN9i_qZ6MtFG81AXLVvGfVbOTe5sTcHVLCz7KaTHSrubS_kP8iZ9QDcdCPsixFB6OR5/s1600/2017-10-25_18h59_27.png" imageanchor="1"><img border="0" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZfyotPDJI7ucSJ0rUvBpsZICWic0LEH-5wAvopSqMQPI-8YuKGNKcSeTevt6eS_VXbTzAOovNpcN9i_qZ6MtFG81AXLVvGfVbOTe5sTcHVLCz7KaTHSrubS_kP8iZ9QDcdCPsixFB6OR5/s640/2017-10-25_18h59_27.png" width="640" /></a><br />
<br />
Puis en exécutant la commande suivante :<br />
<br />
<strong><span style="color: #0b5394;">PM> update-database</span></strong><br />
<br />
Dans la console, voici le résultat :<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6n0LWsvKM14ybhmFxzSdMIKMbdu7u8Dmy7vc5ruoSMad-kl_GYqV8uq_ncbYVRIEzQNfIl3uex76Vx7f3bUGCJqXmSBtCv20CpCIlMe9y8AaqqKTJ_kVbDguOhl6wPXQcZhI2phpsxw6q/s1600/2017-10-25_19h01_06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6n0LWsvKM14ybhmFxzSdMIKMbdu7u8Dmy7vc5ruoSMad-kl_GYqV8uq_ncbYVRIEzQNfIl3uex76Vx7f3bUGCJqXmSBtCv20CpCIlMe9y8AaqqKTJ_kVbDguOhl6wPXQcZhI2phpsxw6q/s640/2017-10-25_19h01_06.png" width="640" /></a></div>
<br />
Comme c'est expliqué dans l'article <a href="https://blog.developpez.com/lilroma/p10807" target="_blank">Ici</a>.<br />
<br />
Voilà, c'est assez cool pour que je prenne note dans mon Blog moi aussi. Cet article vous explique également comment générer ce répertoire et son contenu dans une nouvelle application.<br />
<br />
avec les commandes suivantes :<br />
<br />
<strong><span style="color: #0b5394;">PM>Enabled-Migrations</span></strong><br />
<strong><span style="color: #0b5394;">PM>Add-Migration MyMigration</span></strong><br />
<strong><span style="color: #0b5394;">PM>Update-Database</span></strong><br />
<br />
De la documentation sur le site de <a href="https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity-framework/part-3" target="_blank">Microsoft</a><br />
<br />
Have very fun!b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-8247415380941077772016-08-23T06:32:00.005-07:002023-03-07T02:20:47.480-08:00Microsoft Business Intelligence (BI) Data Tools SQL Server<p>Vous avez besoin d'informations, de news sur SQL Server et ses Data Tools ? De suivre les évolutions de la Business Intelligence. Alors voici un des meilleurs sites pour cela, le : Microsoft Business Intelligence (Data Tools)</p>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><span style="color: black; font-size: 12.8px; margin-left: auto; margin-right: auto;"><a href="http://www.sql-datatools.com/" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAieIbB_F_bJQT_sMl_gwrp9rDw6ouqY-huQH4M6tiqXWH_rjNn4rt_PuW_2EY01KwSc2tu-U-Cxq5-OaLdriUqXWeAZ7AnU7HucxVvDzUkghH3jnFXK5L1QbCm2cQ2V_dyqgNfS6Kio1f/s400/2016-08-23_15h32_47.png" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://www.sql-datatools.com/" target="_blank"><span style="font-size: 12.8px;">Microsoft Business Intelligence (Data Tools</span>)</a></td></tr>
</tbody></table>
<h2>SQL Server BI Data Tools</h2>
<p><a href="http://www.sql-datatools.com/p/sql-server-reporting-services.html" target="_blank">SSRS </a>: SQL Server Reporting Services</p>
<p><a href="http://www.sql-datatools.com/p/sql-server-integration-services.html" target="_blank">SSIS </a>: SQL Server Integration Services</p>
<p><a href="http://www.sql-datatools.com/p/sql-server-analysis-services.html" target="_blank">SSAS</a> : SQL Server Analysis Services</p>
<p><a href="http://www.sql-datatools.com/p/windows-powershell.html" target="_blank">Windows PowerShell</a> : Permet d'automatiser les tâches.</p>
<p><a href="http://www.sql-datatools.com/p/microsoft-power-bi.html" target="_blank">Microsoft Power BI</a> : C'est un ensemble de services et de fonctionnalités en ligne offrant un environnement permettant de promouvoir la BI en libre-service auprès de l'utilisateur final, de prendre en charge les requêtes et le pivot d'alimentation. Il fournit une plate-forme à l'utilisateur final pour l'aider à importer des données, créer des ensembles de données et créer des rapports et des tableaux de bord.</p>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSdaBS241wfF-fb5INemavGtqvPGNfuGsEizjl2QdVomMWqpzt1WXvmXYc8XDCzW-QTlQ_8lCdK6sY2GIsBViqWPymSvBMgoLr59Pm_alhG1GHmYlwYvcFszFhwCVDc0bkUULGHNXBVmqO/s1600/2018-12-11_17h10_37.png" style="margin-left: auto; margin-right: auto;"><img alt="Power BI" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSdaBS241wfF-fb5INemavGtqvPGNfuGsEizjl2QdVomMWqpzt1WXvmXYc8XDCzW-QTlQ_8lCdK6sY2GIsBViqWPymSvBMgoLr59Pm_alhG1GHmYlwYvcFszFhwCVDc0bkUULGHNXBVmqO/s1600/2018-12-11_17h10_37.png" title="Power BI" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Power BI</td></tr>
</tbody></table>
<p>Enorme site sur la BI dans l'univers <strong><span style="color: #3d85c6;">SQL server de Microsoft</span></strong>. Des exemples concrets, des mises en situation dans le monde du BI, du code T-SQL. Tout ce qu'il faut... et plus encore.</p>
<p>
Une vraie découverte ce blog qui présente de façon intensive toutes ces technologies Microsoft cela vous permet de vous plonger rapidement au cœur des sujets important de la Business Intelligence en particulier</p>
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-33641161042810174272016-01-29T08:45:00.004-08:002016-08-23T06:25:26.082-07:00Peut-on encore manager une database SDF avec Visual Studio 2013 ?Mais que ce que c'est que cette question ? Et puis elle implique autre chose, je me suis posé cette question lors du transfert d'une application MVC 3 vers MVC 4 et je suis tombé sur cet os !<br />
<br />
Je cherche des éléments sur les applications MVC et je tombe sur ce projet du codeplex :<br />
<br />
<a href="http://mvcmusicstore.codeplex.com/" target="_blank">http://mvcmusicstore.codeplex.com/</a><br />
<br />
Ca à l'air bien, de correspondre à ce que je souhaite étudier. Seulement voilà, après avoir transformer cette pauvre application MVC 3 en application MVC 4, c'est à dire de refaire les références vers le Framework 4.0, bricoler le Web.config, tout ce qui va bien, cela ne fonctionne toujours pas !<br />
<br />
J'ai une erreur de merde comme toujours avec MVC :<br />
<br />
<b><span style="color: red;">No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.</span></b><br />
<br />
Ca fait peur ! Quelle merde ce truc !<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzKWc54TjyYpoPlFiKOsntpcv9TEXu_RTTSRO9JZCONJDd7iNXLR_ZkPjE6LiifG4hTOOksPsXur86M6nxXdVH5Id2BxvVPMoKB2DlLwgEU-FmvFYiauS8MrcNLl8OeRhDH2ZMXyYrFDOz/s1600/2016-01-29_17h31_56.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="596" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzKWc54TjyYpoPlFiKOsntpcv9TEXu_RTTSRO9JZCONJDd7iNXLR_ZkPjE6LiifG4hTOOksPsXur86M6nxXdVH5Id2BxvVPMoKB2DlLwgEU-FmvFYiauS8MrcNLl8OeRhDH2ZMXyYrFDOz/s640/2016-01-29_17h31_56.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Erreur SDF database in Visual Studio 2013</td></tr>
</tbody></table>
Que c'est laid, que c'est moche :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR34EtiwFuWjbAoeppa_3h4lvPPY_UjlMjjCLOlQB3cBNMm4cUjjLkHUSF0SIDi03btEUUJPdwFlIh0LC-ewzrcqUM3sFq8wbSUUZu77QhVoyPpasAF157nQOoxB0KjoTsE9GuW3BESJC8/s1600/2016-01-29_17h34_32.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="576" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR34EtiwFuWjbAoeppa_3h4lvPPY_UjlMjjCLOlQB3cBNMm4cUjjLkHUSF0SIDi03btEUUJPdwFlIh0LC-ewzrcqUM3sFq8wbSUUZu77QhVoyPpasAF157nQOoxB0KjoTsE9GuW3BESJC8/s640/2016-01-29_17h34_32.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server c'est toujours aussi pourri !</td></tr>
</tbody></table>
Ne cherchez pas à suivre les messages d'erreurs indiqués ici, c'est du bidon de chez Redmond. Des conneries à n'en plus finir car ils se prennent eux même les pieds dans leurs pinceaux !<br />
<h2>
Solution</h2>
<div>
Chez <a href="http://stackoverflow.com/questions/18598506/is-microsoft-dropping-support-for-sdf-database-files-in-visual-studio" target="_blank">stackoverflow </a>:</div>
<div>
<br /></div>
<div>
Is Microsoft dropping support for SDF database files in Visual Studio?</div>
<div>
<br />
<div>
The answer is yes: Microsoft is silently dropping support (as usual IMHO) to Sql Compact Edition.</div>
<div>
<br /></div>
<div>
It started abandoning Sql CE 3.5 in Vs2012 It continued dropping Sql CE in Sql Management Studio 2012 and finally in VS2013.</div>
<div>
<br /></div>
<div>
Vous trouverez des liens vers les outils qui permettent de continuer à travailler avec des base sdf.</div>
<div>
<br /></div>
<div>
MSDN :</div>
<div>
<br /></div>
<div>
<a href="http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/" target="_blank">http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/</a></div>
<div>
<br /></div>
<div>
Y-en a vraiment marre croyez-moi entre les incompatibilités des différents MVC 2 3 4 5. SQL server qui est toujours aussi délicat (pourri) à manager ...</div>
</div>
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-72501977809337488442015-02-26T06:29:00.000-08:002020-07-22T03:39:35.799-07:00Comment se connecter à SQL ServerComment connecter mon "Explorateur de serveurs" de Visual Studio à un SQL Server distant sur une autre machine. Voilà mon sujet du matin ...<br />
<br />
Dans Visual Studio "Explorateur de serveurs" je vois bien que je peux ajouter un serveur ...<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhSFHY8L7pfs07NdQmWNe9K6Ec0ecoysfFvidDZAa4Qy4LhmOVKy_Ui8UARoSbkjSILmfyKxKm0-V_dpUcAl0ACD18Ymr4tlWpdRUIr_gYLbeYQZfH1zxyyrE0CpVpQ6cUst14rs8RJqnX/s1600/2015-02-26_11h29_05.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhSFHY8L7pfs07NdQmWNe9K6Ec0ecoysfFvidDZAa4Qy4LhmOVKy_Ui8UARoSbkjSILmfyKxKm0-V_dpUcAl0ACD18Ymr4tlWpdRUIr_gYLbeYQZfH1zxyyrE0CpVpQ6cUst14rs8RJqnX/s1600/2015-02-26_11h29_05.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Visual Studio - Explorateur de serveurs - Ajouter un serveur...</td></tr>
</tbody></table>
Mais quand je tente d'ajouter un serveur que je connais c'est impossible alors <b><span style="color: #3d85c6;">quel est le problème ?</span></b><br />
<br />
La littérature Microsoft MSDN sur le sujet est comme toujours absconse sur ce genre de point crutial mais tentons d'en sous-tirer la substantifique moelle ...<br />
<br />
<a href="https://msdn.microsoft.com/fr-fr/library/ms188642.aspx" target="_blank">https://msdn.microsoft.com/fr-fr/library/ms188642.aspx</a><br />
Logging In to SQL Server ... Ici on m'apprend à former le nom du Serveur SQL à atteindre.<br />
<br />
On parle plutôt de se connecter à l'aide de <b><span style="color: #3d85c6;">SQL Management Studio</span></b> ce que je vais faire pour l'instant. J'essaye tout un tas de truc mais rien à faire, toujours le même message :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTdhx-96eGxSTTCbK-DylwogOsp6XPgbpvx4kMtTyYiQNrkRGmFugMbrEfSOOgf2RsQ-To8CoAuOV6id9P_4axQkrZvEfgISS7tfvCz0akbTbEpG6oQPZUQ5HuacQjdin-vlbbtYIRC_Dm/s1600/2015-02-26_12h01_52.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTdhx-96eGxSTTCbK-DylwogOsp6XPgbpvx4kMtTyYiQNrkRGmFugMbrEfSOOgf2RsQ-To8CoAuOV6id9P_4axQkrZvEfgISS7tfvCz0akbTbEpG6oQPZUQ5HuacQjdin-vlbbtYIRC_Dm/s1600/2015-02-26_12h01_52.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server n'est pas configuré pour autoriser les connexion distantes.</td></tr>
</tbody></table>
Donc le SQL Server auquel je souhaite me connecter devrait se nommer en gros : COMPUTER-NAME\SQLEXPRESS.<br />
<br />
En bas de la page ms188642, pour aller plus loin je trouve la page suivante :<br />
<div>
<a href="http://social.technet.microsoft.com/wiki/contents/articles/2102.how-to-troubleshoot-connecting-to-the-sql-server-database-engine.aspx" target="_blank">http://social.technet.microsoft.com/... to-troubleshoot-connecting-to-the-sql-server-database-engine.aspx</a></div>
<div>
<h2>
Vérifier la configuration du Serveur SQL</h2>
<div>
Pour réaliser ce que je souhaite, c'est à dire de connecter une application ASP.NET sur un Serveur SQL, il me faut une machine Serveur, j'ai à ma disposition une machine Virtuelle OVH, Windows 2008 Server R2.</div>
<h3>
Sql Server Configuration Manager</h3>
Utilisation de l'outil : Menu Démarrer->Microsoft SQL Server->SQL Server Configuration Manager :<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDZQOvcZqVYOcapHljzLRFHJmGH9pA7X5jtA-1LoYAqzYJDr384kkzw5UQIkBRMGTyrtPEbJ6wzPHBEd0OzpKpv_d4gxfVeI2399bXitSOnKczkGmXHKHXLuoS9qx5VZikCroGvmlLgp5d/s1600/2015-02-26_18h21_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDZQOvcZqVYOcapHljzLRFHJmGH9pA7X5jtA-1LoYAqzYJDr384kkzw5UQIkBRMGTyrtPEbJ6wzPHBEd0OzpKpv_d4gxfVeI2399bXitSOnKczkGmXHKHXLuoS9qx5VZikCroGvmlLgp5d/s1600/2015-02-26_18h21_11.png" width="258" /></a></div>
<br />
Vérification de l'existence et de la configuration du Serveur SQL :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuS8VIvDWv8WklpgsWg03dcIchjgtAW1l19ZsCmTVegd6zhcYTo8gxrsEYClxxMHZDLk21U80dHW1x82iUycw4pv9X11SyFDbtGTxgnMUPW7deHxQ41QkX4uZ98BOl662uMiQ1V-hkyEWF/s1600/2015-02-26_19h21_57.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuS8VIvDWv8WklpgsWg03dcIchjgtAW1l19ZsCmTVegd6zhcYTo8gxrsEYClxxMHZDLk21U80dHW1x82iUycw4pv9X11SyFDbtGTxgnMUPW7deHxQ41QkX4uZ98BOl662uMiQ1V-hkyEWF/s1600/2015-02-26_19h21_57.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Gestion des Services SQL Server</td></tr>
</tbody></table>
Et par exemple, une des raisons pour lesquels on ne peut pas se connecter à SQL Server c'est que <b><span style="color: #3d85c6;">l'instance du Serveur n'est pas démarrée</span></b>.<br />
<br />
Dans ce cas simplement faire Bouton droit -> Démarrer<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXu-fEqjDx2imKZJLq4f8VVQWYxHe-a7d7SU6MNFZa-iJIIsk62egSc1oH4ktU5Bw6TbtN847SQqWsWTEWOmmX2TwH3KIn7gh8srzxFoEsjV21psxbiKqkSlJ9CD9wtt_JhE4xrdKfFQpk/s1600/2017-05-23_15h07_05.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="229" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXu-fEqjDx2imKZJLq4f8VVQWYxHe-a7d7SU6MNFZa-iJIIsk62egSc1oH4ktU5Bw6TbtN847SQqWsWTEWOmmX2TwH3KIn7gh8srzxFoEsjV21psxbiKqkSlJ9CD9wtt_JhE4xrdKfFQpk/s640/2017-05-23_15h07_05.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sql Server Configuration Manager - Démarrer une instance d'SQL Server</td></tr>
</tbody></table>
Une autre raison : vous pouvez avoir changer le nom de la machine auquel cas le nom de l'instance du serveur aura changé il faudra reconfigurer les connexions.<br />
<br />
Et sinon vous avez :<br />
<br />
<a href="https://docs.microsoft.com/fr-fr/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view=sql-server-ver15" target="_blank">Microsoft - Résoudre les problèmes de connexion au moteur de base de données SQL Server</a><br />
Je crois que l'on peut dire qu'ils (les ingé de Redmonds) ont fait un peu de progrès pour avoir une documentation un peu complète ...</div>
<div>
<br /></div>
<div>
Voilà : C'était donc comment utiliser le <b><span style="color: #3d85c6;">Sql Server Configuration Manager</span></b> pour vérifier l'état de votre instance d'SQL Server.</div>
<div>
<br /></div>
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-80443839714355215152015-02-25T06:34:00.003-08:002015-02-26T00:37:20.580-08:00Gérer les autorisation d'accès aux bases de données SQL Server ExpressSQL Server est un véritable générateur de problèmes de sécurité et de problèmes d'autorisations. Alors voici comment gérer les autorisations avec SQL Server.<br />
<br />
Je veux attacher une base de données qui ne soit pas dans le répertoire autorisé : C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA<br />
<br />
J'obtiens immédiatement un message d'erreur :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEfBakAkwZXIJk0uZWfl2YdYVaAZY2Oasdy-pQJmakCKMmMtDumagOjyZBjUcK-hd1uKwehdkdHxFYe7NkKIFXebGyOIHlB-kgTppr93CCcEfjBuV8wkRgra1hSWtHMVyNRgERGloNPWn_/s1600/2015-02-25_14h57_45.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEfBakAkwZXIJk0uZWfl2YdYVaAZY2Oasdy-pQJmakCKMmMtDumagOjyZBjUcK-hd1uKwehdkdHxFYe7NkKIFXebGyOIHlB-kgTppr93CCcEfjBuV8wkRgra1hSWtHMVyNRgERGloNPWn_/s1600/2015-02-25_14h57_45.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Impossible d'ouvrir le fichier physique - Une exception s'est produite lors de l'exécution d'une instruction ou d'un lot Transact-SQL</td></tr>
</tbody></table>
Sympa non ?<br />
<div>
<br /></div>
<div>
Je regarde les autorisations du répertoire DATA au fin fond de l'arborescence SQL Server :</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBG-rnOeGzJu9BP68R7L6oPIWADNphD5bMb4xQFVuqeYdB3MBPrUMJ0rqF_udll49oCeuoUIIgdDNH7KoYsBfJ9reswkaKVKAZbwkXGf3uC83t1MyOjIk40k9xvIjZwYz4MrxIFxrJgoCv/s1600/2015-02-25_14h46_55.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBG-rnOeGzJu9BP68R7L6oPIWADNphD5bMb4xQFVuqeYdB3MBPrUMJ0rqF_udll49oCeuoUIIgdDNH7KoYsBfJ9reswkaKVKAZbwkXGf3uC83t1MyOjIk40k9xvIjZwYz4MrxIFxrJgoCv/s1600/2015-02-25_14h46_55.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Autorisations de sécurité du répertoire DATA</td></tr>
</tbody></table>
et je remarque ce nom d'utilisateurs : <b>MSSQL$SQLEXPRESS</b> ou plutôt de groupe d'utilisateurs. Le fait qu'SQL Server soit incapable d'attacher la base de mon répertoire vient du fait que le répertoire ne possède pas les autorisations de MSSQL$SQLEXPRESS !<br />
<div>
<h2>
Solution autorisations SQL Server</h2>
<div>
Si je veux pouvoir attacher ma base facilement, il faut que je l'a copie dans le répertoire :C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA</div>
<div>
<br /></div>
<div>
Je sais c'est un peu lâche mais la prochaine fois on apprendra comment ajouter les autorisations du groupe d'utilisateurs MSSQL$SQLEXPRESS à un autre répertoire ...</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<br /></div>
</div>
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-69739143924633594892015-02-10T08:57:00.001-08:002015-02-25T03:16:10.028-08:00Comment installer SQL Management Studio sur SQL Server 2012 ?Vous souhaitez installer SQL Management Studio sur SQL Server Express 2012 ? Vous pensez que la question est simple mais avec SQL Server rien n'est simple alors prenons des notes ...<br />
<br />
Je vais sur le site de téléchargement de Microsoft Download Center :<br />
<a href="http://www.microsoft.com/fr-fr/download/details.aspx?id=29062">http://www.microsoft.com/fr-fr/download/details.aspx?id=29062</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><a href="http://www.microsoft.com/fr-fr/download/details.aspx?id=29062" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHwFUxP3M9IrfjnQAe7cw-OsqP7rh7XJbyrO0ZzaDEmNkl6cdquwXplw-HFT8YBpvazy7hvkrZR9A4zGwJxU-X_69L5pD6oQrwajVa0HuV4OiT_DCd-9Pq_MNcGxAREpcl2ENqXLzCXLNd/s1600/2015-02-10_17h30_28.png" height="494" width="640" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://www.microsoft.com/fr-fr/download/details.aspx?id=29062" target="_blank">Download Center SQL Server 2012 Express</a></td></tr>
</tbody></table>
Je clique sur le bouton Télécharger :<br />
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqsP597Wsu2_TT9S-rxJ1ee_RSoK8zxPgRN82l1OeBVweUqS4g_0oUoTl2MpnTSr2DrXl4F6iqKqg-BskHuei3ot83M6aqwQHyuL5P0rxJDU7g8Ch6fNRlYwpMTcdcs3ys4EJSj9eJojM-/s1600/2015-02-10_17h37_04.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqsP597Wsu2_TT9S-rxJ1ee_RSoK8zxPgRN82l1OeBVweUqS4g_0oUoTl2MpnTSr2DrXl4F6iqKqg-BskHuei3ot83M6aqwQHyuL5P0rxJDU7g8Ch6fNRlYwpMTcdcs3ys4EJSj9eJojM-/s1600/2015-02-10_17h37_04.png" height="540" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server 2012 Express édition</td></tr>
</tbody></table>
Je choisie les deux .exe qui m'intéressent et déjà là , je vois que j'ai un exécutable particulier pour SQL Management Studio ... c'est curieux non ? C'est une tradition stupide d'SQLServer, ils pensent que l'on peut installer le moteur de BD sans l'interface graphique ...<br />
<h2>
Installation de SQL Server 2012</h2>
<div>
Je vous passe l'installe d'SQL Server qui dure la vie d'un vampire. Je suppose qu'il faut d'abord installer SQL Server avant Management Studio ... ce n'est pas sûr. Remarque : l'exe de SQL Server pèse 146 MB tandis que pour l'exe de Management Studio c'est 630 MB !?<br />
<div>
<br /></div>
<div>
Moi, j'ai d'abord lancé l'installe de SQLEXPRE_x64_FRA et je vois dans mon menu démarrer, un tas de trucs :</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbTFMIB8LCtt036nRNWQdMxYQJZBqfssQV-gK443Pe70FmBdrO86tuJCWwOke8Rihou0O_A-Ktb8FCQXtKYH8VgUBCn5lvH53PpoAVdx7EqwSVQSb147XWUqbETxa9CffOAPk1sePvbJh_/s1600/2015-02-10_17h40_24.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbTFMIB8LCtt036nRNWQdMxYQJZBqfssQV-gK443Pe70FmBdrO86tuJCWwOke8Rihou0O_A-Ktb8FCQXtKYH8VgUBCn5lvH53PpoAVdx7EqwSVQSb147XWUqbETxa9CffOAPk1sePvbJh_/s1600/2015-02-10_17h40_24.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server 2012</td></tr>
</tbody></table>
Au passage je note que 2012 s’appuie sur une Installe de 2008. Mais toujours pas de SQL Management Studio !?</div>
<h2>
Installation de SQL Management Studio</h2>
<div>
Les choses sérieuse commencent. En fait, il faut relancer tout le processus d'installation de SQL Server et faire les bons choix.</div>
<div>
<br /></div>
<div>
Ajouter des fonctionnalités à une instance existante ...</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4ugl6nUcyM61cVVYRKfxobzL7PIsaSpWwfn4wgfZ9aUPqi48dfEnQT_bhwB66Na0fHDQuStyowaxMbMk5pgqVsyVGnLBMJGCiuqzyTVqTO-Z0oYz0NEeSlY2cF_Fb1ph6HQf1P7kOzfUb/s1600/2015-02-10_17h49_16.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4ugl6nUcyM61cVVYRKfxobzL7PIsaSpWwfn4wgfZ9aUPqi48dfEnQT_bhwB66Na0fHDQuStyowaxMbMk5pgqVsyVGnLBMJGCiuqzyTVqTO-Z0oYz0NEeSlY2cF_Fb1ph6HQf1P7kOzfUb/s1600/2015-02-10_17h49_16.png" height="480" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Mangement Studio Installation - Ajouter des fonctionnalités à une instance existante de SQL Server 2012</td></tr>
</tbody></table>
Cliquez sur "Suivant" :<br />
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRodzPNnroymaa-IIo-Zov9yIOn7N3CZ51fLqNF2PMimr29rP9FZfyPvc7etIqDwpvl8GJeNBeZLR93nb45eYLqXdg32v0mM0lDckGvpNtTMA157Jkq9tL2cR-xabelaTbkiLKJ5rXKeB/s1600/2015-02-10_17h49_43.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRodzPNnroymaa-IIo-Zov9yIOn7N3CZ51fLqNF2PMimr29rP9FZfyPvc7etIqDwpvl8GJeNBeZLR93nb45eYLqXdg32v0mM0lDckGvpNtTMA157Jkq9tL2cR-xabelaTbkiLKJ5rXKeB/s1600/2015-02-10_17h49_43.png" height="480" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Mangement Studio -Outils de gestion de base</td></tr>
</tbody></table>
Cochez la case "Outils de gestion - De base" dans la "Description du composant" vous pouvez voir qu'il s'agit bien de SQL Management Studio.<br />
<br />
Cliquez sur "Suivant".<br />
<br />
Vérifiez que SQL Server Management Studio est installé.<br />
Menu Démarrer->Tous les programmes->Microsoft SQL Server :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPSBPKsfSAcIxcabLwUjgA1cWEt48nt-eUADxcXPI3OAbun9n61mBsebBUeCKLG-bo5KKNaoKgWHe3X3L0g_Eor5RHnb9WpQM6KW9AOfNk5okFSLoxj4IRvpjJroEqSShar7j-6z_fiPnX/s1600/2015-02-25_12h11_56.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPSBPKsfSAcIxcabLwUjgA1cWEt48nt-eUADxcXPI3OAbun9n61mBsebBUeCKLG-bo5KKNaoKgWHe3X3L0g_Eor5RHnb9WpQM6KW9AOfNk5okFSLoxj4IRvpjJroEqSShar7j-6z_fiPnX/s1600/2015-02-25_12h11_56.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Vérifier l'installation de SQL Server Management Studio Express</td></tr>
</tbody></table>
Voilà vous pouvez maintenant gérer vos Bases SQL Server. <div>
<br /></div>
<div>
Have Fun !<br /><br />
<div>
<br /></div>
<div>
<br /></div>
</div>
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-49339110316800833732014-10-20T03:28:00.000-07:002020-07-10T02:07:19.421-07:00SQL Server 2012 - Error - Impossible de modifier la table que j'ai crééC'est toujours la même sauce avec SQL Server, quand cesseront-ils de faire chier l'utilisateur avec des options par défaut qui sont l'inverse du bon sens !<br />
<br />
Ce matin, un lapin ... non, plus sérieusement, ce matin je lance "Sql sever management studio 2012" pour la première fois. J'utilise sql server management studio 2005 depuis que je suis tout petit et mes souvenirs sont un peu effacés mais petit à petit les sueurs froides me reprennent et les imbécillités de cet outil et toutes ses saloperies qui me reviennent.<br />
<br />
J'avais tout trouvé, même la commande débile :<br />
>grant access / all à exécuter sur une DB sinon on ne peut rien en faire.<br />
<br />
Mais ce matin, à nouveau un problème idiot impossible de modifier la table que je viens de créer !<br />
<h2>
Problème : Modifier une table</h2>
Et voici que cela recommence ! Je créé une table, je veux la modifier et BOUM :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZCWz4ppsckuLCcfXFrS1xOSIFDtAt3KqtV4k1l5Pmvxsnx180L9LUEedjTVqnsULb_82n5hAjcfgsp2l8UvA3FfxiIk60SPFZhEiF5qrFWSVy4YczUJxQ3jPv_xS1iVSXehkLzoXKck_q/s1600/2014-10-20_12h24_37.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZCWz4ppsckuLCcfXFrS1xOSIFDtAt3KqtV4k1l5Pmvxsnx180L9LUEedjTVqnsULb_82n5hAjcfgsp2l8UvA3FfxiIk60SPFZhEiF5qrFWSVy4YczUJxQ3jPv_xS1iVSXehkLzoXKck_q/s1600/2014-10-20_12h24_37.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SQL Server Management Studio 2012 : Saving changes</td></tr>
</tbody></table>
<br />
<span style="color: blue;">Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't...</span><br />
<br />
bla bla bla ... bla bla bla.<br />
<br />
C'est insupportable alors j'aimerais rendre un vibrant hommage à ce lien qui m'a sorti d'affaire :<br />
<br />
<a href="http://blog.wassupy.com/2012/11/sql-server-2012-saving-changes-is-not.html">http://blog.wassupy.com/2012/11/sql-server-2012-saving-changes-is-not.html</a><br />
<h2>
<span style="font-weight: normal;">Solution : Cocher la case "re-creation"</span></h2>
Menu : <b><span style="color: blue;">Tools </span></b>-> Article : <b><span style="color: blue;">Options </span></b>:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi33G8qGq0uVlEWafp0wmXQAw0J0s2QGdostf3wUsE6kbw8y2AJc7EcheMg_cA4jRFBfeT5epPi1cxlAdK8W4n4MNNM9WLyLVQACdeCNI-pEJ2c6jqYrpSV_3WphV6MM0F4GMcLTuUYrC4G/s1600/2014-10-20_13h55_27.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="371" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi33G8qGq0uVlEWafp0wmXQAw0J0s2QGdostf3wUsE6kbw8y2AJc7EcheMg_cA4jRFBfeT5epPi1cxlAdK8W4n4MNNM9WLyLVQACdeCNI-pEJ2c6jqYrpSV_3WphV6MM0F4GMcLTuUYrC4G/s1600/2014-10-20_13h55_27.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cochez la case : Prevent saving changes that require table re-creation</td></tr>
</tbody></table>
Je n'en suis pas totalement certain mais il me semble bien que la même mésaventure existait déjà du temps de SQL Server 2005.<br />
<br />b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-55731257954310259382013-11-19T08:21:00.001-08:002013-11-20T06:30:29.962-08:00AdventureWorks Sample Application - ASP.NET MVCEn effectuant une recherche sur les Samples qui utilisent ou démontrent l'utilisation de la base de données AdventureWorks, on trouve ce projet du codeplex :<br />
<br />
<a href="http://advsampleapp.codeplex.com/" target="_blank">Sample app for Adventureworks database</a><br />
Projet du CodePlex latest version : advsampleapp-15464<br />
<br />
Mais le blog de <a href="http://www.codeplex.com/site/users/view/supertigerzou" target="_blank">supertigerzou </a>est en chinois !<br />
<br />
En cherchant dans "Microsoft All-In-One Code Framework Sample Browser" :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoEZD4FNXRPbeqTohWgQVbfFWGu-uPok9ZyGlv8832alLKS6qTqTSqFnppoLJHD6odVsdasoolGdIpkg0eq9nTtsk6VvXJVpB2gaLxoa_oexo2Bc82_VZGrXjOZhGFUwe16iVkRMaeEyzI/s1600/2013-11-19_16h47_20.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoEZD4FNXRPbeqTohWgQVbfFWGu-uPok9ZyGlv8832alLKS6qTqTSqFnppoLJHD6odVsdasoolGdIpkg0eq9nTtsk6VvXJVpB2gaLxoa_oexo2Bc82_VZGrXjOZhGFUwe16iVkRMaeEyzI/s1600/2013-11-19_16h47_20.png" height="432" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">AdventureWorks2008 - Application Sample</td></tr>
</tbody></table>
On trouve le projet <a href="http://csharppointnet.blogspot.fr/2013/02/silverlight-mvvm-prims-le-projet.html" target="_blank">HappyNet </a>de Cyril Cathala que j'ai déjà longuement décrit dans mon blog c#.net.<br />
<h2>
advsampleapp-15464</h2>
Je reviens donc sur le projet advsampleapp-15464, en me disant que c'est bien dommage qu'il ne soit pas mieux documenté. En explorant mieux ce projet au sein du codeplex, rien n'est renseigné, la documentation retourne inlassablement vers le blog en chinois !? Et même si googlechrome me propose de traduire les pages rien de bien probant sur ce projet. On trouvera quand même quelques photos de supertigerzou qui semble être un vrai un bon développeur de l'Université Huazhong des Jiaotong University admis en 1994.<br />
<br />
Alors qu'y a t-il dans ce projet ?<br />
<br />
Structure de la solution advsampleapp-15464\Adventureworks\Adventureworks.sln :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvEEl-l0FsJEM7LDXyd69W3wJQOGfHmR3bQbyn57hsyjrn-28kPQgJAdbBVOR0AaDqpLLuIFinxLrj2aTg4shhZ8Uetk7S3ac1Bc4fHsIhXS2i2ZgQJulohFiUiLeGqpoIQJmQukRnVktl/s1600/2013-11-19_16h57_13.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvEEl-l0FsJEM7LDXyd69W3wJQOGfHmR3bQbyn57hsyjrn-28kPQgJAdbBVOR0AaDqpLLuIFinxLrj2aTg4shhZ8Uetk7S3ac1Bc4fHsIhXS2i2ZgQJulohFiUiLeGqpoIQJmQukRnVktl/s1600/2013-11-19_16h57_13.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">AdventureWorks Sample Application Solution</td></tr>
</tbody></table>
Je l'ai ouvert avec Visual Studio 2010 Ultimate. Je me rends compte que je ne peux pas charger le projet Adventureworks.Web pourquoi ? Cette solution utilise allègrement les "NuGet Packages" elle ne conviendra donc pas aux versions Express de Visual Studio.<br />
<br />
Liste des NuGet packages installés dans la solution advsampleapp-15464\Adventureworks\packages :<br />
jQuery.1.5.2<br />
jQuery.vsdoc.1.5.2<br />
MefContrib.1.0.0.3<br />
MefContrib.MVC3.1.0.0.3<br />
Ninject.2.2.0.0<br />
Ninject.MVC3.0.3<br />
WebActivator.1.1.0.0<br />
WebActivator.1.4<br />
<br />
MefContrib ? Tient ce projet utilise Managed Extensible Framework ...<br />
<br />
J'installe donc <a href="http://www.microsoft.com/en-us/download/details.aspx?id=1491" target="_blank">ASP.NET MVC 3</a>, en anglais ... lol :<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgixhaLxupJa9tW8jTHRZDfTksqRG1OUFDWc-avIsYDkUQk8X3wBTCzgLUBZtQ4LqRzfSdSLn0onepyucWtIBqqk7Czs5E61st2r7cShmPlSBxOLPYxxwZAXb5QfmgTm_40uDSwUoLKEz-f/s1600/2013-11-19_17h28_25.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgixhaLxupJa9tW8jTHRZDfTksqRG1OUFDWc-avIsYDkUQk8X3wBTCzgLUBZtQ4LqRzfSdSLn0onepyucWtIBqqk7Czs5E61st2r7cShmPlSBxOLPYxxwZAXb5QfmgTm_40uDSwUoLKEz-f/s1600/2013-11-19_17h28_25.png" height="220" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Installer ASP.NET MVC3</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGAvbQLOI-ebCwUPjMK7l67VL32ZTV8RcfcgtsiQ0DcbPVAh6Cwwa-m2yRba3WjsM2_Tew1_HBhlpLaKr6scmIJpCtXnAu1htCpQZn7DaQvONfxRsT1RE-DXvnaWryVi0__sCPsb0jVLRh/s1600/2013-11-19_17h31_30.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGAvbQLOI-ebCwUPjMK7l67VL32ZTV8RcfcgtsiQ0DcbPVAh6Cwwa-m2yRba3WjsM2_Tew1_HBhlpLaKr6scmIJpCtXnAu1htCpQZn7DaQvONfxRsT1RE-DXvnaWryVi0__sCPsb0jVLRh/s1600/2013-11-19_17h31_30.png" height="371" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">ASP.NET MVC 3 Installation Completed</td></tr>
</tbody></table>
<a href="http://www.asp.net/whitepapers/mvc3-release-notes" target="_blank">Release Notes</a><br />
<br />
Je clique à nouveau sur le projet Adventureworks.Web bouton droit "Reload Project" mais rien n'y fait :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8tD5szJPJ-lU_Mq0wJsktbRGmjj_mliVxHR7Z5heHufJnUn51JiDUxITJFUtzo0ahLcqW4SZAheg1megchcmr9mTLT8wA0y17y-USiGrpqfAJCzcKAsPEfkdwZUzaju6PbmYUyF6rQ0OX/s1600/2013-11-19_17h38_57.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8tD5szJPJ-lU_Mq0wJsktbRGmjj_mliVxHR7Z5heHufJnUn51JiDUxITJFUtzo0ahLcqW4SZAheg1megchcmr9mTLT8wA0y17y-USiGrpqfAJCzcKAsPEfkdwZUzaju6PbmYUyF6rQ0OX/s1600/2013-11-19_17h38_57.png" height="96" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">AdventureWorks Sample App - Impossible de charger le projet</td></tr>
</tbody></table>
J'installe <a href="http://www.microsoft.com/en-us/download/details.aspx?id=30683" target="_blank">ASP.NET MVC 4</a>, même chose. Mais quel est donc le type du projet Adventureworks.Web ?<br />
<br />
Vous cherchez quel est le type d'un projet Visual Studio, regardez sur cette page :<br />
<a href="http://www.mztools.com/Articles/2008/MZ2008017.aspx">http://www.mztools.com/Articles/2008/MZ2008017.aspx</a><br />
<br />
J'y trouve l'informations suivante :<br />
<span style="font-size: x-small;"><ProjectTypeGuids></span><br />
<span style="font-size: x-small;">ASP.NET MVC 3.0<span class="Apple-tab-span" style="white-space: pre;"> </span> {E53F8FEA-EAE0-44A6-8774-FFD645390401}</span><br />
<span style="font-size: x-small;">ASP.NET MVC 4.0<span class="Apple-tab-span" style="white-space: pre;"> </span> {E3E379DF-F4C6-4180-9B81-6769533ABE47}</span><br />
<div>
<br /></div>
<div>
Lorsque je créé une application MvcApplication1 mon Visual Studio ne me propose que MVC 4 :</div>
<span style="font-size: x-small;"><ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids></span><br />
<br />
Et le projet Adventureworks.Web est en MVC 3<br />
J'ai pourtant installé MVC 3 et MVC 4 mais mon Visual Studio ne me propose pas la création d'une application MVC 3<br />
<br />
<br />
<br />b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-84577036950980803842013-11-19T07:23:00.000-08:002013-11-19T07:26:22.334-08:00AdventureWorks2008 - Database ReferenceLes références Microsoft dans le CodePlex sont un peu complexes à utiliser, il est difficile de s'y retrouver entre toutes ces versions de base de données. Voici donc quelques notes.<br />
<br />
<a href="http://sqlserversamples.codeplex.com/" target="_blank">http://sqlserversamples.codeplex.com/</a><br />
Microsoft SQL Server Community Projects & Samples. C'est la page d'entrée avec toutes les versions d'exemple de Data Base on y trouve également Northwind.<br />
<br />
<a href="http://msftdbprodsamples.codeplex.com/Releases/" target="_blank">http://msftdbprodsamples.codeplex.com/Releases/</a><br />
Références Microsoft sur la base AdventureWorks, on y trouvera des versions pour SQL Serber 2012, pour SQL Server 20008 R2 ...<br />
<br />
Tellement compliqué de s'y retrouvé que l'on trouve dans le forum de discussion SQL Server une question :<br />
<br />
<a href="http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e50b194b-af6e-4d5b-9fe9-9f925737d598/adventureworksdatamdf-where-is-it?forum=sqlsetupandupgrade" target="_blank">AdventureWorks_Data.mdf, where is it?</a><br />
<h2>
Trouver AdventureWorks2008</h2>
<div>
Si vous installez <b><span style="color: blue;">SQL Server 2008 Express Edition</span></b> la base de donnée AdventureWorks2008 se trouve dans le répertoire : C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\AdventureWorks_Data.mdf</div>
<div>
<br />
Et donc l'installation d'une version Express de SQL Server est un bon moyen de récupérer une base AdventureWorks à la version de votre SQL Server ...</div>
<h2>
Documentation automatique de AdventureWorks2008</h2>
<a href="http://www.elsasoft.org/samples/ReportServer_adventureworks/SqlServer.SPRING.KATMAI.AdventureWorks2008/default.htm" target="_blank">http://www.elsasoft.org/samples/...adventureworks/SqlServe..AdventureWorks2008/default.htm</a><br />
Toute la base expliquée champ par champ.<br />
<br />
Travail réalisé avec l'outil SqlSpec de <a href="http://www.elsasoft.org/index.html" target="_blank">Elsasoft</a>.b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-53763781956300465012013-05-07T09:32:00.000-07:002014-04-22T06:53:08.360-07:00Base de données multidimensionnelles - Cube - Hypercube - SGDB - SGDBR - RDBMSJe me suis toujours demandé pourquoi les DBA (Data Base Administrateur) avaient un tel jargon et découvrant qu'en fait une relation n'était qu'un ID unique partager entre deux tables et qu'une clef primaire et une clef étrangère ou ne servaient qu'à préserver l'intégrité des données d'une table et à établir une relation entre deux tables, j'étais un peu déçu.<br />
<br />
SGDB : Système de Gestion de Bases de Données en fait n'existe plus parce que maintenant tous les SGDB sont en fait des SGDBR c'est à dire des Systèmes de Gestion de Bases de Données Relationnels.<br />
<br />
Ce qui donne en anglais : RDBMS pour Relational Data Base Management System.<br />
<h3>
Mais alors c'est quoi un Cube ?</h3>
<div>
Et là, on me dit qu'une <a href="http://www.journaldunet.com/developpeur/tutoriel/sql/061012-sgbd-multidimensionnel.shtml" target="_blank">base de données multidimensionnelle</a> n'est pas autre chose qu'un cube et que le plus souvent, un cube a trois dimensions mais alors dans ce cas c'est quoi un hypercube !? </div>
<div>
<br /></div>
<div>
Une base multidimensionnelle est contenue dans une seule table, elle peut être analysée avec un nouveau type d'outil : <a href="http://fr.wikipedia.org/wiki/Online_Analytical_Processing" target="_blank">OLAP </a>pour On-Line Analytical Processing</div>
<div>
<br /></div>
<div>
Tandis qu'une BDR s'analyse avec des outils OLTP pour On-Line Transaction Processing.</div>
<div>
<br /></div>
<div>
Je suis sûr que vous êtes comme moi, vous faisiez de l'OLTP sans le savoir. Bon et bien maintenant on le sait ... Mais franchement savoir qu'une base de données multidimensionnelle est contenue dans une seule table m'effraye un peu. En effet j'ai croisé des systèmes dans lesquels le DBA avait choisi de ne créer qu'une seule table, pour des problèmes de performance disait-il et franchement s'était la pagaille et on avait souvent l'envie de lui dire mais tu sais que tu peux créer un modèle relationnel ... Mais tout cela se mords un peu la queue.</div>
<h3>
En maintenant c'est quoi OLAP ?</h3>
<div>
On a tous fait des maths et l'on sait que les matrices nous permettent de concevoir des univers à n dimensions et d'y faire des calculs par exemple des calculs de distances : racine(x^2+y^2+z^2+ ...).</div>
<div>
<br /></div>
<div>
<a href="http://bernard.lupin.pagesperso-orange.fr/exemple.htm" target="_blank">OLAP par l'exemple</a></div>
<div>
Magnifique travail, didactique, progressif et en bonus la surprise à l'Etape 8 une feuille Microsoft Excel avec l'utilisation du fameux outil "Rapport de tableau croisé dynamique".</div>
<div>
<br />
<br />
<br /></div>
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-41571431884229585382013-05-01T04:02:00.001-07:002013-07-18T14:13:16.812-07:00Langage SQL - Les meilleurs cours, les meilleurs exemplesAutant cela parait simple d'écrire une requête SQL, autant je trouve qu'il est difficile de démarrer et que très vite les choses se compliquent.<br />
<br />
Voici mes liens sur les meilleurs cours en SQL :<br />
<br />
<a href="http://sqlpro.developpez.com/cours/sqlaz/fondements/#L1" target="_blank">http://sqlpro.developpez.com/cours/sqlaz/fondements/#L1</a><br />
<br />
<a href="http://sqlpro.developpez.com/cours/sqlaz/jointures/#LI" target="_blank">http://sqlpro.developpez.com/cours/sqlaz/jointures/#LI</a>b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-57457579319287186172013-03-25T09:51:00.001-07:002016-08-29T07:17:16.399-07:00Fix error "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance."Au moment de la première installation de SQL Server et de Visual Studio sur une plateforme de développement logiciel, vous ne pouvez pas utiliser SQL Server avec Visual Studio !? Vous êtes surpris ... ? Et pourtant c'est la vérité ! Voici donc la solution ...<br />
<h2>
<b>Solution pour utiliser Visual Studio avec SQL Server</b></h2>
Parfois, j'ai peur que des soucis résolus disparaissent des serveurs et donc je copie la solution chez moi ... ;)<br />
Windows 7, SQL Serveur 2008 Express Visual Studio 2010, je rencontre à nouveau ce problème. Si ce n'est pas une honte et ben oui cet idiot de SQL Serveur par défaut à l'installation, il n'autorise pas la création d'une instance de serveur par un utilisateur et VS (Visual Studio) ne peut donc pas l'utiliser (et vous trouvez ça normal ?!)<br />
<br />
Les sources <a href="http://www.aspdotnetfaq.com/Faq/fix-error-Failed-to-generate-a-user-instance-of-SQL-Server-due-to-a-failure-in-starting-the-process-for-the-user-instance.aspx" target="_blank">ici</a>.<br />
<br />
Have you ever tried to create a <a href="http://msdn.microsoft.com/en-us/library/ms254504.aspx" target="_blank">user instance</a> database from Visual Studio on SQL Server 2005 Express (or above) and got this terrible (can it be more confusing?) message:<br />
<br />
<strong>"Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." </strong>If you did and tried to find how to resolve this you probably Googled (or Binged)<b> </b>for hours without being able to find the solution that really works.<br />
<br />
Well lets put an end to that. Two simple things need to be done:<br />
<br />
<b><u>Step 1. Enabling User Instances on your SQL Server installation</u></b> First we are gonna make sure we have enabled User Instances for SQL Server installation.<br />
<br />
Go to Query Window in SQL Server Management Studio and type this:<br />
<br />
<span class="txt4" id="_ctl0_MainContent__ctl0_PostForm_ReplyBody"><span style="color: red;">exec sp_configure 'user instances enabled', 1.<br />Go </span></span><span class="txt4" id="_ctl0_MainContent__ctl0_PostForm_ReplyBody"><span style="color: red;">Reconfigure</span></span><br />
Run this query and then restart the SQL Server.<br />
<b><br /><u>Step 2. Deleting old files</u></b> Now we need to delete any old User Instances.<br />
Go to your C drive and find and completely <b>DELETE </b>this path (and all files inside):<br />
<div>
<tt><br /></tt><span style="background-color: yellow;"><code><tt>C:\Documents and Settings\<span style="background-color: lime;"><b>YOUR_USERNAME</b></span>\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS</tt></code></span></div>
<br />
(Dont forget to replace the green text in the path with your current username (if you are not sure just go to <b>C:\Documents and Settings\</b> path to figure it out).<br />
<br />
After deleting this dir you can go to Visual Studio, create ASP.NET WebSite and click on your <b>App_Data</b> folder and choose <b>Add New Item</b> and then choose <b>SQL Server Database</b> and it should work!!!<br />
<h3>
Addendum</h3>
Depuis que j'ai écris ce post, il me semble bien que l'article n'est plus accessible sur le site de aspdotnetfaq.<br />
Et que la syntaxe de la commande est plutôt :<br />
<br />
<span style="color: red;">exec sp_configure 'user instances enabled', '1'</span><br />
<br />
pas besoin du Go ... Have fun !<br />
<h2>
Autres lectures sur le sujet </h2>
<a href="http://stackoverflow.com/questions/20865437/the-configuration-option-user-instances-enabled-does-not-exist" target="_blank">http://stackoverflow.com/questions/20865437/the-configuration-option-user-instances-enabled-does-not-exist</a><br />
The problem is known issue. SQL Express cannot create a user instance using the set of engine files in your local app data folder, deleting them should allow sql server to recreate them with the correct credentials for you to F5 successfully.b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0tag:blogger.com,1999:blog-5083598187147927449.post-26739223035274198732013-02-28T07:16:00.001-08:002019-12-11T01:46:47.114-08:00Prevent saving changes that require the table to be re-createdJ'ai créé une Base de Données dans un projet Visual Studio 2010 avec le Server Explorer mais je dois faire une modification de définition de ma nouvelle Base de Données mais je n'arrive pas à sauvegarder cette modification. Cet imbécile de SQL Server s'entête à me renvoyer un message :<br />
<br />
Saving changes is not permitted. The changes you have made resuire the following tables to be dropped and re-created. You have either made changes to a table that can't bo re-created or enable the option Prevent saving changes that requires the table to be re-created.<br />
<br />
<u><b>Requirements :</b></u> Visual Studio 2010, SQL Express, Visual Studio 2019<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvzj7n4fCW8bbGYGABMaeVfW4cTzWY99cTrH2K4A1-8d65JhKV_5FuRf9fwCqH7Bp8skzELHq47dOssgKuNrx6JFr5WFYyFkht_nUo62lZpNUnOVgm904ks-ai7B_X29rTu_8MVkNLnK6P/s1600/2019-12-10_15h12_27.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Saving changes is not permitted. The changes you have made resuire the following tables to be dropped and re-created. You have either made changes to a table that can't bo re-created or enable the option Prevent saving changes that requires the table to be re-created." border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvzj7n4fCW8bbGYGABMaeVfW4cTzWY99cTrH2K4A1-8d65JhKV_5FuRf9fwCqH7Bp8skzELHq47dOssgKuNrx6JFr5WFYyFkht_nUo62lZpNUnOVgm904ks-ai7B_X29rTu_8MVkNLnK6P/s1600/2019-12-10_15h12_27.png" title="Saving changes is not permitted. The changes you have made resuire the following tables to be dropped and re-created. You have either made changes to a table that can't bo re-created or enable the option Prevent saving changes that requires the table to be re-created." /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The changes you have made resuire the following tables to be dropped and re-created. </td></tr>
</tbody></table>
Et en 2019, c'est toujours valable !<br />
<br />
Je crois que le plus idiot de ce truc c'est que le message de cette textbox n'est pas copiable pour pouvoir googooliser le plus rapidement possible.<br />
<h2>
Problème, impossible de sauver les modifications</h2>
Je modifie un clef d'index primaire :<br />
Identity Specification :<br />
Is Identity : Yes<br />
Identity Increment : 1<br />
<br />
Et au moment de sauvegarder mes modifications c'est la catastrophe :<br />
<br />
<br />
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGO39eJH9llxcxhNs2_jswFBYeGSaSioukqBMDh7UkyhKrSkDNPv1TRYHRMBSTeWVWrMWKyE6eU4-AsDO-ogG0DVbdfczIiKRl1zrvDx2Wk-EhtUrWyrPR0ynoSKhAu9oJH1NixjKUjGqu/s1600/2013-02-28_11h17_33.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Prevent saving changes that require table re-creation" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGO39eJH9llxcxhNs2_jswFBYeGSaSioukqBMDh7UkyhKrSkDNPv1TRYHRMBSTeWVWrMWKyE6eU4-AsDO-ogG0DVbdfczIiKRl1zrvDx2Wk-EhtUrWyrPR0ynoSKhAu9oJH1NixjKUjGqu/s1600/2013-02-28_11h17_33.png" title="Prevent saving changes that require table re-creation" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Problème au moment de sauver les modifications de ma Base de Données SQL Server</td></tr>
</tbody></table>
</div>
<h2>
Solution : décocher la case "Prevent saving changes"</h2>
<strong><u>Cette option se trouve dans le Menu :</u></strong> <br />
<br />
Tools -> Article : Options -> Database Tools -> Table and Database Designers :<br />
Décocher la case : Prevent saving changes that require table re-creation<br />
<br />
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzEfTcEBK_WZ9vdnwwPfXsPxYURhS5jpfHBi84h7Pj4zh4ux_hc4DCleOtvzgkTHvB9Nom35diAiplhT2AimTPXAHz5D2Zzw8KkzNp60IxvwyKi1tWSqgGRwVHEvSzls1rmJW4X9alJigf/s1600/2013-02-28_11h19_02.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Tools, Options, Database Tools" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzEfTcEBK_WZ9vdnwwPfXsPxYURhS5jpfHBi84h7Pj4zh4ux_hc4DCleOtvzgkTHvB9Nom35diAiplhT2AimTPXAHz5D2Zzw8KkzNp60IxvwyKi1tWSqgGRwVHEvSzls1rmJW4X9alJigf/s1600/2013-02-28_11h19_02.png" title="SQL Server des options cachées" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Les options de Visual Studio qui me permettent de modifier ma Base de Données SQL Server</td></tr>
</tbody></table>
</div>
Oui mais au moment où je cherche cette option dans mon <strong><span style="color: #0b5394;">MS Management Studio 2019</span></strong> je ne la trouve plus ! Grrrr<br />
<br />
<strong><u>En 2019 cette option existe encore et se trouve déplacée ici :</u></strong> <br />
<br />
Tools -> Options -> Designers -> Table and Database Designers <br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ-AL93bUG34NAhnMKQz_ZgSd82rEt3YqwUKJ5acgiywTFG_hfRhUAJOV_O0ZbYiD7zttNyrgTV2am3xR8KHX4zXHC_nf7694JyKbWxGaNJEbJzezn01T65aSEEgoJJTVpnSSPCKTgokwW/s1600/2019-12-10_15h21_51.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="You have either made changes to a table that can't bo re-created or enable the option Prevent saving changes that requires the table to be re-created." border="0" height="373" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ-AL93bUG34NAhnMKQz_ZgSd82rEt3YqwUKJ5acgiywTFG_hfRhUAJOV_O0ZbYiD7zttNyrgTV2am3xR8KHX4zXHC_nf7694JyKbWxGaNJEbJzezn01T65aSEEgoJJTVpnSSPCKTgokwW/s640/2019-12-10_15h21_51.png" title="You have either made changes to a table that can't bo re-created or enable the option Prevent saving changes that requires the table to be re-created." width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">You have either made changes to a table that can't bo re-created or enable the option Prevent saving changes that requires the table to be re-created.</td></tr>
</tbody></table>
<br />
<h2>
Conclusion :</h2>
L'administration et la configuration des Bases de Données SLQ Server sont rendue difficiles par tout un tas d'options dont on ne devrait jamais avoir à se préoccuper ...<br />
<br />
<u>Attention :</u> Une fois les modifications apportées à la base de données, il faut refaire les objets attachés à cette base, je pense notamment aux objets "Linq To Sql" ou "Entity Models" ...<br />
b.rabyhttp://www.blogger.com/profile/11781368703681519987noreply@blogger.com0