<?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>Identity Insert and SQL Server 2005 Import Export Wizard</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx</link><description>Have you ever run the SQL 2005 Server Import Export Wizard and noticed the identity values for the destination table are renumbered? The SQL 2005 Server Import Export Wizard setting " Enable identity insert " is ignored when selecting "Optimize for Many</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Identity Insert and SQL Server 2005 Import Export Wizard</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#652174</link><pubDate>Fri, 30 Jun 2006 15:02:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:652174</guid><dc:creator>mroku</dc:creator><description>Hi!&lt;br&gt;I'm afraid your workaround doesn't work. When you try to copy data from multiple tables joined by foreign keys you will get missing key errors if you don't use &amp;quot;Optimize for many tables&amp;quot; option.&lt;br&gt;&lt;br&gt;My impression over SSIS is very very poor. So far everything I try to do with it doesn't work at all or doesn't work as expected.&lt;br&gt;</description></item><item><title>re: Identity Insert and SQL Server 2005 Import Export Wizard</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#656057</link><pubDate>Tue, 04 Jul 2006 18:36:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:656057</guid><dc:creator>da9l</dc:creator><description>I've encountered this problem as well and I'd really like to get it fixed. &lt;br&gt;&lt;br&gt;To make microsoft fix this, please vote for feedback item 135905 at connect.microsoft.com under the SQL server feedback connection!&lt;br&gt;&lt;br&gt;/Daniel</description></item><item><title>re: Identity Insert and SQL Server 2005 Import Export Wizard</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#686979</link><pubDate>Thu, 03 Aug 2006 01:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:686979</guid><dc:creator>zlusc</dc:creator><description>I don't think the &amp;quot;Optimize for many tables&amp;quot; causing that trouble. I tried many times even only import one table, the default setting still keep Enable identity insert unchecked. It is really annoying.</description></item><item><title>re: Identity Insert and SQL Server 2005 Import Export Wizard</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#1523793</link><pubDate>Thu, 25 Jan 2007 00:55:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1523793</guid><dc:creator>e6matt</dc:creator><description>&lt;p&gt;I am exporting from SQL 2005 to SQL 2000. I am only doing one table with &amp;quot;Optimize for many tables&amp;quot; unchecked. &amp;quot;Enable Identity Insert&amp;quot; is also checked for the single table I am copying. The preview correctly shows the Primary Key column jumping from 71 to 73 (I deleted a row). However, after running the export the SQL 2000 table has an entry for 71 and 72. It doesn't matter what is checked, this always happens. Is there another way around?&lt;/p&gt;
</description></item><item><title>re: Identity Insert and SQL Server 2005 Import Export Wizard</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#4312347</link><pubDate>Thu, 09 Aug 2007 20:04:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4312347</guid><dc:creator>bruce.parker</dc:creator><description>&lt;p&gt;I needed to copy a complete database from 2005 to 2000&lt;/p&gt;
&lt;p&gt;This is how I did it - Assuming the table(s) you need in 2000 are all created with indexes, constraints etc but contain no data.&lt;/p&gt;
&lt;p&gt;Run the following on the 2000 database&lt;/p&gt;
&lt;p&gt;exec sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'&lt;/p&gt;
&lt;p&gt;exec sp_msforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL'&lt;/p&gt;
&lt;p&gt;Then use the export wizard on 2005, &lt;/p&gt;
&lt;p&gt;select all tables and views&lt;/p&gt;
&lt;p&gt;Edit Mappings and check the Enable Identity Insert box&lt;/p&gt;
&lt;p&gt;UN check the Optimise for many tables box&lt;/p&gt;
&lt;p&gt;Deselect ALL the views so that it is only tables that are copied&lt;/p&gt;
&lt;p&gt;Run the export ignoring the warning&lt;/p&gt;
&lt;p&gt;After the export is complete&lt;/p&gt;
&lt;p&gt;Run the following on the 2000 database&lt;/p&gt;
&lt;p&gt;exec sp_msforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL'&lt;/p&gt;
&lt;p&gt;exec sp_msforeachtable 'ALTER TABLE ? ENABLE TRIGGER ALL'&lt;/p&gt;
&lt;p&gt;This has ceratinly worked on the table I was having trouble with - I still need to check the rest but it is looking promising&lt;/p&gt;
&lt;p&gt;I hope this helps&lt;/p&gt;
</description></item><item><title>SQL Server 2005: Import / Export reset identity keys&amp;#8230; no workaround&amp;#8230; 2005 sucks period, the end &amp;laquo; Rip&amp;#8217;s Domain</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#5232006</link><pubDate>Tue, 02 Oct 2007 03:24:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5232006</guid><dc:creator>SQL Server 2005: Import / Export reset identity keys… no workaround… 2005 sucks period, the end « Rip’s Domain</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://rip747.wordpress.com/2007/10/01/sql-server-2005-import-export-reset-identity-keys-no-workaround-2005-sucks-period-the-end/"&gt;http://rip747.wordpress.com/2007/10/01/sql-server-2005-import-export-reset-identity-keys-no-workaround-2005-sucks-period-the-end/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Identity Insert and SQL Server 2005 Import Export Wizard</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#6386330</link><pubDate>Mon, 19 Nov 2007 05:50:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6386330</guid><dc:creator>fcsobel</dc:creator><description>&lt;p&gt;After spending a day fighting with this I learned about SqlBulkCopy from a post on David Hayden’s blog and created this quick app to get around the problem.&lt;/p&gt;
&lt;p&gt;It can copy data and keep identity and nulls intact. Used with the generate script wizard you can make a complete database copy as long as you have sql access.&lt;/p&gt;
&lt;p&gt;It’s like having the SQL 2000 wizard back:)&lt;/p&gt;
&lt;p&gt;You can get it here:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://projects.c3o.com/files/3/plugins/entry11.aspx"&gt;http://projects.c3o.com/files/3/plugins/entry11.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>identity insert</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#8657586</link><pubDate>Thu, 26 Jun 2008 21:10:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8657586</guid><dc:creator>identity insert</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://rocky.finestmatingstories.com/identityinsert.html"&gt;http://rocky.finestmatingstories.com/identityinsert.html&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | Patio Chairs</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#9688658</link><pubDate>Wed, 03 Jun 2009 05:26:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9688658</guid><dc:creator> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | Patio Chairs</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://patiochairsite.info/story.php?id=29980"&gt;http://patiochairsite.info/story.php?id=29980&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | fire pit</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#9747474</link><pubDate>Sun, 14 Jun 2009 06:22:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9747474</guid><dc:creator> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | fire pit</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://firepitidea.info/story.php?id=924"&gt;http://firepitidea.info/story.php?id=924&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | unemployment office</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#9759828</link><pubDate>Tue, 16 Jun 2009 11:03:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9759828</guid><dc:creator> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | unemployment office</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://unemploymentofficeresource.info/story.php?id=15616"&gt;http://unemploymentofficeresource.info/story.php?id=15616&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | fix my credit</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#9764969</link><pubDate>Wed, 17 Jun 2009 05:29:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9764969</guid><dc:creator> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | fix my credit</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://fixmycrediteasily.info/story.php?id=17580"&gt;http://fixmycrediteasily.info/story.php?id=17580&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | patio umbrella</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#9772481</link><pubDate>Thu, 18 Jun 2009 07:00:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9772481</guid><dc:creator> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | patio umbrella</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://patioumbrellasource.info/story.php?id=1755"&gt;http://patioumbrellasource.info/story.php?id=1755&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | garden decor</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#9781537</link><pubDate>Fri, 19 Jun 2009 10:14:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9781537</guid><dc:creator> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | garden decor</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://gardendecordesign.info/story.php?id=5147"&gt;http://gardendecordesign.info/story.php?id=5147&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | porch swing</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#9781877</link><pubDate>Fri, 19 Jun 2009 10:30:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9781877</guid><dc:creator> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | porch swing</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://fancyporchswing.info/story.php?id=2248"&gt;http://fancyporchswing.info/story.php?id=2248&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | patio set</title><link>http://blogs.msdn.com/chrissk/archive/2006/06/24/645968.aspx#9784761</link><pubDate>Fri, 19 Jun 2009 13:15:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9784761</guid><dc:creator> Troubleshooting Microsoft SQL Server Identity Insert and SQL Server | patio set</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://patiosetsite.info/story.php?id=95"&gt;http://patiosetsite.info/story.php?id=95&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>