Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by wfvdijk
»
Check status of HEAP tables
Check status of HEAP tables
Rate Topic
Display Mode
Topic Options
Author
Message
Wilfred van Dijk
Wilfred van Dijk
Posted Tuesday, March 09, 2010 6:35 PM
SSC Eights!
Group: General Forum Members
Last Login: Wednesday, March 06, 2013 12:56 AM
Points: 898,
Visits: 1,045
Comments posted to this topic are about the item
Check status of HEAP tables
Wilfred
The best things in life are the simple things
Post #879857
gserdijn
gserdijn
Posted Thursday, March 18, 2010 2:22 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, April 23, 2013 8:00 AM
Points: 1,065,
Visits: 698
Thanks, it helped me to spot a potential problem that I was yet unaware of.
Dutch Anti-RBAR League
Post #885309
Mark D Powell
Mark D Powell
Posted Thursday, March 18, 2010 1:20 PM
Ten Centuries
Group: General Forum Members
Last Login: Thursday, May 16, 2013 2:00 PM
Points: 1,255,
Visits: 340
I have not read all the code yet but doesn't #db03632 need to be defined somewhere?
Mark D Powell
Post #885848
JStiney
JStiney
Posted Thursday, March 18, 2010 1:47 PM
SSC Journeyman
Group: General Forum Members
Last Login: Friday, November 02, 2012 7:05 AM
Points: 75,
Visits: 446
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?
Post #885875
Mark D Powell
Mark D Powell
Posted Thursday, March 18, 2010 1:51 PM
Ten Centuries
Group: General Forum Members
Last Login: Thursday, May 16, 2013 2:00 PM
Points: 1,255,
Visits: 340
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 --
Post #885880
SQLRNNR
SQLRNNR
Posted Thursday, March 18, 2010 1:56 PM
SSCoach
Group: General Forum Members
Last Login: Thursday, May 16, 2013 1:46 PM
Points: 18,732,
Visits: 12,329
Mark D Powell (3/18/2010)
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 --
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.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #885883
SQLRNNR
SQLRNNR
Posted Thursday, March 18, 2010 1:57 PM
SSCoach
Group: General Forum Members
Last Login: Thursday, May 16, 2013 1:46 PM
Points: 18,732,
Visits: 12,329
JStiney (3/18/2010)
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?
Use something like notepad++ to remove the unprinted characters.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #885884
SQLRNNR
SQLRNNR
Posted Thursday, March 18, 2010 1:58 PM
SSCoach
Group: General Forum Members
Last Login: Thursday, May 16, 2013 1:46 PM
Points: 18,732,
Visits: 12,329
Last comment for the moment. I like the principle of this script. Nice idea and it looks like it could be very helpful.
Thanks.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #885885
Wilfred van Dijk
Wilfred van Dijk
Posted Thursday, March 18, 2010 4:20 PM
SSC Eights!
Group: General Forum Members
Last Login: Wednesday, March 06, 2013 12:56 AM
Points: 898,
Visits: 1,045
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 1
In 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:
begin try
drop table #db03632
end try
begin catch
-- dummy
end catch
Regarding the "Strange characters": that's a result of different charactersets
. As suggested, copy code into an editor and remove the goofy characters
Wilfred
The best things in life are the simple things
Post #885968
Federico Iori
Federico Iori
Posted Tuesday, March 23, 2010 8:35 AM
SSC Rookie
Group: General Forum Members
Last Login: Monday, April 15, 2013 1:33 AM
Points: 31,
Visits: 261
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=1
Another method is to create a clustered index on the table, then dropping the index
Federico Iori
Post #888166
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.