To defragment table indexes, run the RiskFabric DB Maintenance Weekly job. First, confirm the job exists by following this procedure:
- Open SQL Server Management Studio (SSMS)
- Connect to the Database Engine hosting the RiskFabric database
- In Object Explorer, navigate to SQL Server Agent > Jobs
- Locate the job RiskFabric DB Maintenance Weekly
- If the job exists, run the job manually by following the next procedure
- If the job does not exist, select File > New > Query with Current Connection from the menu bar
A new query editor window will open
- Copy the following statement and paste it in the new query editor window:
EXEC RiskFabric.dbo.spRF_PostDeploy_AlwaysRun;
- Execute the statement by pressing the F5 key, clicking the Execute button in the SQL Editor toolbar, or selecting Query > Execute from the menu bar
To run the RiskFabric DB Maintenance Weekly job manually, follow this procedure:
- Open SSMS
- Connect to the Database Engine hosting the RiskFabric database
- In Object Explorer, navigate to SQL Server Agent > Jobs
- Right-click the job RiskFabric DB Maintenance Weekly and select Start Job at Step
The Start Job on '<server-name[\<instance-name>]' window will open
- Ensure Step ID 1 is highlighted and click the Start button
In addition to running the job, confirm the job is enabled and configured to run at least weekly by following this procedure:
- Open SSMS
- Connect to the Database Engine hosting the RiskFabric database
- In Object Explorer, navigate to SQL Server Agent > Jobs
- Right-click the job RiskFabric DB Maintenance Weekly and select Enable (if available)
- Right-click the job RiskFabric DB Maintenance Weekly and select Properties
The Job Properties - RiskFabric DB Maintenance Weekly window will open
- Select the Schedules page
- Review the schedules listed and edit as needed by selecting the job to edit and clicking the Edit button
- Click the OK button to close the Job Properties window