cancel
Showing results for 
Search instead for 
Did you mean: 

IMP-00041 and IMP-00017

SOLVED
Go to solution
dngaya
Advisor

IMP-00041 and IMP-00017

i have import data on a database oracle 7.3.4, I have following error messages:


IMP-00017: following statement failed with ORACLE error 2437:
"ALTER TABLE "QR_MAP_ATTACH_ALIAS" ADD CONSTRAINT "PK_MAP_ATTACH_ALIAS" PRI"
"MARY KEY ("ATTACH_NAME") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STO"
"RAGE (INITIAL 512000 NEXT 102400 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCR"
"EASE 0 FREELISTS 1 ) TABLESPACE "USR""
IMP-00003: ORACLE error 2437 encountered
ORA-02437: cannot enable (QARUN.PK_MAP_ATTACH_ALIAS) - primary key violated
and

IMP-00041: Warning: object created with compilation warnings
"CREATE FORCE VIEW "SYSTEM"."TEMPRPT_BYTES" ("TABLE"
"SPACE_NAME","BYTES") AS "
"select tablespace_name,sum(bytes) bytes"
"from dba_data_files"
"group by tablespace_name"

how to make for to resolve it?.
thank you for your assistance.


4 REPLIES
Piergiacomo Perini
Trusted Contributor

Re: IMP-00041 and IMP-00017

Hi,

for ORA-02437 maybe there are duplicate values or null values;
so check the table, remove the duplicates and enabling the primary key.

For IMP-00041 during creation of a view owned
by SYSTEM on a view called "dba_data_files"
owned by SYS.
Check if exist a public synonym owned by
SYS called "dba_data_files" and try to
re-create your view.

HTH

regards
Jean-Luc Oudart
Honored Contributor

Re: IMP-00041 and IMP-00017

For the 1st error, the usual explanation is that the source and target database do not share the same cahracter set. Therefore, during the import the conversion generates dupplicate keys.

Solution : your target database should be created with the same CHARACTER SET

cf. Metalink note 107597.1

Regards,
Jean-Luc
fiat lux
Brian Crabtree
Honored Contributor

Re: IMP-00041 and IMP-00017

Most likely, this is a character set issue, (above post). Try the following:

select attach_name,count(*) from qr_map_attach_alias group by attach_name having count(*) > 1;

The following will also work as well (I like this one, it is from metalink):

select attach_name from qr_map_attach_alias
where rowid in
(select rowid from qr_map_attach_alias
minus
select max(rowid) from qr_map_attach_alias
group by attach_name)

As for the IMP-00041, this is a normal import error. Views are created sequentially, however because they may call other views inside, if the calling view does not exist, you will get this error. Views are recompiled when used if they are invalid, so when you try to access this view, it will most likely work normally. I wouldn't worry about these, but you will want to check them when you are done by either selecting against them or recompiling them.

ie:
select count(*) from system.temprpt_bytes where rownum = 1;
or
alter view system.temprpt_bytes compile;

Thanks,

Brian
Yogeeraj_1
Honored Contributor
Solution

Re: IMP-00041 and IMP-00017

Hi

to add to the above great replies,

(1)
if you now want to delete the duplicate records, use:

delete from QR_MAP_ATTACH_ALIAS a
where rowid <> ( select max(rowid)
from QR_MAP_ATTACH_ALIAS b
where b.ATTACH_NAME = a.ATTACH_NAME)

(2)
As Brian said above, the problem with the view can be resolved automatically. Do a "select * from system.TEMPRPT_BYTES where rownum <2" to see if the view is OK.


regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)