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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORACLE error 1452 on Virtual machine

Status
Not open for further replies.

biggusdeeus

Technical User
Jul 12, 2005
6
US
Hi - I'm having problems importing a customer's dump files on a virtual pc. I have imported the same files on a host pc with no problem. The users and tablespaces are unique. So it's confusing as to why it happens on one and not the other. The error is happening once about 1/3 into the import and again about 1/2 way through. Here's the first error - any ideas?

IMP-00017: following statement failed with ORACLE error 1452:
"CREATE UNIQUE INDEX "PK_ENUMDET" ON "ENUMDET" ("ENUMDETUID" , "TERMINATIOND"
"ATE" ) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 1638400 FREELIST"
"S 1 FREELIST GROUPS 1) LOGGING"
IMP-00003: ORACLE error 1452 encountered
ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
IMP-00017: following statement failed with ORACLE error 20000:
"BEGIN DBMS_STATS.SET_INDEX_STATS(NULL,'"PK_ENUMDET"',NULL,NULL,NULL,21771,"
"190,21771,1,1,989,1,0); END;"
IMP-00003: ORACLE error 20000 encountered
ORA-20000: Unable to set values for index PK_ENUMDET: does not exist or insuffi
ient privileges
ORA-06512: at "SYS.DBMS_STATS", line 3613
ORA-06512: at "SYS.DBMS_STATS", line 3718
ORA-06512: at line 1
 

Error is: ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found

1) Truncate tables BEFORE import
2) Look for triggers [3eyes]



----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Thanks - but the problem is that the user and tablespace were dropped (via bat file) prior to the import - so there should be nothing there to truncate, correct?
 
How could you drop user via bat file??? If you called sql*plus you should spool some info to log file, most probably either user or some objects have not been dropped successfully.

Regards, Dima
 
Thanks, Dima. Makes sense, so I dropped user and tablespace from the command line before reattempting the import, but same results

drop user spf36admin1 cascade;

drop tablespace spf36admin1space including contents cascade constraints;
 
As user's name is quite cumbersome, is it possible that you're importing to a wrong schema? Another database? Could you try to connect using the same connect string from sql*plus right before import?

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top