[20120410] sqlplus中set termout off.txt
今天测试使用set termout off,发现不起作用,并不能禁止输出。
google,发现如下链接:
http://www.itpub.net/thread-467880-1-1.html
实际上它仅仅能禁止@sql的输出,测试如下:
SQL> show termout
termout ON
SQL> select sysdate from dual ;
SYSDATE
-------------------
2012-04-10 15:42:36
SQL> set termout off
SQL> select sysdate from dual ;
SYSDATE
-------------------
2012-04-10 15:42:44
--可以发现不起作用.
--建立文本文件aa,内容如下:
$ cat aa.sql
select sysdate from dual;
SQL> @aa.sql
--没有输出
SQL> set termout on
SQL> @aa.sql
SYSDATE
-------------------
2012-04-10 15:43:33
--可以使用它来限制长输出,这样不影响看执行计划。
SQL> set term off
SQL> @aa
SQL> set term on
SQL> @dpc
PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------------
SQL_ID 7h35uxf5uhmm1, child number 0
-------------------------------------
select sysdate from dual
Plan hash value: 1388734953
-------------------------------------------------------
| Id | Operation | Name | E-Rows | Cost (%CPU)|
-------------------------------------------------------
| 0 | SELECT STATEMENT | | | 2 (100)|
| 1 | FAST DUAL | | 1 | 2 (0)|
-------------------------------------------------------
Note
-----
- Warning: basic plan statistics not available. These are only collected when:
* hint 'gather_plan_statistics' is used for the statement or
* parameter 'statistics_level' is set to 'ALL', at session or system level
19 rows selected.
时间: 2024-11-09 10:01:42