Shell脚本中通过sqlplus批量执行Oracle SQL语句
#!/bin/bash
. /home/oracle/.bash_profile
SID_SERVICE_NAMES=$(lsnrctl status | grep Service | egrep -v "Summary|XDB" | awk -F '"' '{print $2}')
ORA_USER=sys
ORA_PASS=syspass
ORA_PORT=1521
ORA_HOST=localhost
ORA_ROLE=sysdba
# 多个oracle服务的情况下,for循环执行
for svc in ${SID_SERVICE_NAM ......
<阅读全文>
<阅读全文>