Database Administration (MOSC)

MOSC Banner

alter table enable constraint exceptions into exception

edited Jun 23, 2014 11:58AM in Database Administration (MOSC) 4 commentsAnswered

Hello all

I am trying this in oracle 11.2.0.3

alter table aivs.crdmbr_vldtn_evnt_log enable constraint CRDMBR_VLDTN_EVNT_LOG_PK exceptions into aivs.exceptions ;

Table altered.

insert into aivs.crdmbr_vldtn_evnt_log (CRDMBR_VLDTN_REQ_ID) values (2617)
;
insert into aivs.crdmbr_vldtn_evnt_log (CRDMBR_VLDTN_REQ_ID) values (2617)
*
ERROR at line 1:
ORA-00001: unique constraint (AIVS.CRDMBR_VLDTN_EVNT_LOG_PK) violated


select * from aivs.exceptions;

no rows selected

My understanding is that the exception clause would write information about the rows that violated a constraint on this table into the exception table. However after I tried to insert a duplicate row into my table, the row was rejected, but nothing was written into the exceptions table. Am I misunderstanding something or am I doing something incorrectly? My goal is to have duplicate records rejects AND written into the exception table , but I don't see it being the case

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center