Shell脚本调用Oracle存储过程

阅读更多
errorCode=`
sqlplus -slient ${DB_USER_NAME}/${DB_USER_PASSWORD}@${DB_NAME} 2>>$log_file << EOF
	set pagesize 0 feedback off verify off heading off echo off
	var errorCode varchar2(20);
	call ${AMS_BA}.disable_bt('$1','$2',',',:errorCode);
	select :errorCode from dual;
EOF`


$1:外部传入参数1;
$2:外部传入参数2;
:errorCode:存储过程返回值

你可能感兴趣的:(Shell,存储过程)