简体   繁体   English

从 Oracle XE 数据库导出表时失败

[英]Failure while exporting table from Oracle XE Database

We have XE running on a docker container.我们在 docker 容器上运行了 XE。 When trying to export a table I got the below error尝试导出表时出现以下错误

expdp test/test@XE tables=UserProfile directory=/tmp dumpfile=profile.dmp logfile=logger

ORA-39006: internal error
ORA-39213: Metadata processing is not available

I googled a bit and found that I need to execute the below command but that failed too我用谷歌搜索了一下,发现我需要执行下面的命令,但也失败了

execute dbms_metadata_util.load_stylesheets
ERROR at line 1:
ORA-31609: error loading file "kucolumn.xsl" from file system directory
"/u01/app/oracle/product/11.2.0/xe/rdbms/xml/xsl"
ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 2397
ORA-06512: at line 1

I traversed to the directory and found that the "xsl" directory was missing, is this directory created by default with XE installation or we require a specific setting to get the "xsl" folder?遍历目录,发现“xsl”目录不见了,这个目录是XE安装时默认创建的还是我们需要特定设置才能得到“xsl”文件夹?

XE was installed using the rpm - oracle-xe-11.2.0-1.0.x86_64.rpm. XE 是使用 rpm 安装的 - oracle-xe-11.2.0-1.0.x86_64.rpm。 Any idea what could be the issue?知道可能是什么问题吗?

The value you specify as directory needs to be an Oracle database directory object, not the value of a directory on your file system.您指定为目录的值必须是 Oracle 数据库目录对象,而不是文件系统上目录的值。

create directory export_directory as '/tmp';

expdp test/test@XE tables=UserProfile directory=export_directory dumpfile=profile.dmp logfile=logger

There is a 2011 discussion about this at https://community.oracle.com/thread/2278841 . 2011 年在https://community.oracle.com/thread/2278841 上对此进行了讨论。 It says you have to copy the directory $ORACLE_HOME/rdbms/xml/xsl from a working installation.它说您必须从工作安装中复制目录$ORACLE_HOME/rdbms/xml/xsl So the problem seems to be a known one, and if you do not have a working installation you are out of luck.所以这个问题似乎是一个已知的问题,如果你没有一个有效的安装,那你就不走运了。

The problem does not seem to be limited to Linux (I used the same rpm as the OP), as the discussion says the working installation can be “ even a Linux one.”问题似乎不仅限于 Linux(我使用与 OP 相同的 rpm),因为讨论中说工作安装可以“甚至是 Linux 安装”。

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

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