Linux中ora39088,Oracle impdp抛出ORA-39088错误(Oracle impdp throwing ORA-39088 error)

Oracle impdp抛出ORA-39088错误(Oracle impdp throwing ORA-39088 error)

我正在尝试从Oracle 10g数据泵实用程序创建的转储文件中导入数据。 我发出的命令是

impdp \“username / password @ DB as sysdba \”remap_schema = SRC_SCHEMA:TARGET_SCHEMA remap_tablespace = source_tablespace:target_tablespace DUMPFILE = db.dmp

我收到以下错误消息:

ORA - 39001: Invalid argument value

ORA - 39000: Bad dump file spcification

ORA - 39088: file name cannot contain a path specification

这个错误的原因是什么?

I am trying to import data from a dump file created by Oracle 10g data pump utility. The command that I am issuing is

impdp \"username/password@DB as sysdba\" remap_schema=SRC_SCHEMA:TARGET_SCHEMA remap_tablespace=source_tablespace:target_tablespace DUMPFILE=db.dmp

I am getting the following error message:

ORA - 39001: Invalid argument value

ORA - 39000: Bad dump file spcification

ORA - 39088: file name cannot contain a path specification

What is the cause of this error?

原文:https://stackoverflow.com/questions/9257655

更新时间:2020-03-01 15:08

最满意答案

从文档 :

ORA-39088:文件名不能包含路径规范

原因:转储文件,日志文件或sql文件的名称包含路径规范。

操作:使用目录对象的名称来指示文件应存储的位置。

这表明您显示为DUMPFILE=db.dmp的参数确实是DUMPFILE=C:\some\dir\path\db.dmp ,这是不允许的。 您必须使用数据库可识别的目录,并使用DIRECTORY参数指定它。

正如@ruffin从该目录参数链接中注意到的,您可以将转储文件放在默认的DATA_PUMP_DIR目录中,您可以从dba_directories视图中找到该目录,或者,如果您有权使用该对象,则可以找到all_directories视图。 您正在导入的用户必须已被授予读写权限才能使用它。 您还需要能够将转储文件移动到操作系统目录中,因此权限也可能成为问题。

如果您没有合适的目录对象(您拥有数据库权限和操作系统访问权限),则需要创建一个目录对象并授予适当的权限。 这需要由具有适当权限的人来完成,通常是SYS :

create directory my_data_pump_dir as 'C:\some\dir\path';

grant read, write on directory my_data_pump_dir to ;

然后导入被修改为具有:

... DUMPFILE=db.dmp DIRECTORY=my_data_pump_dir

请注意,操作系统目录必须可供Oracle数据库服务器上的Oracle用户帐户(正在运行数据库进程的人员, pmon等)使用。 除非本地目录以某种方式安装在远程服务器上,否则无法使用本地文件导入远程数据库。 旧的imp命令是一个客户端应用程序,经常在服务器上运行,但不必; impdp是一个服务器端应用程序。

ORA-39088: file name cannot contain a path specification

Cause: The name of a dump file, log file, or sql file contains a path specification.

Action: Use the name of a directory object to indicate where the file should be stored.

This suggests that the parameter you've shown as DUMPFILE=db.dmp is really something like DUMPFILE=C:\some\dir\path\db.dmp, which is not allowed. You have to use a directory that is recognised by the database and specify it with a DIRECTORYparameter.

As @ruffin notes from that directory parameter link, you can put the dump file in the default DATA_PUMP_DIR directory, which you can find from the dba_directories view or, if you have permission to use that object, the all_directories view. The user you're importing as has to have been granted read and write privileges on that for you to be able to use it. You also need to be able to move your dump file into the operating-system directory, so permissions may be an issue there too.

If you don't have a suitable directory object that you have database privileges for and operating-system access to, you'll need to create one and grant suitable privileges. This needs to be done by someone with the appropriate privileges, usually as SYS:

create directory my_data_pump_dir as 'C:\some\dir\path';

grant read, write on directory my_data_pump_dir to ;

Then the import is modified to have:

... DUMPFILE=db.dmp DIRECTORY=my_data_pump_dir

Note that the operating system directory has to be available to the Oracle user account (whoever is running the database processes, pmon etc.) on the database server. You cannot import to a remote database using a local file, unless the local directory is somehow mounted on the remote server. The old imp command was a client-side application that often ran on the server but didn't have to; impdp is a server-side application.

2019-06-05

相关问答

导出的文件有错, ORA-39183: 出现内部错误 -16 (在解压缩阶段 2) 可以发现。另外ORA 600 KLAPRS_11 一般也是由于导出文件错误引起的。 重新导出一份,用2进制格式发送即可。

ORA-01000:在12c中DataPump导入(IMPDP)期间超过最大打开游标数(Doc ID 2283800.1)最后更新日期:2017年8月8日 调用数据泵导入 除非应Oracle技术支持部门的要求,否则不要以SYSDBA的形式调用Import。 SYSDBA在内部使用并具有专门的功能; 它的行为与普通用户不一样。 ORA-01000: Maximum Open Cursors Exceeded During DataPump Import (IMPDP) In 12c (Doc ID

...

所以我自己想出来了。 如果要重新映射到的模式尚不存在,则导入操作会创建它,前提是转储文件集包含必要的CREATE USER元数据,并且您要导入足够的权限。 意味着导出模式的oracle用户应具有CREATE USER权限。 虽然我没有重新映射,但导出部分是相关的,因为我的用户(ZABBIX)是基本用户而不是DBA / create-user-privileged。 在我的情况下,我做了'GRANT CREATE USER TO ZABBIX',再次运行导出,这次处理了一些额外的“对象类型”。 当z

...

现在可以在RDS上使用数据泵了。 duduklein的回答在他写的时候是正确的。 但是RDS文档现在有关于使用Oracle Data Pump的详细信息。 文档页面网址未在最初发布在问题中的链接中修改(好工作,亚马逊!)但它现在有关于使用数据泵的新内容。 Is is possible to use data pump on RDS now. duduklein's answer was correct when he wrote it. But the RDS docs now have deta

...

亚历克斯(见我的问题评论)是对的。 只有当模式的模式是重映射的目标模式时,非特权用户才能执行模式重映射 所以我采取的步骤是: 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 d

...

你需要添加paraneter REMAP_SCHEMA = SCOTT:PRODUCTION。 请参阅impdb文档 。 没有它,导出中没有任何与您的生产用户相关的内容。 You need to add paraneter REMAP_SCHEMA=SCOTT:PRODUCTION. See the impdb documentation. Without it, there is nothing in the export that is relevant to your production

...

不是真的。 但是,您不必实际“安装”完整的客户端。 我们的最新发行版包括一个带有sql * loader和数据泵实用程序的即时客户端 。 抓住这一个 即时客户端软件包 - 工具:包括数据泵,SQL加载程序和工作负载重放客户端* 没有安装程序。 只需解压缩它,然后将该目录添加到PATH中。 你应该很好去。 我不会将这些文件转储到您拥有SQLPlus的现有目录中,只需将其放入一个新的目录中,然后使用它而不是旧目录。 Not really. But, you don't have to actually

...

在问题发布后不久找到了解决此问题的方法。 此问题的解决方案是创建具有带有SEGMENT CREATION IMMEDIATE子句的VARRAY列的表。 有关详细信息,请访问: http : //www.oracle-base.com/articles/11g/segment-creation-on-demand-11gr2.php Found the solution to this problem shortly after the question was posted. The soluti

...

“是否需要使用表空间和/或用户(模式)准备目标数据库,以便将模式从一个数据库(11g R1)成功迁移到另一个数据库(11g R2)?” 表空间 - 是的。 用户 - 没有。 UDI-00014: invalid value for parameter, 'attach'

我认为调用impdp时参数的顺序是不正确的。 应该是以下形式: impdp username/password DUMPFILE= [and then whatever other parameters yo

...

从文档 : ORA-39088:文件名不能包含路径规范 原因:转储文件,日志文件或sql文件的名称包含路径规范。 操作:使用目录对象的名称来指示文件应存储的位置。 这表明您显示为DUMPFILE=db.dmp的参数确实是DUMPFILE=C:\some\dir\path\db.dmp ,这是不允许的。 您必须使用数据库可识别的目录,并使用DIRECTORY参数指定它。 正如@ruffin从该目录参数链接中注意到的,您可以将转储文件放在默认的DATA_PUMP_DIR目录中,您可以从dba_dire

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值