Ad Widget

Collapse

remote shell script works, but

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carrison
    Junior Member
    • Dec 2016
    • 2

    #1

    remote shell script works, but

    but sqlplus script in shell not work. why?

    I can see log says "26588:20170116:191030.380 Executing command '/opt/scripts/alert_xxx.sh'", and shell command works fine. But sqlplus scripts in shell scripts not work, why?

    my shell scripts as follow:

    [oracle@devdb scripts]$ cat alert_xxx.sh
    #!/bin/bash
    export ORACLE_SID=devdb11
    ifconfig > /opt/scripts/test.txt
    sqlplus -S / as sysdba @/opt/scripts/tbs_xxx.sql


    [oracle@devdb scripts]$ cat tbs_xxx.sql
    ALTER TABLESPACE XXX ADD DATAFILE '/oracle/oradata/devdb11/xxx061.dbf' SIZE 10M AUTOEXTEND OFF;
    exit
    [oracle@devdb scripts]$
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    run the shell script like that :

    bash -x alert_xxx.sh


    you will get more info.

    Comment

    Working...