- 论坛徽章:
- 30
|
各位大师还得问一下,还是不行呢?
[oracle@tlgServer sinosoft]$ more sql.sh
#!/bin/bash
for i in `ls -l /home/sinosoft/sql | awk '{print $9}'`
do
sqlplus sales/sales <<XXOO
@$i
quit
XXOO
done
echo "success!
[oracle@tlgServer sinosoft]$ sh sql.sh
SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 25 16:57:20 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL> SP2-0310: unable to open file "a.sql"
SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 25 16:57:20 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL> SP2-0310: unable to open file "b.sql"
SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
success! |
|