每次我在sqlplus(Oracle)中启动一个新的sql脚本时,我都会收到这样的输出:
[exec] Connected to: [exec] Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production [exec] With the Partitioning, Automatic Storage Management, OLAP, Data Mining [exec] and Real Application Testing options [exec] [exec] [exec] PL/SQL procedure successfully completed. [exec] [exec] SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production [exec] With the Partitioning, Automatic Storage Management, OLAP, Data Mining [exec] and Real Application Testing options
我只想获得中间的信息,即:
[exec] PL/SQL procedure successfully completed.
有可能以某种方式做到吗?
顺便说一下。我知道-S选项,但它阻止我显示将在下一步执行的SQL命令。使用-S这些设置:
set serveroutput on size 1000000; set echo on;
不起作用。
答案 0 :(得分:0)
您可以使用SPOOL命令将输出写入文件,在这种情况下ECHO可以正常工作。
SET SERVEROUTPUT ON SIZE 1000000
SET ECHO ON
SPOOL logfile.txt
[...]