首页 文章

sqlplus:停止显示有关连接和断开连接的信息

提问于
浏览
0

每次我在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;

不工作 .

1 回答

  • 0

    您可以使用SPOOL命令将输出写入文件,在这种情况下ECHO可以工作 .

    SET SERVEROUTPUT ON SIZE 1000000
    SET ECHO ON
    SPOOL logfile.txt
    [...]
    

相关问题