尝试实现动态生成脚本并调用:
--f.sh
--./f.sh
#!/bin/sh
echo "select sysdate from dual;" > a.sql
export ORACLE_SID=eoss
export ORACLE_HOME=/app/eoss/eossdb/9.2.0
PATH=$PATH:$ORACLE_HOME/bin
errorbuf=`sqlplus apps/apps @a.sql`
echo $errorbuf |
错误:
Error 45 initializing SQL*Plus
Internal error
Cause
The issue is identified as Bug:3039738. This typically reproduces when SQL script file is on a OCFS filesystem created on shared device (for example, SAN storage).
fix:
The only workaround, until bug is fixed, is to copy the SQL script file to a local disk (in case of Linux, a ext3 filesystem).
阅读(1274) | 评论(0) | 转发(0) |