<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Tom's weblog</title>
	<atom:link href="http://www.thestidhams.com/tom/wp/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thestidhams.com/tom/wp</link>
	<description>Tom's notes of what is happening and the computers I use</description>
	<lastBuildDate>Mon, 16 Jan 2012 08:51:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Drop all foreign keys by Kristof Elst</title>
		<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/comment-page-1/#comment-47767</link>
		<dc:creator>Kristof Elst</dc:creator>
		<pubDate>Mon, 16 Jan 2012 08:51:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/#comment-47767</guid>
		<description>Thanks for your article.

Here&#039;s another way to do it, without resorting to a blighted cursor.

http://www.sentientbeings.com/2012/01/drop-all-foreign-keys-on-a-database-and-optionally-drop-all-tables/</description>
		<content:encoded><![CDATA[<p>Thanks for your article.</p>
<p>Here&#8217;s another way to do it, without resorting to a blighted cursor.</p>
<p><a href="http://www.sentientbeings.com/2012/01/drop-all-foreign-keys-on-a-database-and-optionally-drop-all-tables/" rel="nofollow">http://www.sentientbeings.com/2012/01/drop-all-foreign-keys-on-a-database-and-optionally-drop-all-tables/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop all foreign keys by rajendra.more999@hotmail.com</title>
		<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/comment-page-1/#comment-47396</link>
		<dc:creator>rajendra.more999@hotmail.com</dc:creator>
		<pubDate>Sat, 12 Nov 2011 11:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/#comment-47396</guid>
		<description>Thanks Really working ...</description>
		<content:encoded><![CDATA[<p>Thanks Really working &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ABC News fail by your lovely wife</title>
		<link>http://www.thestidhams.com/tom/wp/2011/09/16/abc-news-fail/comment-page-1/#comment-46843</link>
		<dc:creator>your lovely wife</dc:creator>
		<pubDate>Sat, 17 Sep 2011 23:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2011/09/16/abc-news-fail/#comment-46843</guid>
		<description>True.  It is astounding to me how often the reporters don&#039;t really understand the subject or people they are reporting on. Earlier this month a news story from the same network had a reporter interviewing a young transgender person. The reporter clearly had no understanding of what transgender means, nor the ability to follow what the interviewee was saying.  A shame that the reporter couldn&#039;t be bother to do the simplest homework before the interview, and was more interested in the prurient than in the important. A bigger shame that the editors at the network aren&#039;t previewing and checking national reports for accuracy.</description>
		<content:encoded><![CDATA[<p>True.  It is astounding to me how often the reporters don&#8217;t really understand the subject or people they are reporting on. Earlier this month a news story from the same network had a reporter interviewing a young transgender person. The reporter clearly had no understanding of what transgender means, nor the ability to follow what the interviewee was saying.  A shame that the reporter couldn&#8217;t be bother to do the simplest homework before the interview, and was more interested in the prurient than in the important. A bigger shame that the editors at the network aren&#8217;t previewing and checking national reports for accuracy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop all foreign keys by tom</title>
		<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/comment-page-1/#comment-46830</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Sat, 17 Sep 2011 00:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/#comment-46830</guid>
		<description>Going to have try this script next time this problem comes up, thanks!</description>
		<content:encoded><![CDATA[<p>Going to have try this script next time this problem comes up, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop all foreign keys by Noor</title>
		<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/comment-page-1/#comment-46342</link>
		<dc:creator>Noor</dc:creator>
		<pubDate>Fri, 15 Jul 2011 13:34:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/#comment-46342</guid>
		<description>Its better to disable foreign keys. If you want to disable all constraints in the database just run this code:
-- disable all constraints
EXEC sp_msforeachtable &quot;ALTER TABLE ? NOCHECK CONSTRAINT all&quot;

-- enable all constraints
exec sp_msforeachtable @command1=&quot;print &#039;?&#039;&quot;, @command2=&quot;ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all&quot;</description>
		<content:encoded><![CDATA[<p>Its better to disable foreign keys. If you want to disable all constraints in the database just run this code:<br />
&#8211; disable all constraints<br />
EXEC sp_msforeachtable &#8220;ALTER TABLE ? NOCHECK CONSTRAINT all&#8221;</p>
<p>&#8211; enable all constraints<br />
exec sp_msforeachtable @command1=&#8221;print &#8216;?&#8217;&#8221;, @command2=&#8221;ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop all foreign keys by Arno</title>
		<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/comment-page-1/#comment-46337</link>
		<dc:creator>Arno</dc:creator>
		<pubDate>Wed, 13 Jul 2011 05:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/#comment-46337</guid>
		<description>Added some brackets for the &quot;weird&quot; table names:

--ENJOY
DECLARE @sqlForeignKeys VARCHAR(MAX)

SELECT @sqlForeignKeys = ISNULL(@sqlForeignKeys,&#039;&#039;) +
&#039;ALTER TABLE dbo.[&#039; + OBJECT_NAME(FK.parent_object_id) + &#039;] DROP CONSTRAINT [&#039; + FK.name + &#039;];&#039; + CHAR(10)
FROM SYS.FOREIGN_KEYS FK

PRINT(@sqlForeignKeys)
--EXEC(@sqlForeignKeys)</description>
		<content:encoded><![CDATA[<p>Added some brackets for the &#8220;weird&#8221; table names:</p>
<p>&#8211;ENJOY<br />
DECLARE @sqlForeignKeys VARCHAR(MAX)</p>
<p>SELECT @sqlForeignKeys = ISNULL(@sqlForeignKeys,&#8221;) +<br />
&#8216;ALTER TABLE dbo.[' + OBJECT_NAME(FK.parent_object_id) + '] DROP CONSTRAINT [' + FK.name + '];&#8217; + CHAR(10)<br />
FROM SYS.FOREIGN_KEYS FK</p>
<p>PRINT(@sqlForeignKeys)<br />
&#8211;EXEC(@sqlForeignKeys)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Washington&#8217;s newest teacher! by the graduate...</title>
		<link>http://www.thestidhams.com/tom/wp/2011/06/09/washingtons-newest-teacher/comment-page-1/#comment-46291</link>
		<dc:creator>the graduate...</dc:creator>
		<pubDate>Wed, 06 Jul 2011 02:14:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2011/06/09/washingtons-newest-teacher/#comment-46291</guid>
		<description>It&#039;s OFFICIALLY over!!!

My teaching certificates arrived, and the transcript (online) shows everything is complete.  The diploma is &quot;in the mail.&quot; 

And I am ready to CELEBRATE!!!!!</description>
		<content:encoded><![CDATA[<p>It&#8217;s OFFICIALLY over!!!</p>
<p>My teaching certificates arrived, and the transcript (online) shows everything is complete.  The diploma is &#8220;in the mail.&#8221; </p>
<p>And I am ready to CELEBRATE!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Washington&#8217;s newest teacher! by the graduate...</title>
		<link>http://www.thestidhams.com/tom/wp/2011/06/09/washingtons-newest-teacher/comment-page-1/#comment-46080</link>
		<dc:creator>the graduate...</dc:creator>
		<pubDate>Sat, 11 Jun 2011 14:56:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2011/06/09/washingtons-newest-teacher/#comment-46080</guid>
		<description>YIPPEE!!!!!</description>
		<content:encoded><![CDATA[<p>YIPPEE!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop all foreign keys by Timmy</title>
		<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/comment-page-1/#comment-45703</link>
		<dc:creator>Timmy</dc:creator>
		<pubDate>Tue, 17 May 2011 07:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/#comment-45703</guid>
		<description>-- ENJOY
DECLARE @sqlForeignKeys VARCHAR(MAX)

SELECT @sqlForeignKeys = ISNULL(@sqlForeignKeys,&#039;&#039;) +
	&#039;ALTER TABLE dbo.&#039; + OBJECT_NAME(FK.parent_object_id) + &#039; DROP CONSTRAINT &#039; + FK.name + &#039;;&#039; + CHAR(10)
FROM SYS.FOREIGN_KEYS FK

PRINT(@sqlForeignKeys)
--EXEC(@sqlForeignKeys)</description>
		<content:encoded><![CDATA[<p>&#8211; ENJOY<br />
DECLARE @sqlForeignKeys VARCHAR(MAX)</p>
<p>SELECT @sqlForeignKeys = ISNULL(@sqlForeignKeys,&#8221;) +<br />
	&#8216;ALTER TABLE dbo.&#8217; + OBJECT_NAME(FK.parent_object_id) + &#8216; DROP CONSTRAINT &#8216; + FK.name + &#8216;;&#8217; + CHAR(10)<br />
FROM SYS.FOREIGN_KEYS FK</p>
<p>PRINT(@sqlForeignKeys)<br />
&#8211;EXEC(@sqlForeignKeys)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop all foreign keys by chris</title>
		<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/comment-page-1/#comment-45510</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Wed, 04 May 2011 02:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/#comment-45510</guid>
		<description>Combining ideas [1] and [7]

DECLARE @fkdel varchar(512)
DECLARE FkCrsr CURSOR FOR
	SELECT &#039;ALTER TABLE [&#039; + TABLE_SCHEMA + &#039;].[&#039; + TABLE_NAME +
	 &#039;] DROP CONSTRAINT [&#039; + CONSTRAINT_NAME +&#039;]&#039;
	 FROM information_schema.table_constraints
	 WHERE CONSTRAINT_TYPE = &#039;FOREIGN KEY&#039;

open FkCrsr
fetch next from FkCrsr into @fkdel
while @@FETCH_STATUS = 0
begin
	print @fkdel
	exec (@fkdel)
	fetch next from FkCrsr into @fkdel
end

close FkCrsr
deallocate FkCrsr
go</description>
		<content:encoded><![CDATA[<p>Combining ideas [1] and [7]</p>
<p>DECLARE @fkdel varchar(512)<br />
DECLARE FkCrsr CURSOR FOR<br />
	SELECT &#8216;ALTER TABLE [' + TABLE_SCHEMA + '].[' + TABLE_NAME +<br />
	 '] DROP CONSTRAINT [' + CONSTRAINT_NAME +']&#8216;<br />
	 FROM information_schema.table_constraints<br />
	 WHERE CONSTRAINT_TYPE = &#8216;FOREIGN KEY&#8217;</p>
<p>open FkCrsr<br />
fetch next from FkCrsr into @fkdel<br />
while @@FETCH_STATUS = 0<br />
begin<br />
	print @fkdel<br />
	exec (@fkdel)<br />
	fetch next from FkCrsr into @fkdel<br />
end</p>
<p>close FkCrsr<br />
deallocate FkCrsr<br />
go</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.531 seconds -->

