- 在Linux后台执行Oracle存储过程:
- 1.写个test.sh脚本:
- sqlplus -s username/password@sid <<EOF
- set echo off;
- set serveroutput on;
- set timing on;
- var c varchar2(2000)
- exec prc_test('201003',:c);
- commit;
- exit;
- !
- 2.输入如下命令(test.log是生成的日志文件 &是后台执行):
- nohup test.sh >test.log&
- 3.在进程中查看下:
- ps -ef|grep test.sh
- 会找到两条记录
- #该片段来自于http://www.codesnippet.cn/detail/15112012381.html
来源: http://www.codesnippet.cn/detail/15112012381.html