2 Replies Latest reply on May 26, 2011 6:17 PM by 864533

    SQLPlus: echo input script to stdout... how?

      Hey Guys,

      I am executing a sqlplus script with the following:
      sqlplus /nolog < mysqplus.sql
      Where mysqlplus.sql contains:
      set echo on;
      connect userid/password@service_name

      select count(*) from mytable;
      Which is resulting in the following echo'ed to stdout:
      SQL*Plus: Release Production on Wed May 25 20:06:17 2011

      Copyright (c) 1982, 2010, Oracle. All rights reserved.

      SQL> SQL> Connected.
      SQL> SQL>

      SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release - 64bit Production
      With the Partitioning, OLAP, Data Mining and Real Application Testing option
      How do I get the executed sql echo'ed as well? In other words, I would like the sql:
      select count(*) from mytable;
      echo'ed to stdout just before it is executed. I thought the option:
      set echo on;
      would do the trick... but it didn't. Any help would be greatly appreciated.

      Edited by: user13385044 on May 25, 2011 8:12 PM