﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by wfvdijk  / Check status of HEAP tables / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 05:36:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>Is possible to rebuild an heap simply by using : alter table tt rebuild partition=all(x) ,avalaible in Sqlserver 2008, online operation. In SqlServer2005 is possible to use my script , published on sqlservercentral, rebuild_partition .It should work for a nonpartitioned table giving there partition_number=1Another method is to create a clustered index on the table, then dropping the indexFederico Iori</description><pubDate>Tue, 23 Mar 2010 08:35:11 GMT</pubDate><dc:creator>Federico Iori</dc:creator></item><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>Regarding the temptable: I use the @toggle flag to determine if the temptable is already created or not.In the first loop, @toggle=0 and a "select into" is used to create the table. @toggle is also set to 1In the next loops, @toggle=1, resulting in an "insert into"If you want to be sure this table doesn't exist, add this code before the cursor declaration:[code]begin try   drop table #db03632end trybegin catch-- dummyend catch[/code]Regarding the "Strange characters": that's a result of different charactersets :crazy: . As suggested, copy code into an editor and remove the goofy characters</description><pubDate>Thu, 18 Mar 2010 16:20:36 GMT</pubDate><dc:creator>Wilfred van Dijk</dc:creator></item><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>Last comment for the moment.  I like the principle of this script.  Nice idea and it looks like it could be very helpful.Thanks.</description><pubDate>Thu, 18 Mar 2010 13:58:20 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>[quote][b]JStiney (3/18/2010)[/b][hr]I would like to run your script, but I get invalid characters in blank spaces when I copied it out of the window and ran it in Management Studio.  What is the easiest way to fix for this?[/quote]Use something like notepad++ to remove the unprinted characters.</description><pubDate>Thu, 18 Mar 2010 13:57:29 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>[quote][b]Mark D Powell (3/18/2010)[/b][hr]I copied it into notepad and used the edit/replace option to replace a copy/paste of the stupid little squate box to space.  That seemed to work but I got an error when I tried to exectue the script complaigning #db03632 does not exist.I will have took look into the temp table definition later.HTH -- Mark D Powell --[/quote]It looks like the temp table is either an insert into or select into based on the if condition.  This should probably be changed so that the an existence check for the temp table is performed prior to that if condition.</description><pubDate>Thu, 18 Mar 2010 13:56:53 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>I copied it into notepad and used the edit/replace option to replace a copy/paste of the stupid little squate box to space.  That seemed to work but I got an error when I tried to exectue the script complaigning #db03632 does not exist.I will have took look into the temp table definition later.HTH -- Mark D Powell --</description><pubDate>Thu, 18 Mar 2010 13:51:38 GMT</pubDate><dc:creator>Mark D Powell</dc:creator></item><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>I would like to run your script, but I get invalid characters in blank spaces when I copied it out of the window and ran it in Management Studio.  What is the easiest way to fix for this?</description><pubDate>Thu, 18 Mar 2010 13:47:33 GMT</pubDate><dc:creator>JStiney</dc:creator></item><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>I have not read all the code yet but doesn't #db03632 need to be defined somewhere?Mark D Powell</description><pubDate>Thu, 18 Mar 2010 13:20:31 GMT</pubDate><dc:creator>Mark D Powell</dc:creator></item><item><title>RE: Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>Thanks, it helped me to spot a potential problem that I was yet unaware of.</description><pubDate>Thu, 18 Mar 2010 02:22:20 GMT</pubDate><dc:creator>gserdijn</dc:creator></item><item><title>Check status of HEAP tables</title><link>http://www.sqlservercentral.com/Forums/Topic879857-1009-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Administration/69761/"&gt;Check status of HEAP tables&lt;/A&gt;[/B]</description><pubDate>Tue, 09 Mar 2010 18:35:05 GMT</pubDate><dc:creator>Wilfred van Dijk</dc:creator></item></channel></rss>