---
title: "Shell脚本调用Oracle存储过程"
author: "godandghost"
date: "2013-10-14T15:58:07Z"
tags: ["shell", "存储过程"]
categories: ["编程语言"]
slug: "shell-oracle"
draft: false
lastmod: "2013-10-14T15:58:07Z"
id: 1956748
url: "https://godandghost.iteye.com/blog/1956748"
---

```java

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：存储过程返回值