OracleLoader does not respect primary key
Posted: Wed 04 Feb 2009 22:00
I have a table:
CREATE TABLE "COST_CENTER"
( "COST_CENTER" VARCHAR2(4 BYTE) NOT NULL ENABLE,
"NAME" VARCHAR2(35 BYTE),
"PHONE" VARCHAR2(10 BYTE),
PRIMARY KEY ("COST_CENTER")
That I load using OracleLoader and it works great. However, when I load the same file a second time, i expected to get a key violation error. But no error at all occured. It loaded the entire file a second time. Since the primary key has duplicates, the index becomes invalid. What do I need to do to prevent duplicate records?
Thanks,
Mike
CREATE TABLE "COST_CENTER"
( "COST_CENTER" VARCHAR2(4 BYTE) NOT NULL ENABLE,
"NAME" VARCHAR2(35 BYTE),
"PHONE" VARCHAR2(10 BYTE),
PRIMARY KEY ("COST_CENTER")
That I load using OracleLoader and it works great. However, when I load the same file a second time, i expected to get a key violation error. But no error at all occured. It loaded the entire file a second time. Since the primary key has duplicates, the index becomes invalid. What do I need to do to prevent duplicate records?
Thanks,
Mike