DELETEORPHANS removes any rows in the Staging Database that do not fulfil Foreign Key constraints. This is useful if FoundCriteria have been specified. In this instance, the SUBSET action will stop crawling up and down database tables when the Found Criteria are fulfilled. There might then be "orphan" rows that have been collected by the SUBSET.

An "orphan" row occurs when data is collected, but a SUBSET terminates before the associated data needed to fulfil Foreign Key constraints is collected.

By removing "orphan" rows, DELETEORPHANS enables you to retain the referential integrity of your Data Subset.

To run DELETEORPHANS, open The VIP Server Controller from your desktop or start menu. You must open it as an administrator. If The VIP Server Controller is already running, make sure the relevant .vip workflows are Put in Memory. See this article for instructions.

Next, complete the mandatory parameters in the "Run Flow" tab. If working from a Config file created for the current Subset, you should only need to update the parAction argument and enter any additional optional parameters. You will need to update the location of the Subset Report and SQLActionsPath if these have changed. See this article for instructions on working with a Config file.



Complete any optional parameters. See this Knowledge Base article for a full list of Arguments and example parameters.

Once you have parameterized the DELETEORPHANS Action, make sure your Configuration Spreadsheet, Subset Report and Log file are all shut. Next, click "Create File" and then click "Start" to run the action.

In the output dialogue, you will see "Flow execution completed on remote server. Please check logs for details." once the DELETEORPHANS Action is complete":

If you receive an error message in your output dialogue or log, please refer to this article to troubleshoot common issues. You can also run your Action on debug mode for a more detailed log. You can also check the Log File and Subset Report at this stage, to check that the Actions have performed correctly.

Run DELETEORPHANS from the Command Line

To run DELETEORPHANS from the Command Line, first open your re-usable .cmd script in a text editor.

If you have already configured a .cmd script for one Subset Action and wish to edit and re-use that script, you should only need to set "DELETEORPHANS" for "Action".

Otherwise, configure all mandatory parameters in the .cmd script.

You can also specify optional parameters for the Action.

Make sure your Control Spreadsheet, the Subset Report, and any Log Files are closed.

Run the script to remove the specified Primary Keys from your Staging Database.

Check the Log File and Subset Report at this stage, to check that the Actions have performed correctly.