今天碰到了Solaris平台上SQLPLUS的一个小bug。
在SQLPLUS中,提供了一个SPOOL命令,可以向客户端服务器的文件中输出屏幕上执行结果。除了文件操作外,SPOOL OUT还支持将输出文件发送到打印机进行打印的功能。
今天在SOLARIS上的SQLPLUS执行SPOOL OUT命令时,操作没有相应:
bash-3.00$ sqlplus test/test
SQL*Plus: Release 11.1.0.6.0 - Production on 星期二 4月 14 17:53:34 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Solaris: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
SQL> spo result.txt
SQL> select 1 from dual;
1
----------
1
SQL> spo off
SQL> host more result.txt
SQL> select 1 from dual;
1
----------
1
SQL> spo off
SQL> spo result.txt
SQL> select 1 from dual;
1
----------
1
SQL> spo out
_default: unknown printer
SQLPLUS没有找到打印设备,给出了一个提示,但是并没有返回,而是HANG住了。等待很长时间,命令也没有结束。
SQL> spo out
_default: unknown printer
^C
^\
Abort (core dumped)
bash-3.00$
只好通过CTRL+BREAK强行结束。
检查alert文件,没有记录这个错误。
查询了一下metalink,发现果然是Oracle的bug:Bug No. 5885301。Oracle在文档Doc ID: 459004.1中有更加详细的说明。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4227/viewspace-589043/ ,如需转载,请注明出处,否则将追究法律责任。