<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Newsequentialid (Histrory/Benefits and Implementation)</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx</link><description>In general, we made significant improvements in SQL Server scalability during Yukon . One of the areas of improvement is replication scalability. While doing merge replication testing we found out that scaling was severely affected by high number of I/O</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Newsequentialid (Histrory/Benefits and Implementation)</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#1175755</link><pubDate>Thu, 30 Nov 2006 06:49:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1175755</guid><dc:creator>mobilebilly</dc:creator><description>&lt;p&gt;We are considering to use the OS function UuidCreateSequential to generate the key at the client side.&lt;/p&gt;
&lt;p&gt;As you said the implementation of the newsequentialid in Sql Server 2005 scramble the result from UuidCreateSequential, is there any issue with that approach? &lt;/p&gt;
&lt;p&gt;Is there any detail information about the scrambling?&lt;/p&gt;
</description></item><item><title>A Class that Creates Sequential GUIDs</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#1367030</link><pubDate>Wed, 27 Dec 2006 05:26:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1367030</guid><dc:creator>Scott Bellware [MVP]</dc:creator><description>&lt;p&gt;My current project uses GUID primary keys in a SQL Server 2005 database. The primary keys are created&lt;/p&gt;
</description></item><item><title>re: Newsequentialid (Histrory/Benefits and Implementation)</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#1552747</link><pubDate>Mon, 29 Jan 2007 23:19:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1552747</guid><dc:creator>BSovers</dc:creator><description>&lt;p&gt;It is frustrating implementing NewSequentialID() as a default value within a table (though that is the ONLY place it CAN be used). &amp;nbsp;Every time I try it, SQL SMS keeps giving an &amp;quot;Error validating the default for column...&amp;quot; message each time I attempt to apply it.&lt;/p&gt;
</description></item><item><title>re: Newsequentialid (Histrory/Benefits and Implementation)</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#1669738</link><pubDate>Tue, 13 Feb 2007 18:34:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1669738</guid><dc:creator>MorningZ</dc:creator><description>&lt;p&gt;Any luck ever getting around the validating error?&lt;/p&gt;
</description></item><item><title>NewSequentialId() in C#</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#3999607</link><pubDate>Sun, 22 Jul 2007 18:27:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3999607</guid><dc:creator>Hugo Ribeiro</dc:creator><description>&lt;p&gt;A colleague pointed me to this code that implements NewSequentialId() in C#: &lt;a rel="nofollow" target="_new" href="http://codebetter.com/blogs/scott.bellware/archive/2006/12/27/156671.aspx"&gt;http://codebetter.com/blogs/scott.bellware/archive/2006/12/27/156671.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Newsequentialid (Histrory/Benefits and Implementation)</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#4082710</link><pubDate>Fri, 27 Jul 2007 19:14:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4082710</guid><dc:creator>zootie</dc:creator><description>&lt;p&gt;Scott Bellware's c# implementation over on codebetter (link above) only calls the underlying OS function. However, SQL 2005's implementation does some byte re-ordering after calling the same function, and if you want the sequential GUIDs to be &amp;quot;compatible&amp;quot;, you'd have to do the same operations on the client side. You can see the reordering in the source code of yaflaGUID (&lt;a rel="nofollow" target="_new" href="http://www.yafla.com/dforbes/stories/2005/10/17/yaflaguid.html"&gt;http://www.yafla.com/dforbes/stories/2005/10/17/yaflaguid.html&lt;/a&gt;). You'd have to translate the assembly code to c#. In essence you call UuidCreateSequential (as Scott does), then invoke ToByteArray, swap bytes 0 &amp;amp; 3, 1 &amp;amp; 2, 4 &amp;amp; 5 and 6 &amp;amp; 7, and create a new GUID from the byte array.&lt;/p&gt;
</description></item><item><title>re: Newsequentialid (Histrory/Benefits and Implementation)</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#4634628</link><pubDate>Thu, 30 Aug 2007 00:46:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4634628</guid><dc:creator>KCCE</dc:creator><description>&lt;p&gt;I posted a C# implementation that handles the byte reordering as a comment to Scott Bellware's Blog post. &lt;/p&gt;
&lt;p&gt;Go to Scott's blog entry (link above) and look in the comments for the c# snippet. This will produce a guid that is equivalent to SQL's newSequentialID(). I did place the external definition to UuidCreateSequential() in a SafeNativeMethods class that is not included in the snippet.&lt;/p&gt;
&lt;p&gt;cheers.&lt;/p&gt;
&lt;p&gt;Kendall&lt;/p&gt;
</description></item><item><title>re: Newsequentialid (Histrory/Benefits and Implementation)</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#5475355</link><pubDate>Tue, 16 Oct 2007 23:59:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5475355</guid><dc:creator>ShaneAKenyon</dc:creator><description>&lt;p&gt;The validation error seems to be a SQL Studio bug. &amp;nbsp;You can still save the table (after accepting the error _again_), using the function as the default value. &amp;nbsp;Thanks Scott and Kendall for your code - I will be working on a NHibernate generator for this and hopefully post it to my blog soon.&lt;/p&gt;
</description></item><item><title>re: Newsequentialid (Histrory/Benefits and Implementation)</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#7537804</link><pubDate>Fri, 08 Feb 2008 12:52:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7537804</guid><dc:creator>ha-man</dc:creator><description>&lt;p&gt;Just an observation on the re-ordering of bytes in the implementation of newsequentialid. I understand fully why this must be performed to adhere to the ordering algorithm in SQL Server. &lt;/p&gt;
&lt;p&gt;But as I understand it this changes the algorithm version for generating the guid from 1 (which is what UuidCreateSequential uses), to whatever is currently the 2nd highest 4 bits of the time (currently D on my system).&lt;/p&gt;
&lt;p&gt;Am I correct in assuming that this is currently not a problem in practice because (i.e. it will not cause clashes with other algorithms because):&lt;/p&gt;
&lt;p&gt;1) There is no standardized algorithm which has been assigned D, E or F as version number&lt;/p&gt;
&lt;p&gt;2) The 2nd highest 4 bits of the time will not wrap around to a lower value any time soon.&lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;
</description></item><item><title>Unraveling the mysteries of NewSequentialID</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#8421989</link><pubDate>Thu, 24 Apr 2008 18:56:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8421989</guid><dc:creator>Technical Thoughts of Jorriss</dc:creator><description>&lt;p&gt;A few months ago we started development on a new system. From the ground up we redesigned everything&lt;/p&gt;
</description></item><item><title>Unraveling the mysteries of NewSequentialID</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#9016720</link><pubDate>Sun, 26 Oct 2008 18:06:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9016720</guid><dc:creator>Technical Thoughts of Jorriss</dc:creator><description>&lt;p&gt;Unraveling the mysteries of NewSequentialID&lt;/p&gt;
</description></item><item><title>Sequential GUID i SQL Server og i .NET</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#9609073</link><pubDate>Wed, 13 May 2009 13:15:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9609073</guid><dc:creator>creave.dk</dc:creator><description>&lt;p&gt;Sequential GUID i SQL Server og i .NET&lt;/p&gt;
</description></item><item><title>GUID Ordering in SQL Server</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#9640466</link><pubDate>Mon, 25 May 2009 16:38:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9640466</guid><dc:creator>Martin Bell UK SQL Server MVP</dc:creator><description>&lt;p&gt;When creating client-side guids to be stored in SQL Server things are not as simple as you expect...&lt;/p&gt;
</description></item><item><title> SQL Programmability amp API Development Team Blog Newsequentialid | Weak Bladder</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#9705423</link><pubDate>Mon, 08 Jun 2009 04:22:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9705423</guid><dc:creator> SQL Programmability amp API Development Team Blog Newsequentialid | Weak Bladder</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://weakbladder.info/story.php?id=387"&gt;http://weakbladder.info/story.php?id=387&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> SQL Programmability amp API Development Team Blog Newsequentialid | Toe Nail Fungus</title><link>http://blogs.msdn.com/sqlprogrammability/archive/2006/03/23/559061.aspx#9721412</link><pubDate>Wed, 10 Jun 2009 05:15:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9721412</guid><dc:creator> SQL Programmability amp API Development Team Blog Newsequentialid | Toe Nail Fungus</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://toenailfungusite.info/story.php?id=4164"&gt;http://toenailfungusite.info/story.php?id=4164&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>