今天刚遇到了这个问题:impdp 如果不导入权限?看了下impdp参数没有了grants选项,看了些文档发现还是除了data dump 必需要在服务端执行个参数上还是有一定区别的
放上官方的对照表
| Original Import Parameter | Comparable Data Pump Import Parameter | 
|---|---|
| BUFFER | A parameter comparable to BUFFERis not needed. | 
| CHARSET | A parameter comparable to CHARSETis not needed. | 
| COMMIT | A parameter comparable to COMMITis not supported. | 
| COMPILE | A parameter comparable to COMPILEis not supported. | 
| CONSTRAINTS | EXCLUDE=CONSTRAINT | 
| DATAFILES | TRANSPORT_DATAFILES | 
| DESTROY | REUSE_DATAFILES | 
| FEEDBACK | STATUS | 
| FILE | DUMPFILE | 
| FILESIZE | Not necessary. It is included in the dump file set. | 
| FROMUSER | SCHEMAS | 
| FULL | FULL | 
| GRANTS | EXCLUDE=GRANT | 
| HELP | HELP | 
| IGNORE | TABLE_EXISTS_ACTION | 
| INDEXES | EXCLUDE=INDEX | 
| INDEXFILE | SQLFILEwithINCLUDEINDEX | 
| LOG | LOGFILE | 
| PARFILE | PARFILE | 
| RECORDLENGTH | A parameter comparable to RECORDLENGTHis not needed. | 
| RESUMABLE | A parameter comparable to RESUMABLEis not needed. It is automatically defaulted for privileged users. | 
| RESUMABLE_NAME | A parameter comparable to RESUMABLE_NAMEis not needed. It is automatically defaulted for privileged users. | 
| RESUMABLE_TIMEOUT | A parameter comparable to RESUMABLE_TIMEOUTis not needed. It is automatically defaulted for privileged users. | 
| ROWS=N | CONTENT=METADATA_ONLY | 
| ROWS=Y | CONTENT=ALL | 
| SHOW | SQLFILE | 
| SKIP_UNUSABLE_INDEXES | SKIP_UNUSABLE_INDEXES | 
| STATISTICS | A parameter comparable to STATISTICSis not needed. If the source table has statistics, they are imported. | 
| STREAMS_CONFIGURATION | STREAMS_CONFIGURATION | 
| STREAMS_INSTANTIATION | A parameter comparable to STREAMS_INSTANTIATIONis not needed. | 
| TABLES | TABLES | 
| TABLESPACES | This parameter still exists, but some of its functionality is now performed using the TRANSPORT_TABLESPACESparameter. | 
| TOID_NOVALIDATE | A command comparable to TOID_NOVALIDATEis not needed. OIDs are no longer used for type validation. | 
| TOUSER | REMAP_SCHEMA | 
| TRANSPORT_TABLESPACE | TRANSPORT_TABLESPACES(see command description) | 
| TTS_OWNERS | A parameter comparable to TTS_OWNERSis not needed because the information is stored in the dump file set. | 
| USERID | A parameter comparable to USERIDis not needed. This information is supplied as theusername/passwordwhen you invoke Import. | 
| VOLSIZE | A parameter comparable to VOLSIZEis not needed because tapes are not supported. | 
note:
所以排除授权
impdp anbob/anbob directory=xxx datafile=xxx EXCLUDE=grant
排除用户 exclude=user,排除外键exclude=ref_constraint,还有exclude=view,package,function…
imp 是要在导入前先有dba创建用户才可以导入,impdp 是将会recreate 数据库的用户,还有grant,应用以前的password,impdp的parallel特性是动态的,并且impdp的转储格式是xml.
