重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

标题: 在执行datapatch或DBMS_QOPATCH期间看到错误:/etc/.kshrc [打印本页]

作者: 刘泽宇    时间: 2026-3-15 10:40
标题: 在执行datapatch或DBMS_QOPATCH期间看到错误:/etc/.kshrc
现象:
SQL> select * from OPATCH_XML_INV ;
ERROR:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-29400: data cartridge error
KUP-04095: preprocessor command
<$ORACLE_HOME>/QOpatch/qopiprep.bat encountered error
"/etc/.kshrc[5]: whoami:  not found.
/etc/.kshrc[6]: whoami:  not found.
/etc/.kshrc[16]: termdef:  not found.
/etc/.kshrc[16]: test: 0403-004 Specify a parameter with this command.


KUP-04017: OS message: /home/oracle/.kshrc[6]: grep:  not found.
/home/oracle/.kshrc[6]: sort:  not found.

KUP-04118: operation "pipe read", location "skudmir"

在 $ORACLE_HOME/QOpatch/qopatch.log中显示:

XML_INVENTORY CHAR (100000000)
Terminated by "UIJSVTBOEIZBEFFQBL"
Trim whitespace same as SQL Loader
KUP-04004: error while reading file <$ORACLE_HOME>/QOpatch/qopiprep.bat
KUP-04017: OS message: Error 0
KUP-04017: OS message: /etc/kshrc: hostname: not found.
/etc/kshrc: sed: not found.
/etc/kshrc[2]: id: not found.
/etc/kshrc[2]: sed: not found.
/etc/kshrc[2]: test: 0403-004 Spec
KUP-04118: operation "pipe read", location "skudmir"


此问题归因于.kshrc配置文件。

建议重命名在<home path>/.kshrc下/etc/.kshrc或oracle用户的配置文件。

以root用户身份:
# mv /etc/.kshrc /etc/.kshrc.old

或者作为oracle用户
$ mv <path to home>/.kshrc <path to home>/.kshrc.old

或者
Give compete absolute path for hostname in .kshrc file Eg /usr/bin/hostname

作为Oracle用户执行
$ cd $ORACLE_HOME/OPatch
$ ./datapatch
注意:完成datapatch后,重命名配置文件。






欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2