Can we know the Constraint Name which was Violated

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
srinagesh
Participant
Posts: 125
Joined: Mon Jul 25, 2005 7:03 am

Can we know the Constraint Name which was Violated

Post by srinagesh »

Hi All,


Is there a way to get the Name of the Oracle Constraint which was violated during the load process?

Is there a way to get the oracle error message and not just the DBMS Code. (for example I get ora-0001, but i dont get the message Unique constraint violated)

Nagesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Unfortunately, no - not from the reject link inside the job. The only place the full message exists is in the job's log. So you'd need to farm that information from there after the job completes.

If you don't want to roll your own, you might want to check out Mr Duke's ETLStats package you can download from his homepage. At the very least, he's already done most of the work for you... best case, all of it! :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Ora 1 is primary key violation.

You can link the message constraint with the table to obtain more information.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

But not and get the name of the constraint being violated.
-craig

"You can never have too many knives" -- Logan Nine Fingers
srinagesh
Participant
Posts: 125
Joined: Mon Jul 25, 2005 7:03 am

Post by srinagesh »

Thanx Chulett and Sainath.
Post Reply