Use the following command in the SQL query window to run the fragmentation computation stored procedure:
USE [EnterpriseVaultDirectory]
GO
DECLARE @IndexScanMode AS NVARCHAR(20)
DECLARE @PageCountFilter AS smallint
SELECT @PageCountFilter = settingValueNumeric
FROM [dbo].[ExtendedSetting]
WHERE [settingTypeId] = 9801
SELECT @IndexScanMode = [settingValueText]
FROM [dbo].[ExtendedSetting]
WHERE [settingTypeId] = 9802
USE
EXEC [dbo].[ComputeFragmentation]
@ConfigurationScanMode = @IndexScanMode,
@PageCount = @PageCountFilter,
@ComputerName = NULL,
@RunNow = 1
GO
where,
is the name of the Directory, Vault Store or Fingerprint database of which fragmentation computation to be done
Examples:
o To compute fragmentation of ‘EnterpriseVaultDirectory’ database:
USE [EnterpriseVaultDirectory]
GO
DECLARE @IndexScanMode AS NVARCHAR(20)
DECLARE @PageCountFilter AS smallint
SELECT @PageCountFilter = settingValueNumeric
FROM [dbo].[ExtendedSetting]
WHERE [settingTypeId] = 9801
SELECT @IndexScanMode = [settingValueText]
FROM [dbo].[ExtendedSetting]
WHERE [settingTypeId] = 9802
EXEC [dbo].[ComputeFragmentation]
@ConfigurationScanMode = @IndexScanMode,
@PageCount = @PageCountFilter,
@ComputerName = NULL,
@RunNow = 1
GO
o To compute fragmentation of Vault Store database named ‘EVVSExpressVaultStore_1’:
USE [EnterpriseVaultDirectory]
GO
DECLARE @IndexScanMode AS NVARCHAR(20)
DECLARE @PageCountFilter AS smallint
SELECT @PageCountFilter = settingValueNumeric
FROM [dbo].[ExtendedSetting]
WHERE [settingTypeId] = 9801
SELECT @IndexScanMode = [settingValueText]
FROM [dbo].[ExtendedSetting]
WHERE [settingTypeId] = 9802
USE [EVVSExpressVaultStore_1]
EXEC [dbo].[ComputeFragmentation]
@ConfigurationScanMode = @IndexScanMode,
@PageCount = @PageCountFilter,
@ComputerName = NULL,
@RunNow = 1
GO