1. 程式人生 > >用oracle10G匯出oracle11G DMP 和匯入方法

用oracle10G匯出oracle11G DMP 和匯入方法

1、匯出前先清理表

清理空表,用如下語句查出需要處理表,之後執行sql
1  select 'alter table '||table_name||' allocate extent;'
from user_tables WHERE SEGMENT_CREATED='NO';

2  刪除無效的dblink
匯出表
exp userid=ats/[email protected]/atstest file=e:\exam.dmp log=e:\exam.log

exp userid=abictest/[email protected]/atstest  file=e:\abictest.dmp log=e:\exam.log
匯入表
imp userid=ats/

[email protected]/ats fromuser=ats touser=ats file=e:\exam.dmp log=e:\imexam.log

匯出表
exp userid=4icc/[email protected]/atstest file=e:\M.dmp log=e:\exam.log tables=M_ACCOUNT
匯入表
imp userid=ats/[email protected]/ats fromuser=picc touser=ats file=e:\s3.dmp log=e:\imexam.log

如果是從11G匯出的dmp,10G是無法匯入的