使用 expdp 和 impdp 导出和导入模式

export and import schema using expdp and impdp

我使用 this tuotrial 到 export/import 架构。教程中的步骤一直有效到 expdp 命令,见截图:

我正在使用 oracle12c。有什么想法吗?

article you linked to 指出:

The directory object is only a pointer to a physical directory, creating it does not actually create the physical directory on the file system of the database server.

您必须在数据库之外单独创建物理操作系统目录。该物理目录必须可由作为 运行 Oracle 数据库的操作系统用户读取和写入;正如您似乎在 Windows 上,这将是服务 运行 下的帐户。

您可以在创建目录对象之前或之后创建物理目录,因为它们是完全独立的,除非 Oracle 试图通过 UTL_FILE 或相关的 activity 访问它 - 数据泵使用UTL_FILE,从错误消息堆栈可以看出。

CREATE DIRECTORY不检查它指向的物理目录是否存在;您可以在 Oracle 不注意的情况下删除或创建物理目录;只要它在你尝试使用它的时候就可以访问它。

来自 the Oracle documentation:

A directory object specifies an alias for a directory on the server file system ...

For file storage, you must also create a corresponding operating system directory, an Oracle Automatic Storage Management (Oracle ASM) disk group, or a directory within an Oracle ASM disk group. Your system or database administrator must ensure that the operating system directory has the correct read and write permissions for Oracle Database processes.

Privileges granted for the directory are created independently of the permissions defined for the operating system directory, and the two may or may not correspond exactly. For example, an error occurs if sample user hr is granted READ privilege on the directory object but the corresponding operating system directory does not have READ permission defined for Oracle Database processes.