August 4, 2005 at 5:38 am
In the Jan 2004 edition of SQL 200O BOL Example E for DBCC ShowContig is a script that works through the tables of the database logging the results of ShowContig and if fragmentation exceeds a certain amount it runs a DBCC INDEXDEFRAG.
Firstly the script is inefficient
Secondly I think that there is an error in it.
WHERE LogicalFrag >= @maxfrag appears to be an error, surely it should be ScanDensity?
August 5, 2005 at 9:35 am
I'm sure that I've read before that the example of the in BOL has a bug, if your change fixes it then good for you.
August 8, 2005 at 2:05 pm
That's not the first and definitely not the last ... I've seen 'foo bar' in BOL provided code since v6.0 !
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
August 18, 2005 at 11:01 am
Hi, where can I find this BOL. The script is just what I want, I do not mind it has a bug or two.
August 18, 2005 at 11:23 am
Try searching for LogicalFrag in BOL, it responds with DBCC SHOWCONTIG. I believe it's example "E".
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
August 30, 2005 at 1:51 am
It might not be in the version of BOL that comes with the SQL2000 CD. An updated to BOL is available as a free download from Microsoft.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply