Link to home
Start Free TrialLog in
Avatar of Smruti1
Smruti1

asked on

sql server error 515,7215 ora error -02089,02291

unable to update table using procedure on sql server side.
Avatar of Smruti1
Smruti1

ASKER

Our configuration Updates table on SQL server while pulling data from Oracle. It used to work before but it stopped  accessing data from oracle and updates tables in SQL Server.
Avatar of johnsone
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.
Avatar of Smruti1

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'.'
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.
Avatar of Smruti1

ASKER

Thanks to all, I will check it after long weekend and let you all know.
ASKER CERTIFIED SOLUTION
Avatar of Smruti1
Smruti1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial