Hello, I am getting the below error
ORA-02291: integrity constraint (SFADM.STG2_R_127_FK) violated - parent key not found
what should i check the data type matching or any other
guide me through
ORA-02291
Moderators: chulett, rschirm, roy
This is an error from the database which basically means that you are trying to insert a record that has no matching parent record.
Example
Trying to insert an order record where the customer ID does not exist in the customer table.
Example
Trying to insert an order record where the customer ID does not exist in the customer table.
Code: Select all
ORA-02291 integrity constraint (string.string) violated - parent key not found
Cause: A foreign key value has no matching primary key value.
Action: Delete the foreign key or add a matching primary key.
Jim Paradies
Are you trying to insert or delete?
Anyways its a database error
The ones who have replied before have given you what might be the cause.
But you have not explained clearly. Just giving the error is not enough
You can get info if you do a google search
If you are deleting a record that is linked to another parent table, then it will not allow the delete. I believe you get the same error in this case also
Kishan
Anyways its a database error
The ones who have replied before have given you what might be the cause.
But you have not explained clearly. Just giving the error is not enough
You can get info if you do a google search
If you are deleting a record that is linked to another parent table, then it will not allow the delete. I believe you get the same error in this case also
Kishan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
On the server, at the operating system prompt, type this command.
This will (a) prove to you that it's an Oracle error (not a DataStage error), (b) suggest what you can do about it.
Then you can modify your job design so that you do not violate a foreign key constraint - maybe by loading the dimension table ahead of the fact table.
Code: Select all
oerr ORA 02291
Then you can modify your job design so that you do not violate a foreign key constraint - maybe by loading the dimension table ahead of the fact table.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Correct. You read this in the original error message.
Code: Select all
ORA-02291: integrity constraint (SFADM.STG2_R_127_FK) violated - parent key not found
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.