如何在oracle中执行shell脚本

如题所述

要在sql下面执行shell语句,用!符号,不过功能有限;有的时候打不到我们想要的效果!先给你两个实例;
要在后台登陆;plsql中测试不行
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
SQL> !echo 123;
123

SQL> !/billing/user/xufc/ftp.sh
Local directory now /billing/Balance/SP/REALINCOME/FTRANS
Interactive mode off.
-rw-r--r-- 1 500 500 823038 Feb 17 06:27 340000PTSVDA002012021714210800000000.gz
-rw-r--r-- 1 500 500 33 Feb 17 06:27 340000PTSVDA002012021714210800000000.md5
其中ftp.sh需要用绝对路径;该脚本里面的内容只是ls一下;就这样了
温馨提示:答案为网友推荐,仅供参考
相似回答