<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>T-SQL</title><link>http://sqlserver.ro/forums/15/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/816.aspx</link><pubDate>Thu, 09 Nov 2006 11:04:25 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:816</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/816.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=816</wfw:commentRss><description>&lt;p&gt;Cred ca era vorba de TerraServer &lt;a href="http://www.terraserver.microsoft.com/about.aspx?n=AboutTechSql"&gt;http://www.terraserver.microsoft.com/about.aspx?n=AboutTechSql&lt;/a&gt;&lt;/p&gt;&lt;p&gt;SQL Server 2005 are propria functie de hash -&amp;nbsp;&lt;span id="nsrTitle"&gt;HashBytes.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/814.aspx</link><pubDate>Thu, 09 Nov 2006 09:07:59 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:814</guid><dc:creator>pmoldovan</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/814.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=814</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://sqlserver.ro/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;xmldeveloper:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; &lt;p&gt;Aruncati o privire aici: &lt;a class="l" href="http://msdn2.microsoft.com/en-us/library/ms187467.aspx"&gt;&lt;strong&gt;&lt;font color="#0000cc"&gt;Understanding Federated Database Servers&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Articolul asta e destul de vag, nu prea intra in detalii. Pentru a arata cat de &amp;quot;tare&amp;quot; e SQL Server 2000, Microsoft a realizat o implementare cu servere multiple care la vremea respectiva (2000) era cea mai mare baza de date expusa pe Internet (daca nu ma insel 140TB) si continea o vasta colectie de fotografii realizate de satelitii NASA. Iata cum se face concret o asemenea implementare:&lt;/p&gt;&lt;p&gt;- Se defineste baza de date principala (front-end server)&amp;nbsp;pe SQL Server Enterprise Edition (singurul care suporta Indexed Views), cu un calcul atent de planning&amp;nbsp;astfel incat acest server&amp;nbsp;sa poata gazdui tabelele mici, indecsii tabelei principale si un TEMPDB &amp;quot;generos&amp;quot;;&lt;/p&gt;&lt;p&gt;- Se defineste baza de date pe cateva servere secundare (back-end servers), si se implementeaza acolo doar tabela principala, apoi aceste servere se declara ca linked servers in serverul principal; aici Microsoft a folosit tot Enterprise Edition (ca merge mai bine si nu a trebuit sa-si cumpere licente), dar in principiu putem sa folosim si editii mai ieftine;&lt;/p&gt;&lt;p&gt;- Se declara pe serverul front-end un Indexed View care concateneaza datele tabelei principale distribuite pe serverele back-end si care e folosit pe post de tabela principala&amp;nbsp;in aplicatie.&lt;/p&gt;&lt;p&gt;- Se implementeaza un algoritm de hashing prin care sa se decida pe care din serverele back-end trebuie sa stea un anume rand din tabela principala (la n servere valorile hash sunt 0..n-1);&lt;/p&gt;&lt;p&gt;-&amp;nbsp;Se declara pe Indexed View triggere INSTEAD OF INSERT, INSTEAD OF UPDATE si INSTEAD OF DELETE, care folosing algoritmul de hashing de mai sus delega respectiva operatie serverului back-end responsabil cu respectivul rand de date.&lt;/p&gt;&lt;p&gt;Trebuie sa remarcam ca aceasta implementare nu scaleaza orizontal prea grozav: nu putem sa mai adaugam inca un server back-end cand vrem noi, pentru ca asta implica schimbarea algoritmului de hash si ar necesita salvarea si re-incarcarea datelor.&amp;nbsp;Putem totusi dubla numarul de servere si muta jumatate din date pe serverele noi, dar asta implica oricum operatii manuale si script-uri custom.&lt;/p&gt;&lt;p&gt;De asemenea, SQL Server nu e prea &amp;quot;tare&amp;quot; in calcule sau manipulari de string-uri, asa ca calcularea hash-ului pune unele probleme in SQL Server 2000 (Microsoft a folosit o procedura &amp;quot;extinsa&amp;quot;, adica scrisa in C++, ca sa evite penalitatile de performanta); aici vestea buna e ca in SQL Server 2005 aceasta problema se poate rezolva elegant implementand algoritmul de hash intr-o functie .NET.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/338.aspx</link><pubDate>Thu, 12 Oct 2006 12:08:52 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:338</guid><dc:creator>cretzu</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/338.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=338</wfw:commentRss><description>&lt;p&gt;Multumesc pentru informatii si linkuri.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Daniel&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/323.aspx</link><pubDate>Wed, 11 Oct 2006 15:29:02 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:323</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/323.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=323</wfw:commentRss><description>&lt;p&gt;In plus SQL Express nu mai are limitarea de utilizatori.&lt;/p&gt;&lt;p&gt;In MSDE peste 5 conexiuni simultane performanta este limitata. &lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/sqlexpress/archive/2004/07/01/171005.aspx"&gt;http://blogs.msdn.com/sqlexpress/archive/2004/07/01/171005.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/319.aspx</link><pubDate>Wed, 11 Oct 2006 12:00:21 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:319</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/319.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=319</wfw:commentRss><description>&lt;p&gt;Desigur, la SQL 2005, limitarile de performanta de care vorbeam aici sunt mai putin restrictive ca la MSDE de exemplu, dimensiunea maxima&lt;br /&gt;&lt;/p&gt;&lt;p&gt;a bazei de date a crescut la 4 Gb (de aceea sugeram un calcul al dimensionii celor 1 milion de randuri care sa respecte acest lucru).&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/318.aspx</link><pubDate>Wed, 11 Oct 2006 11:07:51 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:318</guid><dc:creator>cretzu</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/318.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=318</wfw:commentRss><description>Vreau sa va intreb, ar fi mai bine ca in loc de MSDE sa folosesc SQL 2005 Express, tinand cont de performanta?? Mai ales ca MSDE nu este obligatoriu sa faca parte din acest sistem distribuit.&lt;br /&gt;</description></item><item><title>Re: fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/317.aspx</link><pubDate>Wed, 11 Oct 2006 11:03:52 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:317</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/317.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=317</wfw:commentRss><description>&lt;p&gt;Va dau o idee: duceti o parte din randuri (din numarul de 1 milion) pe o baza de date de pe MSDE (tinand cont si de limitarile de performanta), si anume pe acelea rar folosite sau de data veche (istoricul) si apoi construiti linked servers pe SS2005 care trebuie sa fie motorul principal al sistemului dvs.&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/311.aspx</link><pubDate>Wed, 11 Oct 2006 07:55:48 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:311</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/311.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=311</wfw:commentRss><description>&lt;p&gt;Aruncati o privire aici: &lt;a class="l" href="http://msdn2.microsoft.com/en-us/library/ms187467.aspx"&gt;&lt;strong&gt;&lt;font color="#0000cc"&gt;Understanding Federated Database Servers&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>fragmentarea orizontala a unui tabel</title><link>http://sqlserver.ro/forums/thread/308.aspx</link><pubDate>Wed, 11 Oct 2006 06:41:59 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:308</guid><dc:creator>cretzu</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/308.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=15&amp;PostID=308</wfw:commentRss><description>&lt;p&gt;Salut,&lt;/p&gt;&lt;p&gt;Sunt nou pe aci, si am venit cu o intrebare, deja :). Incerc sa fac ceva teste folosing un sistem distribuit format pentru inceput dintr-un SQL Server 2005 si un MSDE. Vreau sa fac o partitionare orizontala a unui tabel cu cam 1 mil de inregistrari ce exista pe SQL Server 2005, sa zicem in 2-3 bucati. Faza ce ma intereseaza este ca cum as putea sa creez unul dintre fragmente direct pe MSDE-ul care este legat ca si linked server. Am incercat cu functiile create partition function si create partition scheme dar nu imi rezolva problema pentru ca le creaza tot la nivel de SQL Server 2005. &lt;/p&gt;&lt;p&gt;Vreau sa stiu daca procedez corect, si daca nu as dori o sugestie despre felul in care as putea sa fac o astfel de fragmentare orizontala pe 2 sau mai multe servere de SQL si apoi pentru clienti sa fie absolut transparent chestia de fragmentare.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Merci mult,&lt;/p&gt;&lt;p&gt;Daniel.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>