Model, Component, and Package Management > Model management > Model Explorer > Command line interface - ScfUtils > Finding and optionally deleting orphaned items through ScfUtils (Model Explorer)
  
Finding and optionally deleting orphaned items through ScfUtils (Model Explorer)
ScfUtils provides a command line interface for performing Model Explorer functions. For a complete list of ScfUtils functions, refer to Command line interface for models neighborhood functions
Occasionally an item can become orphaned in a database, for example, when a database crashes during a transaction.
Through ScfUtils, you can find orphaned items in a database, and optionally delete those orphaned items.
Important: Before running the findorphans command against a Database, ensure that there are no users using any of the models in that Database. You must be an administrator of the Database to run the findorphans command.
The findorphans command returns the following parameters:
The number of orphaned items that were found by the findorphans command.
The number of orphaned items that were deleted by the findorphans command.
The number of errors that were encountered by the findorphans command.
The name and location of the log file that was created by the findorphans command.
If you have installed Modeler to the default locations, ScfUtils resides in the following location:
C:\Program Files (x86)\PTC Integrity Modeler\Modeler\Exe\SCFUtils.exe
Syntax:
ScfUtils -findorphans Enterprise \\SQL\<server>@<instance>\<database>" [-D]
Where:
<server> specifies the name of the server on which the Database resides. The case of the name must be correct.
<database> specifies the name of the Database for which you want to find orphaned items. The case of the name must be correct.
-D specifies that found orphaned items are to be deleted.
Example:
ScfUtils -findorphans Enterprise "\\SQL\MyServer@MODELER\MyDatabase -D