Fix indexes

dbForge Index Manager allows fixing SQL indexes by rebuilding or reorganizing them visually or generating SQL scripts for future use.

To fix indexes:

1. In the Index Manager: [database_name] document, navigate to the Action required section and select the index(es) you want to fix.

2. Click Fix. The result is then shown in the Result column of the Action required section of the document.

Fix Index

Generate a script

For a deep analysis of index fragmentation, Index Manager can automatically generate a T-SQL script to run it against a database immediately. Then, you can save the script of the fragmented index that requires frequent rebuilding or reorganization for future use.

To generate a script:

1. In the Action required section, select the index(es) you want to generate a script for and then click Script Changes.

2. By default, the script opens in a new SQL document. If you want to copy the script to clipboard, select the corresponding item from the Script Changes dropdown list.

Script generation

Save the scan results

Index Manager allows saving scan results for further use, such as automating and scheduling scanning of fragmented indexes tasks. The settings are kept in a .sql file.

The asterisk next to the .sql file name means that the file has not been saved yet. To save the file, click the cross icon on the tab. In the pop-up window suggesting you save the changes, click Yes. Alternatively, click Save on the standard toolbar or press Ctrl+S.