Import Tips

Import a full database

$imp system/manager file=exp_full_db.dmp ingnore=y buffer=1024000 commit=y

---------------------------------------------------------------------------------------------------------------------

Import a schema or user objects

$imp username/password file=exp_db.dmp fromuser=Source_USERNMAE

touser=destination_USERNAME ignore=y

---------------------------------------------------------------------------------------------------------------------

Import tables T1 and T2 from user scott

$imp username/password file=exp_db.dmp fromuser=scott tables=T1,T2 buffer=1024000

---------------------------------------------------------------------------------------------------------------------

Import tables T1, T2 from user scott to user kands

$imp system/manager file=exp_db.dmp fromuser=scott touser=kands tables=T1,T2

OR

$ imp system/manager file=exp_db.dmp fromuser=scott touser=kands tables="(T1,T2)"

---------------------------------------------------------------------------------------------------------------------

Import a full partition table T1 into user scott from user scott of another database

$imp username/password file=exp_dbt.dmp fromuser=scott tables=T1

---------------------------------------------------------------------------------------------------------------------

Import partition P1, P2 from table PT

$imp scott/tiger file=imp_db.dmp tables=(PT:P1,PT:P2)

---------------------------------------------------------------------------------------------------------------------

Import a from an export file which will become greater than 2GB when uncompressed

$mknod imp_db_pipe p

(make a unix pipe)

$uncompress <exp_db.dmp.Z> imp_db_pipe &

(uncompress the export file)

$imp file=imp_db_pipe userid=scott/tiger tables=T

---------------------------------------------------------------------------------------------------------------------

Import from a Tape device using unix pipe

$ knod imp_db_pipe p

$ dd of=imp_db_pipe if=/dev/rmt/0 &

$imp username/password file=imp_db_pipe

---------------------------------------------------------------------------------------------------------------------