Clearing data from the system

The clearData task can remove data that is stored in both the search index and the Information Store database. You can use this task to remove test data from a system.

In a multiple server deployment, run the clearData and clearSearchIndex tasks from the Liberty server.

In a deployment that provides high availability, stop and start each Liberty server in your environment but run clearData and clearSearchIndex on the Liberty server that you used to create the database only.

Important: These instructions are designed to remove data that is used for test purposes. Do not use the task to clear data in a production system without backing up your data. For more information about backing up your data, see Backing up a deployment.
  1. On the Liberty server, in a command prompt navigate to the toolkit\scripts directory.
  2. Stop the deployment:
    setup -t stopLiberty
  3. To clear data and the search index, run the following command:
    setup -t clearData --hostname
    • Where liberty.hostname is the hostname of the Liberty server where you are running the command, and matches the value for the host-name attribute of the <application> element in the topology.xml file.
    • A message is displayed when you run the task to confirm that you want to complete the action. Enter Y to continue. The data and the search index are removed from the system.

    If you run the clearData task with the --scripts argument, the scripts for clearing the Information Store database are generated in the toolkit\scripts\database\<database dialect>\InfoStore\generated\clearData directory, but not run. You can then inspect the scripts before they are run, or run the scripts yourself. To run the scripts yourself, run them in their numbered order to clear the data from your system.

    To generate the scripts for the task, run:
    setup -t clearData --scripts
    After you run the scripts manually, clear the search index:
    setup -t clearSearchIndex --hostname
  4. Start the deployment of i2 Analyze.
    setup -t startLiberty