Skip to main content
Version: On prem: 15.0.0

Data Object Cleanup tool

The Data Object Cleanup tool can “reset” the database and clean it while the database still maintains all the needed structure. You can use this tool during the implementation phase, before setting up the development environment, and/or when using the transport system.

note

To write the log and save the settings, the Windows user who runs the application must have read/write permissions in the /bin folder of Omada Enterprise.

Prerequisites

Before you can use the Data Object Cleanup tool, you must:

  1. Set the connection string to your database.
  2. Start the tool and prepare the settings.

Setting the connection string

You should set the connection string on the Windows Registry according to your configuration.

Open the Registry Editor and go to HKEY_LOCAL_MACHINE\SOFTWARE\Omada\Omada Enterprise\{version number} in the registry to set the connection string key – ConnStr.

info

Make sure the connection string is not set to the production database.

Running the Data Object Cleanup tool

To run the Data Object Cleanup tool, go to Start > Run, and enter the path of the .exe file. In a standard installation, the location of the .exe file is C:\Program Files\Omada Identity Suite\Enterprise Server 12\website\bin\DataObjectCleanup.exe.

Defining the Data Object Cleanup tool settings

To define the settings for the Data Object Cleanup tool, go to Application > Settings and the Settings dialog opens. Remember to save your settings by using Save or Apply to use them again.

SettingDescription
CustomerThis is for the Customer name for the Enterprise Server instance on which the deletion takes place.

To find the Customer name in Enterprise Server, go to Setup > Administration > More. Click License to see the Customer's name.
User NameThe user name field must be a valid Enterprise Server user name.
ViewIDYou can choose to delete data objects in a particular view. Specify the Integer Id of the view in this field to delete objects based on a view.
Apply Access ModifierThis is an option to enable or disable the access modifier defined in the view.

* Enabled: Selected objects are only deleted if they are within the scope of the access modifier on the view.
* Disabled: Cleared objects are deleted if they are within the scope of the view.
Deleted StatusThere are three possible values for this field:

* Not Deleted: When selected, the tool only deletes objects that are not marked as deleted in Enterprise Server.
* Deleted: When selected, the tool only purges the data objects that are marked as deleted.
* Both: When selected, the tool purges objects regardless of whether they are deleted in the Enterprise Server.
Purge DeletedThis checkbox is only available when the deleted status is set to Not Deleted. When it is selected, the data objects are purged from Enterprise Server. Otherwise, the data objects are only marked as deleted.
Sequence ResetRepresents the number to which the numbering sequence of the data objects of any type is reset. The number represents the minimum value to which the sequence should be reset. If some objects of a certain type should not be deleted, the sequence for that data object type is reset to the maximum sequence number still found in the system + 1, if the maximum sequence number is greater than the selected number.
Skip IDsIn this textbox, you can specify a comma-separated list of data objects that must not be deleted.
Transaction CommitThe number of deletes per call to the database. Transaction commit allows for running small transactions, avoiding transactions that span minutes or hours.

Connecting to the database

To establish a connection to your database, go to Application > Connect to Database. If you connect successfully, you are returned to the Data Object Cleanup tool dialog.

tip

If you get a connection error message, check the ConnStr setting in the Windows Registry.

Select objects for cleanup

When you have defined the relevant settings, you can select the data to be cleaned in your database:

  1. To select data, click Add. The Data Object Type Select dialog opens.

  2. Go through the data type you want to clean up and click Add Selected.

    info

    The cleanup tool doesn't delete special objects such as Users and User Groups.

    See the Arguments section below for information on the available options.

Using Data Object Cleanup tool as a console application

You can use the Data Object Cleanup tool as a console application with the inclusion of arguments. This allows you to create scheduled tasks or scripts.

You can check the results in the log file called DataObjectCleanupLog.txt.

Command

The syntax of the command is as follows:

DataObjectCleanup /ids id1[,id2[,id3…]] [/delstatus deleted|notdeleted|both] [/nopurge] [/seq sequenceNumber] [/skip id1[,id2[,id3…]]]

The following is an example of using this command:

DataObjectCleanup /ids 1000000,1000001 /delstatus both /seq 100 skip 1000124,1000125

Arguments

The arguments for the DataObjectCleanup command are listed in the following table:

ArgumentDescription
/idsData object type IDs

You must specify the relevant IDs. They must be followed by a comma-separated list of integers.
/delstatusDeleted Status

Specifies the deleted status.

If you use this argument, it must be followed by one of the values: deleted, notdeleted, or both.
/nopurgePurge Data Objects

Specifies whether the data objects are purged or just marked as deleted.
/seqSequence Number

Specifies the number to which the sequence should be reset. If you use this argument, it must be followed by an integer.
/skipSkip Ids

Specifies a comma-separated list of data object IDs to be skipped from deletion. If you use this argument, it must be followed by a comma-separated list of integers.