Automate the search for invalid objects in a database from the command line
Last modified: March 28, 2025
dbForge SQL Complete supports a command-line interface, which means you can automate the search for invalid objects in a database from the command line.
Find invalid objects from the command line
To run the Command Line in Windows 11:
From the Windows taskbar
- Right-click the taskbar at the bottom of the screen and then select Run or click Start or press the Windows key on your keyboard to open the Start menu.
- Type cmd or Command Prompt in the search bar.
- Select the Command Prompt app from the search results to open it.
Using shortcut keys
- Press the Windows + R keys to show the Run command window.
- In the window that opens, type cmd and press Enter.
To access the dbForge SQL Complete functionality from the command line, navigate to the sqlcomplete.com file, located in the installation folder of the tool. The default installation folder is C:\Program Files (x86)\Devart\dbForge SQL Complete.
cd "C:\Program Files (x86)\Devart\dbForge SQL Complete"
To find invalid objects from the command line, execute the /findinvalidobjects
command by replacing the arguments with your actual data. The command finds any objects referencing other objects that were dropped and no longer exist in the database:
sqlcomplete.com /findinvalidobjects [/option_name1[:value | [parameter1:value parameter2:value ..]] /option_name2 ..]
Get help
To get quick help on the arguments available in the command line, type the following:
sqlcomplete.com /?
To get detailed information about each command-line operation, execute the following command and specify the required option value sqlcomplete.com /option_name /?
. For example, sqlcomplete.com /findinvalidobjects /?
.
Troubleshooting
You may face the following error while looking for invalid objects in databases with more than 5,000 objects:
Could not find a part of the path 'C:\Users\User1\AppData\Local\Temp\Devart\691f7f39ac7f43da86.tmp'
The root cause of this issue is the restricted temporary file usage.
Possible reason | How to fix |
There was not enough space on disk C:\ to create temporary files. | Create the C:\Users%WinUser%\AppData\Local\Temp\Devart folder manually. |
Saving the temporary file might have failed due to timeout caused by antivirus. | Turn off antivirus. |
Restricted access to the Devart folder for the user who launches SSMS. | Make sure all the users have both Read and Write permissions. |