Smruti1
asked on
sql server error 515,7215 ora error -02089,02291
unable to update table using procedure on sql server side.
ORA-02291 is a constraint violation. It would most likely mean you have a child with no parent. The full text of the error message should give you more information.
ASKER
Thanks johnsone.
Here is the full text message--
Oracle error 'ORA-02291: integrity constraint (DM.FK_ADDR_2_ADDR_GRP) violated - parent key not found ' [ ORA-06512: at "COM.COM_OFFICE_PKG", line 365 ORA-06512: at "COM.COM_OFFICE_PKG", line 322 ]{ ----- PL/SQL Call Stack ----- object line object handle number name 0x1eea5d520 332 package body COM.COM_OFFICE_PKG 0x1f25988a0 1 anonymous block } , SQL Message = 'Could not execute statement on remote server 'DMLINK'.'
Here is the full text message--
Oracle error 'ORA-02291: integrity constraint (DM.FK_ADDR_2_ADDR_GRP) violated - parent key not found ' [ ORA-06512: at "COM.COM_OFFICE_PKG", line 365 ORA-06512: at "COM.COM_OFFICE_PKG", line 322 ]{ ----- PL/SQL Call Stack ----- object line object handle number name 0x1eea5d520 332 package body COM.COM_OFFICE_PKG 0x1f25988a0 1 anonymous block } , SQL Message = 'Could not execute statement on remote server 'DMLINK'.'
Based solely on the constraint names, my guess is that you have an ADDRESS table and an ADDRESS_GROUP table. You are missing the group record for the address. That is what the message is telling you.
This would tell you the constraint that the table is on:
select owner, table_name from dba_constraints where constraint_name = 'FK_ADDR_2_ADDR_GRP' and owner = 'DM';
This would tell you the table that is referenced:
select owner, table_name from dba_constraints where (owner, constraint_name) = select r_owner, r_constraint_name from dba_constraints where constraint_name = 'FK_ADDR_2_ADDR_GRP' and owner = 'DM');
Once you fix the constraint violation, which I suspect is with the address group table, your procedure should run correctly.
This would tell you the constraint that the table is on:
select owner, table_name from dba_constraints where constraint_name = 'FK_ADDR_2_ADDR_GRP' and owner = 'DM';
This would tell you the table that is referenced:
select owner, table_name from dba_constraints where (owner, constraint_name) = select r_owner, r_constraint_name from dba_constraints where constraint_name = 'FK_ADDR_2_ADDR_GRP' and owner = 'DM');
Once you fix the constraint violation, which I suspect is with the address group table, your procedure should run correctly.
ASKER
Thanks to all, I will check it after long weekend and let you all know.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER