我想使用Unix shell script连接数据库,但无法连接
下面提到的代码
数据库
export ORACLE_HOME="oracle"
value=`/oracle/bin/sqlplus -S user/pwd@SHM4EQ << EOF
SET LINESIZE 300
SET PAGESIZE 300
SET HEADING OFF
SELECT * form dual
EOF`发布于 2019-05-19 22:27:54
试着这样..。
#!/bin/bash
LogDirectory='/var/tmp/logs'
DataDirectory='/var/tmp/data'
DBUSER='scott'
DBUSERPASSWORD='tiger'
DBSID='oracle'
sqlplus -s ${DBUSER}/${DBUSERPASSWORD}@${DBSID} <<EOF
set linesize 32767
set feedback off
set heading off
select * from dual;
EOFhttps://stackoverflow.com/questions/30884375
复制相似问题