Dropping and Re-Registering Tables if Necessary

Search Knowledge Base by Keyword

< Back

The DROP tables action will delete the Tables and Indexes in your target database. These would have been registered by the TABLES and GetKeys actions and created in the target database by the PREPENV Action.

You will only drop the Tables and Indexes if a mistake has been made. For instance, if you have accidentally specified the wrong Source or Staging Database. Typically, you will not need to Drop and Re-Register tables to perform Subsetting iteratively. You can instead begin your next Subset by Truncating the existing Data Subset.

If you notice a mistake in your Tables Sheet or ForeignKeys Sheet, you will need to perform the DROP Action before you can re-register them.

To run DROP, 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 specify “DROP” for  -parAction=””:

Data Subsetting

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

You can also specify optional parameters at this stage.

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

Run the script to delete the Tables and Indexes from the Staging Database.

Check your Database to make sure the Tables and Indexes have gone.

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

Next, update your Configuration sheet in your Control Spreadsheet to specify the correct Source Database and Schema, and the correct Target Database and Schema.

Next, re-register the metadata and create the tables and indexes in your target database. Re-perform the following actions to do so:

  1. TABLES
  2. GetKeys
  3. PREPENV