亚马逊 RDS 甲骨文:impdp REMAP_SCHEMA

Amazon RDS Oracle : impdp REMAP_SCHEMA

我正在尝试使用 the official tutorial 中的说明将一些数据导入 Amazon AWS。我已成功将转储文件上传到 RDS 机器。

最后一步是使用 impdp Oracle 实用程序进行实际导入。如果我不重新映射模式,它会很好用。但是,我确实需要重新映射模式,我 运行 遇到了问题。

如果我 运行 impdp 使用 REMAP_SCHEMA 选项,我得到:

ORA-39122: Unprivileged users may not perform REMAP_SCHEMA remappings.

谷歌搜索后,似乎启用此功能的唯一方法是:

grant imp_full_database to MY_USER;

但是 RDS 拒绝了这个:

ORA-00604: error occurred at recursive SQL level 1
ORA-20997: "IMP_FULL_DATABASE" grants not allowed
ORA-06512: at "RDSADMIN.RDSADMIN", line 51
ORA-06512: at line 2

这看起来绝对像是在 RDS 级别故意强制执行的内容。

您知道在使用 RDS 和 impdp 时是否可以重新映射模式吗?

A​​lex(见我的问题的评论)是对的。 Unprivileged users can perform schema remaps only if their schema is the target schema of the remap

所以我采取的步骤是:

create user MY_USER identified by ****;
grant create session, create table to MY_USER;
alter user MY_USER quota unlimited on users;
-- both read and write are needed
grant read, write on directory data_pump_dir to MY_USER;
grant execute on dbms_datapump to MY_USER;

然后:

impdp MY_USER/psswd@server DUMPFILE=file.dmp DIRECTORY=DATA_PUMP_DIR \
remap_tablespace=original_tablespace:users \
remap_schema=original_user:MY_USER