<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.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>Search results matching tags 't-sql', 'Business Intelligence', and 'SQL Server'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=t-sql,Business+Intelligence,SQL+Server&amp;orTags=0</link><description>Search results matching tags 't-sql', 'Business Intelligence', and 'SQL Server'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>SET IDENTITY_INSERT little bug(?)</title><link>http://sqlblog.com/blogs/davide_mauri/archive/2009/09/30/set-identity-insert-little-bug.aspx</link><pubDate>Wed, 30 Sep 2009 05:52:22 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:17083</guid><dc:creator>manowar</dc:creator><description>&lt;p&gt;While I was working on a package to incrementally load a dimension in the DWH I’m developing for a customer, I stumbled upon a tricky little bug (I think, I still have to have a response from MS) that had – and will have – a little impact on how I create my packages.&lt;/p&gt;  &lt;p&gt;I’ve found that, when working on an &lt;em&gt;empty&lt;/em&gt; table that has an &lt;em&gt;identity&lt;/em&gt; column, if you insert a value forcing the &lt;em&gt;identity&lt;/em&gt; value, the next time SQL Server will generate the identity value, it will generate it missing one number. So, for example, you’ll have&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="1"&gt;     &lt;tr&gt;       &lt;td&gt;0&lt;/td&gt;        &lt;td&gt;(Forced Identity Value)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;2&lt;/td&gt;        &lt;td&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;3&lt;/td&gt;        &lt;td&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;instead of having the correct sequence&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;0&lt;/td&gt;        &lt;td&gt;(Forced Identity Value)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;1&lt;/td&gt;        &lt;td&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;2&lt;/td&gt;        &lt;td&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Not a huge problem as you can see, but I’d like to see it fixed, since can cause little troubles if your forgot about it and you expect to have predictable &lt;em&gt;identity&lt;/em&gt; values. I know that identity values are usually not 100% predictable, but I find them useful to speed-up SSIS package development for loading dimensions tables while keeping package complexity low. Since I apply &lt;a href="http://agilemanifesto.org/principles.html"&gt;Agile Principles&lt;/a&gt; to BI, simplicity is fundamental, since it allows me to change package quickly, easily embracing changes that comes from refactoring or from customer new needs. &lt;/p&gt;  &lt;p&gt;You can find the connect item to vote here:&lt;/p&gt;  &lt;p&gt;&lt;a title="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=492452" href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=492452"&gt;https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=492452&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>