Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: how to call oracle package procedure from DOS batch file?

RE: how to call oracle package procedure from DOS batch file?

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Fri, 4 Mar 2005 17:42:24 -0500
Message-ID: <003901c5210b$6f73bce0$2004a8c0@development.perceptron.com>


Try this (contents of the batch file):

REM that's the contents of batch file
(echo connect %1
echo exec my_package.my_procedure ^(:%2, :3%^) echo ^);
echo exit
) | sqlplus /nolog

Note: one extra ")".

Igor Neyman, OCP DBA
ineyman_at_perceptron.com

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Guang Mei Sent: Friday, March 04, 2005 4:54 PM
To: Oracle-L (E-mail)
Subject: how to call oracle package procedure from DOS batch file?

Hi,

Just started to program on WindowXP side using DOS batch file. I have this
question.

  1. In batch file, if I want to call a procedure in a package with parameters defined in the batch file, how do I do that?

REM : try to call my_package.my_procedure with two parameters REM: %1 is user/pass_at_db

sqlplus -S %1 "exec my_package.my_procedure (:%2, :3% ) << EOF exit
EOF does not seem to work.

TIA. Guang



*
PRIVILEGED AND CONFIDENTIAL:
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you
are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.

*
--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Fri Mar 04 2005 - 17:45:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US