Database Inconsistency Remediation Commands

As an AAI administrator, you can run the Database Inconsistency Remediation script to quickly and safely remediate common database issues that can prevent AAI from fully initializing. Using this script eliminates having to query the database directly and fix these data inconsistencies yourself. Furthermore, you can run the script without having to log in to your database or contact your DBA.

Note:

If you are using a version of AAI that is older than 6.4.2-2, this script is not available. However, you can run the script commands manually. For information, see the Broadcom knowledge base article 205932 at https://knowledge.broadcom.com/external/article/205932/aai-database-inconsistency-queries-for-w.html.

What can cause database inconsistencies?

Database inconsistencies can occur when database read/wrties are interrupted because the AAI server shut down abruptly or the connection to the AAI database was broken while AAI was processing updates.

Such an unexpected interruption can create references to either non-existent data or null data in your database, a state in which AAI cannot fully initialize. The database inconsistency remediation tool checks for and cleans up these references.

What are signs of database inconsistencies?

When the AAI server is unable to fully initialize, these are some typical signs that indicate that the reason is one or more database inconsistencies:

  • The startup log has a warning about invalid data found.

  • The QueryTimingService messages show repeated INFO messages about most of the time spent in DB/API operations that are caused by possible multiple threads/overlapping queries.

  • The jaws.log contains WARNING messages about JobRunIds that do not exist in a specific table.  

  • The jaws.log contains an ERROR that the JammerManager has been interrupted because the CurrentState table cannot be read.

Running the Data Inconsistency Command

  1. Stop the AAI service that controls the AAI server. For information, see Stopping, Starting, Restarting the AAI Server.

  2. Go to the command prompt of your operating system.

  3. Change the directory to the config directory in the AAI installation directory.

    For example, to C:\Automic_Automation_Intelligence\<release_package>\config

  4. Enter the following command:

    java -Dswing.aatext=true -jar config.jar datainconsistency --remediate <Full_path_to_AAI_Installation_directory>\jboss>

    For example, if your AAI installation (Automic_Automation_Intelligence) is in the directory with the currently installed <release_package>, your command on a Windows server would look like:

    C:\Automic_Automation_Intelligence\<release_package>\config>java -Dswing.aatext=true -jar config.jar datainconsistency --remediate C:\Automic_Automation_Intelligence\<release_package>\jboss

    The process checks for references to non-existent and null data in various files, and removes those records.

    Important !

    Depending on the size of your database, this process can take some time. Do not restart the AAI server until the remediation process completes.

  5. Start the AAI service again. For information, see Stopping, Starting, Restarting the AAI Server.

Tip:

Like any other command-line script, you can run the command for the data inconsistency remediation by entering it as described in the previous steps, or you can add the command to a batch job, as needed.

Note:

You might notice that the datainconsistency command uses the AAI Configuration Tool with specific arguments for the data inconsistency remediation. However, because this kind of data remediation is not part of continuous maintenance, it is not included in the Configuration Tool settings that appear in the dialogs for the configuration settings. For information about those, see Configuration Tool.

Example of the returned output:

Starting Config Tool

Checking if the Automic Automation Intelligence (AAI) server is running

The Automic Automation Intelligence (AAI) server is not running

Fixing Data Inconsistencies. Depending on the size of your database, this process can take some time

Do not restart the AAI server until the remediation process completes

Fixing missing parent JobRuns

Fixed missing parent JobRuns (2 rows affected)

Fixing missing predecessor runs

Fixed missing predecessor runs (3 rows affected)

Fixing missing successor JobRuns

Fixed missing successor JobRuns (0 rows affected)

Fixing missing job runs in JobStreamRuns

Fixed missing job runs in JobStreamRuns (5 rows affected)

Fixing missing JobRun references in RecentState

Fixing missing JobRun references in RecentState (0 rows affected)

Fixing invalid dependent job condition reference

Fixed invalid dependent job condition reference (0 rows affected)

All Data Inconsistencies fixed

You can now start the Automic Automation Intelligence (AAI) server again

See also:

Configuration Tool Command Line Interface