sqlplus 常用参数
-s: 不显示登录时的头信息,也不显示提示符,一般用在shell中调用sqlplus时
set heading off: 不显示列名
set feedback off: 不显示行数信息
最基本的shell中调用sqlplus格式
<< EOF ....... EOF: EOF是一对标识符,标识其内的文字传给左右的的命信,不一定必须是EOF
可以是任何两个对应的字符
#!/bin/bash
sqlplus /nolog << EOF
conn scott/tiger
select * from dept;
exit
EOF
[oracle@localhost test]$ ./plus.sh
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 7 12:13:04 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> Connected.
SQL>
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP