Sunday, March 11, 2012

defrag system objects/tables

Hi,
I used the DBCC SHOWCONTIG on a database and it shows :
DBCC SHOWCONTIG scanning 'sysobjects' table...
Table: 'sysobjects' (1); index ID: 1, database ID: 8
TABLE level scan performed.
- Pages Scanned........................: 4
- Extents Scanned.......................: 4
- Extent Switches.......................: 3
- Avg. Pages per Extent..................: 1.0
- Scan Density [Best Count:Actual Count]......: 25.00% [1:4]
- Logical Scan Fragmentation ..............: 25.00%
- Extent Scan Fragmentation ...............: 75.00%
- Avg. Bytes Free per Page................: 2817.5
- Avg. Page Density (full)................: 65.19%
so i tried to defrag this particular table
using DBCC INDEX command
but got this error DBCC INDEXDEFRAG cannot be used on system table indexes
as you might have noticed the logical/exten scan fragmentation is quite high ,
in this case how can i do a defrag across the whole database including those
system tables/objects ? and do i need to do it offline/online ?
apreciate ur advice
tks & rdgs
Message posted via http://www.droptable.com
hi,
maxzsim via droptable.com wrote:
> Hi,
> I used the DBCC SHOWCONTIG on a database and it shows :
> DBCC SHOWCONTIG scanning 'sysobjects' table...
> Table: 'sysobjects' (1); index ID: 1, database ID: 8
> TABLE level scan performed.
> - Pages Scanned........................: 4
> - Extents Scanned.......................: 4
as you already have been reported, you can not "reindex" system tables...
anyway the report you got is not that drammatic...
you have 4 pages in mixed extents as the object does not fill a full extent
as well...
so keep your house keeping tasks on user objects only...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.16.0 - DbaMgr ver 0.61.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

No comments:

Post a Comment