AAI Database Inconsistency Remediation Script
search cancel

AAI Database Inconsistency Remediation Script

book

Article ID: 240820

calendar_today

Updated On:

Products

Automation Analytics & Intelligence

Issue/Introduction

Automic  Automation Intelligence 6.4.2-2 introduced a new Database Inconsistency Remediation Script that can be run to remediate various database issues that can prevent AAI fully initializing. 

 

These inconsistencies can occur if AAI is shutdown abruptly, or if the connection to the AAI database is interrupted while AAI is still processing updates. 

 

This script will allow you to remediate the database issues without having to log in to your database or contact your DBA, you will just need access to the AAI Server.

Resolution

If you are running 6.4.2-2 or later you can follow the steps below to run these steps automatically.

 

1. Stop the AAI service

 

2. Go to the <Install Dir>/config directory on your AAI server.

 

3. Run the following command:

java -Dswing.aatext=true -jar config.jar datainconsistency --remediate /<InstallDir>/jboss

 

For example if AAI is installed at /opt/aai_install_dir your command would be:

java -Dswing.aatext=true -jar config.jar datainconsistency --remediate /opt/aai_install_dir /jboss

 

You should see output like below, if anything is updated it will display in the 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. Please do no start AAI service while running fix
Fixing missing parent JobRuns
Fixed missing parent JobRuns. 0 rows affected.
Fixing missing predecessor runs
Fixed missing predecessor runs. 0 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. 0 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. Exiting..

 

4. Start up the AAI service.

 

If you are on an earlier release follow the steps below:

If you should run into this scenario run the select queries below. If any queries return a non zero result, run the update or delete statements listed below them.

Only start up services after all the select queries return 0.

Additional Information

If you are on an earlier release of of AAI we would advise upgrading to the latest version of AAI, 6.4.2-2 at the time of writing this article.

If you do run into this on versions earlier then 6.4.2-2, there are manual SQL scripts you can run in the article below:

https://knowledge.broadcom.com/external/article/205932/aai-database-inconsistency-queries-for-w.html