1 2 Previous Next 21 Replies Latest reply on Sep 13, 2012 10:23 AM by Bill Robinson

    How to run SQL queries via NSH in Bladelogic console

      Hi All,


      I have to run some SQL queries to get some value from DB (oracle), but when i run the script in the application server (linux) its work and i get the result.

      but when i run it as NSH script in BL also same application server ,i get this error /tmp/getparmeter.sh: line 9: sqlplus: command not found.


      and if i post this script inside the BL console i get the same error   any idea ????


      this is my script:

      vm_name=`sqlplus -s username/password@XE<<!EOF| grep -v "^Connected" 2>&1

      set termout off echo off feedback off pause off timing off time off

      set pages 0

      clear breaks

      clear compute

      set termout on

      select server_name from server_table where ip ='192.166.x.x';



      echo $vm_name;


      how can i use this scrip in BL as NSH script.


      thanks all

        1 2 Previous Next