今天刚遇到了这个问题:impdp 如果不导入权限?看了下impdp参数没有了grants选项,看了些文档发现还是除了data dump 必需要在服务端执行个参数上还是有一定区别的
放上官方的对照表
| Original Import Parameter | Comparable Data Pump Import Parameter |
|---|---|
| BUFFER | A parameter comparable to BUFFER is not needed. |
| CHARSET | A parameter comparable to CHARSET is not needed. |
| COMMIT | A parameter comparable to COMMIT is not supported. |
| COMPILE | A parameter comparable to COMPILE is 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 | SQLFILE with INCLUDE INDEX |
| LOG | LOGFILE |
| PARFILE | PARFILE |
| RECORDLENGTH | A parameter comparable to RECORDLENGTH is not needed. |
| RESUMABLE | A parameter comparable to RESUMABLE is not needed. It is automatically defaulted for privileged users. |
| RESUMABLE_NAME | A parameter comparable to RESUMABLE_NAME is not needed. It is automatically defaulted for privileged users. |
| RESUMABLE_TIMEOUT | A parameter comparable to RESUMABLE_TIMEOUT is 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 STATISTICS is not needed. If the source table has statistics, they are imported. |
| STREAMS_CONFIGURATION | STREAMS_CONFIGURATION |
| STREAMS_INSTANTIATION | A parameter comparable to STREAMS_INSTANTIATION is not needed. |
| TABLES | TABLES |
| TABLESPACES | This parameter still exists, but some of its functionality is now performed using the TRANSPORT_TABLESPACES parameter. |
| TOID_NOVALIDATE | A command comparable to TOID_NOVALIDATE is 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_OWNERS is not needed because the information is stored in the dump file set. |
| USERID | A parameter comparable to USERID is not needed. This information is supplied as the username/password when you invoke Import. |
| VOLSIZE | A parameter comparable to VOLSIZE is 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.