- 论坛徽章:
- 0
|
回复 9# chizhilove
[oracle@test7: ~]$more sh1.sh
#!/bin/bash
sqlplus "/nolog" <<EOF
conn / as sysdba
startup
select 1+1 from dual;
quit;
EOF
[oracle@test7: ~]$sh sh1.sh
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jun 10 10:53:55 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
idle> Connected to an idle instance.
idle> ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2149040 bytes
Variable Size 603981136 bytes
Database Buffers 226492416 bytes
Redo Buffers 6660096 bytes
Database mounted.
Database opened.
idle>
1+1
----------
2
idle> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@test7: ~]$
这是我写的一个脚本~运行没问题。看看是不是你要的 |
|