ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Data Generator throws the error ORA-02291in TDM portal


Article ID: 145993


Updated On:


CA Test Data Manager (Data Finder / Grid Tools)


Once the tables are registered in the TDM portal  (Data Model), Data Generator is automatically identifying the sequence in which data needs to be generated and throws the error

"ORA-02291: integrity constraint (BPS.FK_PLAN_CONTROL) violated - parent key not found; nested exception is java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (BPS.FK_PLAN_CONTROL) violated - parent key not found"




The error you are seeing is thrown by the Oracle Database. There are two possible causes for this error:

  1. An issue with the Test Data itself.
  2. The ordering of the tables registered in TDM.

You need to work with your Oracle DBA to ensure the integrity of the Test Data. If you aren't seeing a problem with the test data, or the primary key, then the problem could be the order of the tables, when they were registered in TDM. Unfortunately the TDM Portal does not recalculate the table order, as it does in Datamaker. Not all the functionality in Datamaker has been ported to TDM Portal, but this is something Engineering is working on, since Datamaker is considered a legacy component of TDM.


Release : 4.8.1

Component : CA Test Data Manager


Once the test data integrity has been verified by the Oracle DBA, and you are still seeing the error, we recommended to use Datamaker, and re-order the registered tables, which should resolved the issue.
Re-registering Tables in Databamaker:
  1. Launch Datamaker.
  2. Connect to the Target Datasource (Oracle Database).
  3. Select the Project under the Project Manager.
  4. Right click on the version folder, and select Register.
  5. Select Database table, and click the green arrow tab
  6. Select all the Tables for the Database you are working with.
  7. In the far upper right-hand corner, choose the 'Register Tables from Data Source' and select the Green Arrow button to run the registration.
  8. You may or may not see warnings  regarding index conflicts. If you see warning you can right click to see the details of the warning.
  9. Click the Green Arrow in the upper right-hand corner to continue with the registration process.
  10. Once registration is complete, you will be asked if you would like Datamaker to recalculate the table order, click the 'Yes' button.
  11. Datamaker will recalculate the table order, and ask you if you would like to use the recalculated order. Select the 'Recalculate' button.
  12. You may see issues detected with the relationship keys. If you have questions regarding the problems found, we advise you to consult with your DBA. If you would like to proceed and have Datamaker resolve the issue, click 'OK'.
  13. You'll see the action Datamaker is taking to resolve the detected issue. Click 'OK' to proceed.
  14. Once the process completes, you'll be taken back to the Table registration screen. You can close out of Datamaker and try the TDM Portal Generator again.