cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Database fragmentation levels

Y1251
Level 4

HI, 

I have email and file archiving server, most of time the below message will show in admin console that EV mail archiving DB have database fragmentation levels, may I know which table meet fragmentation levels and fix it?

================================================================================

Database fragmentation levels

41561 Index fragmentation was detected after scan at '6/6/2022 5:07 AM'. Disregard this warning if you have defragmented the listed indexes since.

Fragmentation warning for indexes of 'EVMAILVault_6' on SQL server instance 'EVDB1'.

1 table(s) have one or more indexes with a fragmentation level of more than 30%.

The 'EVMAILVault_6' database is crucial to the operation of Enterprise Vault.

2 REPLIES 2

Marcde
Moderator
Moderator
Partner    VIP    Accredited

Hi, 

you can use this one here for example:

 

USE <Database>
SELECT OBJECT_NAME(i.object_ID) AS TableName,
i.name AS TableIndexName, phystat.avg_fragmentation_in_percent
FROM sys.dm_db_index_physical_stats(DB_ID(),Null,NULL,NULL, 'Limited') phystat
Join sys.indexes i on i.object_id = phystat.object_id AND i.index_id = phystat.index_id
WHERE phystat.avg_fragmentation_in_percent > 30 AND phystat.page_count > 1000

 

Regards

Marc

PMCS GmbH & Co. KG - A Serviceware Company
www.serviceware.de

Tonaco_pt
Moderator
Moderator
Partner    VIP    Accredited