search cancel

How to repair OrientDB database corruption for TDM Portal


Article ID: 130267


Updated On:


CA Test Data Manager (Data Finder / Grid Tools)


If OrientDB has become corrupt, you will still be able to log into TDM Portal, but you will not be able to view existing Data Models, or create new Data Models. 

You may see the following error displayed:
Seeing the following error in the TDMDataReservation.log:
HTTP Error - INTERNAL SERVER ERROR: Exception: Error in creating or accessing the database com.orientechnologies.orient.core.exception.OSecurityAccessException:
Wrong user/password to [connect] to the remote OrientDB Server instance



TDM Portal
Test Data Manager 


This can happen when the OrientDB journal files become corrupted.
To find more information regarding the internal error refer to the %ProgramData%\CA\CA Test Data Manager Portal\logs\TDMDataReservation.log.
Also, check the %ProgramData%\CA\CA Test Data Manager Portal\orientdb\log\ files.


NOTE: It's very important to carry out the following steps (no exceptions)
  1. Open the Windows Services, and stop the CA Test Data Manager Portal Service, and the OrientDB Service

  2. If you have a previous back and want to restore the database files, please do so at this time.

  3. The OrientDB database files are found in %ProgramData%\CA\CA Test Data Manager Portal\orientdb\database directory. There could be more than one depending on your TDM environment. Typically the database file of interest will be the ReservationDB files.
    Open a Windows File  Explorer, go to C:\ProgramData\CA\CA Test Data Manager Portal\orientdb\databases\ReservationDB

  4. Sort by type and delete all the files with are empty(0kb) and name the folder as ReservationDB.<<id>>.wal

  5. Open command prompt as administrator and navigate to C:\Program Files\CA\CA Test Data Manager Portal\orientdb\bin

  6. Start the OrientDB console by executing the following command: CONSOLE

    You will see the OrientDB Console launch:

    C:\Program Files\CA\CA Test Data Manager Portal\orientdb\bin>CONSOLE

    OrientDB console v.2.2.33 (build 77584cd6827f647cf4aa231cf27bd6f10bc04e2c, branch 2.2.x)
    Type 'help' to display all the supported commands.
    Installing extensions for GREMLIN language v.2.6.0


  7. At orientdb> prompt execute the following command  to connect to the ReservationDB database:

    connect plocal:"C:/ProgramData/CA/CA Test Data Manager Portal/orientdb/databases/ReservationDB" admin admin

    For Example:

    orientdb> connect plocal:"C:/ProgramData/CA/CA Test Data Manager Portal/orientdb/databases/ReservationDB" admin admin

    Disconnecting from the database [null]...OK
    Connecting to database [plocal:C:/ProgramData/CA/CA Test Data Manager Portal/orientdb/databases/ReservationDB] with user 'admin'...
    2021-05-06 13:51:14:927 INFO  Storage 'plocal:C:/ProgramData/CA/CA Test Data Manager Portal/orientdb/databases/ReservationDB' is opened under OrientDB distribution : 2.2.33 (build 77584cd6827f647cf4aa231cf27bd6f10bc04e2c, branch 2.2.x)OK
    orientdb {db=ReservationDB}>

  8. At the orientdb {db=ReservationDB}> prompt, execute the following command to check the integrity of the database:


    Note: you can add the -v option to run the check in verbose mode

  9. To run a repair on the database, execute the following command:

    REPAIR DATABASE --fix-graph --fix-ridbags --fix-bonsai --fix-links -v
  10. Once the repair is complete, execute the following command to exit out of the console:


  11. Restart OrientDB and TDM Portal