Oracle impdp 抛出 ORA-39088 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9257655/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 03:57:15  来源:igfitidea点击:

Oracle impdp throwing ORA-39088 error

oracleimportimpdp

提问by user170008

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

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

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

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?

这个错误的原因是什么?

回答by Alex Poole

From the documentation:

文档

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.

ORA-39088:文件名不能包含路径规范
原因:转储文件、日志文件或 sql 文件的名称包含路径规范。
行动:使用目录对象的名称来指示文件应该存储在哪里。

This suggests that the parameter you've shown as DUMPFILE=db.dmpis 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.

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



As @ruffin notes from that directory parameter link, you can put the dump file in the default DATA_PUMP_DIRdirectory, which you can find from the dba_directoriesview or, if you have permission to use that object, the all_directoriesview. 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.

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

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:

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

create directory my_data_pump_dir as 'C:\some\dir\path';
grant read, write on directory my_data_pump_dir to <username>;

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, pmonetc.) 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 impcommand was a client-side application that often ran on the server but didn't have to; impdpis a server-side application.

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