1 Reply Latest reply on Sep 21, 2010 4:01 AM by AdamWilden

    Script errors when deleting User Sessions etc..

    Expert

      Hi,

       

      Our consultants helped us set up a couple of DB scripts which help speed things up.

       

      DELETE FROM TPS_AUDIT_TRAIL WHERE TPS_CREATION_DATETIME < sysdate-14;Commit;  

      DELETE FROM TPS_USER_SESSION WHERE TPS_END_DATETIME < sysdate-14; Commit;     

       

      These worked well for a while but we are now getting child record errors.  Does anyone have any idea why this might have happened and any way around this?   

       

      ORA-02292: integrity constraint (LD_BTO.FKEY$TPS_LOCK_ITEM$SESSION) violated - child record found

      ORA-02292: integrity constraint (LD_BTO.FKEY$TPS_AUDIT_TRAIL_VALUE$AI) violated - child record found

       

      I can probably kill User Sessions via a query but the reduced  audit did seem to make things faster (we don't use the Audit Trail as we create our own full udit via Notes).

       

      Many thanks - Adam.