You can automate index management using the command line. This page provides a list of the switches you can use with the dbForge Index Manager command line.
To access help regarding the available command line arguments, use the following command:
indexmanager.com /?
For more information on each command-line operation, run the following command and specify the required option value indexmanager /option_name /?
. For example, indexmanager /analyzeindex /?
.
Note
To run the Command Line in Windows 11:
From the Windows taskbar
- Right-click the taskbar at the bottom of the screen and select Run. Alternatively, select Start or press Windows on the keyboard to open the Start menu.
- In the Search bar, enter cmd or Command Prompt.
- Select Command Prompt from the search results.
Using shortcut keys
- Press Windows + R to open the Run command window.
- In the window that opens, enter cmd and press Enter.
indexmanager [/argfile:path] [/option_name1[:value | [parameter1:value parameter2:value ..]] /option_name2 ..]
The first argument for datacompare is usually an operation switch that corresponds to the operation that you want to perform with the application.
1. Specify the operation you want to perform and the required parameters and arguments (actions you want to run) in the Command Prompt, for example as follows:
"C:\Program Files\Devart\dbForge SQL Tools Professional\dbForge Index Manager for SQL Server\indexmanager.com" /analyzeindex /?
2. Press ENTER to run the process.
Switch | Description and usage |
---|---|
/argfile | Specifies a path to the command line arguments file. Options specified via the command line have higher priority than the options given in the file. Usage: /argfile:<path> |
/activate | Activates the product using the activation key. |
/deactivate | Deactivates the product. |
/analyzeindex | Analyzes and fixes indexes fragmentation. |
/quiet (/q) | Hides all messages in console mode. |
Argument | Description and usage |
---|---|
/exitcodes | Returns a list of possible exit codes that can be returned by the command-line process. |
/key | Specifies the activation key. Usage: /activate /key:<activation_key> |
Argument | Description and usage |
---|---|
/exitcodes | Returns a list of possible exit codes that can be returned by the command-line process. |
Argument | Description and usage |
---|---|
/connection | Specifies a connection string. Usage: /connection:<connection_string> |
/database | Specifies a database to manage indexes in. Usage: /database:<value> |
/exitcodes | Returns a list of possible exit codes that can be returned by the command-line process. |
/fixindexes | Specifies a path to the rebuild.sql file. Usage: /fixindexes:<path> If the path is specified, the rebuild script will be analyzed and generated in <path>rebuild.sql . If the path is not specified, indexes will be analyzed and fixed right in a database. |
/indexrebuildonline | Overrides the “Online” global option. Usage: /indexrebuildonline:<On|Off> |
/minindexsize | Specifies the minimum index size in pages and overrides the global option. Usage: /minindexsize:<value> |
/password | Specifies a password and overrides the password specified in the connection string. Usage: /password:<pw> |
/rebuildthreshold | Specifies rebuild the fragmentation threshold in % and overrides the global option. Usage: /rebuildthreshold:<value> |
/reorganizethreshold | Specifies the fragmentation threshold in % and overrides the global option. Usage: /reorganizethreshold:<value> |
/report | Generates index report in the CSV format. Usage: /report:<path>|<filename> |
/tempdbsort | Overrides the “Sort in tempdb” global option. Usage: /tempdbsort:<On|Off> |