简体   繁体   English

AWS RDS Oracle 数据泵错误 ORA-39001:无效的参数值

[英]AWS RDS Oracle Datapump error ORA-39001: invalid argument value

I want to import my dump file from my local to AWS.我想将我的转储文件从本地导入 AWS。 I've uploaded my pdv.dpdm file into my S3 bucket我已将我的pdv.dpdm文件上传到我的 S3 存储桶中

expdp sys/pass schemas=PDV dumpfile=pdv.dpdm NOLOGFILE=YES directory=TEST_DIR

I was success downloading that file into oracle DATA_PUMP_DIR with rdsadmin.rdsadmin_s3_tasks.download_from_s3 command, When I list the files inside that directory, I got this.我成功地使用rdsadmin.rdsadmin_s3_tasks.download_from_s3命令将该文件下载到 oracle DATA_PUMP_DIR ,当我列出该目录中的文件时,我得到了这个。 So I think the problem is not the failure when moving the data.所以我认为问题不是移动数据时的失败。

select * from table
(rdsadmin.rds_file_util.listdir(p_directory => 'DATA_PUMP_DIR'));

datapump/   directory   4096    2020-03-04 06:49:40
pdv2.log    file    28411   2020-03-04 06:49:40
29012020.DMP    file    825552896   2020-03-03 09:36:59
pdv2.dpdm   file    685617152   2020-03-04 06:49:40
pdv.dpdm    file    685613056   2020-03-04 06:49:27

When I starting to import that file with DBMS_DATAPUMP.ADD_FILE I got an error on that line.当我开始使用DBMS_DATAPUMP.ADD_FILE导入该文件时,该行出现错误。

DECLARE
hdnl NUMBER;
BEGIN
hdnl := DBMS_DATAPUMP.OPEN( operation => 'IMPORT', job_mode => 'SCHEMA', job_name=> NULL, version => 12);
DBMS_DATAPUMP.ADD_FILE( 
    handle => hdnl, 
    filename => 'pdv.dpdm', 
    directory => 'DATA_PUMP_DIR',
    filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE
);
DBMS_DATAPUMP.START_JOB(hdnl);
END;

Error :

SQL Error [39001] [99999]: ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4087
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4338
ORA-06512: at line 6

It seems I'm missing something, maybe configure in AWS or what.似乎我错过了一些东西,也许在 AWS 中配置或什么。 I've done searching for a couple of answers but it doesn't fix my problem.我已经搜索了几个答案,但没有解决我的问题。 Could you help me with this?你能帮我解决这个问题吗? I don't know anymore what should I do.我不知道该怎么办了。 Thanks谢谢

You are mistaken with the import version.您误认为是导入版本。

hdnl := DBMS_DATAPUMP.OPEN( operation => 'IMPORT', job_mode => 'SCHEMA', job_name=> NULL, version => 12);

version=>'12.0.0'版本=>'12.0.0'

Oracle Documentation 甲骨文文档

COMPATIBLE - (default) the version of the metadata corresponds to the database compatibility level and the compatibility release level for feature (as given in the V$COMPATIBILITY view). COMPATIBLE -(默认)元数据的版本对应于数据库兼容级别和功能的兼容版本级别(如 V$COMPATIBILITY 视图中给出)。 Database compatibility must be set to 9.2 or higher.数据库兼容性必须设置为 9.2 或更高版本。

LATEST - the version of the metadata corresponds to the database version.最新 - 元数据的版本对应于数据库版本。

A specific database version, for example, '11.0.0'.特定的数据库版本,例如“11.0.0”。

Specify a value of 12 to allow all existing database features, components, and options to be exported from Oracle Database 11g release 2 (11.2.0.3) or later into an Oracle Database 12 c Release 1 (12.1) (either a multitenant container database (CDB) or a non-CDB).指定值 12 以允许将所有现有数据库特性、组件和选项从 Oracle Database 11g 第 2 版 (11.2.0.3) 或更高版本导出到 Oracle Database 12 c 第 1 版 (12.1)(多租户容器数据库( CDB) 或非 CDB)。

You must export as a non-SYS user!您必须以非 SYS 用户身份导出!

grant read, write on directory TEST_DIR to PDV;

expdp PDV/password schemas=PDV dumpfile=pdv.dpdm NOLOGFILE=YES directory=TEST_DIR

Oracle Documentation 甲骨文文档

Note:Do not start Export as SYSDBA, except at the request of Oracle technical support.注意:除非 Oracle 技术支持要求,否则不要启动 Export as SYSDBA。 SYSDBA is used internally and has specialized functions; SYSDBA 内部使用,有专门的功能; its behavior is not the same as for general users.它的行为与一般用户不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM