Below is a sample bash script and it seems to error out when i execute the bash. The sql works on its own but in a script oddly.
Please advise
- JOB_RUNNING='SELECT count(1) from gv b,gv a WHERE b.paddr = a.addr AND type='''USER''' AND b.status='''ACTIVE''' AND b.program='''Thin Client''' * ERROR at line 1: ORA-00942: table or view does not exist'
JOB_RUNNING=`sqlplus -s "/ as sysdba" << EOF
SET FEEDBACK OFF;
SET HEADING OFF;
SELECT count(1) from gv\$session b,gv\$process a WHERE b.paddr = a.addr AND type='USER' AND b.status='ACTIVE' AND b.program='Thin Client';
exit;
EOF
`