In ClearQuest, we want to delete old records with creation date earlier than Dec 31st 2012 in production.

When I tried to delete a CR which as AIs, CRIs, DWOs, TWOs, QUESTS as child records, the action was always failed because of lots of circular references between CR/CRI and other record type (including stateless record type).

How can I remove all references in CRI or CR? Now I only can remove some AffectedItem reference with CRI and CR in perl script, and then delete CRI records successfully. But there are still lots of other references. Some of them I know, some of them I don't know. For those old records, I also don't know what kind of references were existed in those old records.

All references are store in the "parent_child_links" table:parent_dbid - DB ID of the parent recordparent_entitydef_id - parent entity ID (record name can be found in the "entitydef" table)parent_fielddef_id - parent field ID (field name can be found in the "fielddef" table)child_dbid - DB ID of the child recordchild_entitydef_id - child field ID (field name can be found in the "fielddef" table)child_fielddef_id - child field ID (field name can be found in the "fielddef" table)

Technically, there are two options:1) you can find all records where the record that should be deleted is listed as child and update each of them to remove reference before deleting the record.2) you can remove all entries from the parent_child_links where the record is listed as child using direct SQL, but this option is not supported, and none of the ClearQuest hooks would be fired in this case.