Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Constraints

Status
Not open for further replies.

joeythelips

IS-IT--Management
Aug 1, 2001
305
0
0
IE
Hi,

1 month ago i updated 4 fields in an oracle table.
In order to do this, i had to disable some constarints on the table.
As i expected, after the update i was unable to enable those same constraints.
Is there anyway i can reenable them now?
 
What kind of constraint was it?
Disabling constraints, to let an update run, that would not run when the constraint was on, only defers the problem in time. And the worst of it is that now, other update that does not follow the constraint rule might be done on your data while it is disabled.

The solution for this is resolve, in the data, the situation that causes the break of the constraint rule, and then re-enable the constraint.

Jean Cote
 
Fix the problem with the data not conforming to the constraints. Fix the constraint so that the data is valid. Or I believe that you can force a constraint so that subsequent data conforms to the constraint but tells Oracle that there is some existing data that doesn't.
I also believe that if you subsequently try to alter the bad data you will only be able to commit if the data correctly conforms to the constraint.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top