SP2-0103: Nothing in SQL buffer to run.

聽海★藍心夢發表於2013-12-24
今天在測試指令碼的時候發現一個告警資訊:
[oracle@RACDB01 scripts]$ ./sendmail.sh
上次行數:11813
本次行數:11833
檢測到錯誤,發郵件
SP2-0103: Nothing in SQL buffer to run. SP2-0103: Nothing in SQL buffer to run. SP2-0103: Nothing in SQL buffer to run. SP2-0103: Nothing in SQL buffer to run. SP2-0103: Nothing in SQL buffer to run. PL/SQL procedure successfully completed.
雖然,儲存過程也能執行成功,但是看到這樣的訊息總感覺怪怪的。

檢查指令碼,發現shell中呼叫sqlplus的地方,有註釋的地方:

原來shell:
     ......
      echo "檢測到錯誤,發郵件"
      #cat ./mailinfo|mutt -s "192.168 alert中出現ORA錯誤,請檢查" $mail_list
      result=`sqlplus -S system/admin <       //execute send_mail('$mail_list','192.168.66.10 racdb1+$mailflag','$mailcontent');
      exec PROCSENDEMAIL('$mailcontent','$ip_address $oraclesid $mailflag','test01@tinghai.org','oracle@tinghai.com','192.168.66.9',25,1,'test01','111111','/home/oracle/scripts/error.txt','bit 7');
      exit
      EOF`
      echo $result;      
      ......

調整後shell:
    ......
      echo "檢測到錯誤,發郵件"
      #cat ./mailinfo|mutt -s "192.168 alert中出現ORA錯誤,請檢查" $mail_list
      result=`sqlplus -S system/admin <       exec PROCSENDEMAIL('$mailcontent','$ip_address $oraclesid $mailflag','test01@tinghai.org','oracle@tinghai.com','192.168.66.9',25,1,'test01','111111','/home/oracle/scripts/error.txt','bit 7');
      exit
      EOF`
      echo $result;
      ......

去掉註釋行,執行不再提示告警。
[oracle@RACDB01 scripts]$ ./sendmail.sh
上次行數:11813
本次行數:11833
檢測到錯誤,發郵件
PL/SQL procedure successfully completed.  


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/751371/viewspace-1064164/,如需轉載,請註明出處,否則將追究法律責任。

相關文章