oracle - Import dmp tablespace name must fit the old? -
the oracle new tablespace name must fit old tablespace name?
for example:
the dump file tablespace name a,and create new tablespace b,and import table, has many error?
ora-00959:tablespace 'ecasys'(old) not exits. this import statement:
imp userid='zhpe/zhpe@orcl' file='e:\xxxx\xxxx2013-08-15bak\130815.dmp' log='d:\app\administrator\oradata\orcl\zhpe.log' full=y ignore=y; is new tablespace must must must fit old one??? help!
if you're forced use legacy exp , imp tools tablespace cannot changed during import using command-line options. if can, switch using datapump versions, expdp , impdp, , follow @schurik's advice.
if can't you'll need workaround, create schema objects manually first.
if run imp indexfile option create file containing ddl tables , indexes:
imp user/password indexfile=schema.sql file=... the table creation ddl commented out rem markers, need remove. can edit change tablespace , other storage options no longer appropriate. run schema creation sql create tables empty.
then run normal import again, ignore=y flag doesn't complain (much) tables exist. data still inserted existing tables.
this bit slower if create indexes tables beforehand; create tables, insert data, , build indexes, more efficient. if slowdown significant can split schema.sql separate table , index creation files , same thing manually - create tables, run import ignore=y , indexes=n (to stop trying , failing create them), , create indexes afterwards.
clearly bit of pain, , 1 of many reasons switching datapump idea.
Comments
Post a Comment