Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Executing oracle procedure from windows batch file

user640001Feb 21 2011 — edited Feb 21 2011
Hi,

Oracle9i

How to execute the below procedure from windows batch script without calling separate .sql file?

This below mentioned oracle statements should be included in the batch file itself.


set serveroutput on
DECLARE
var1 varchar2;
var2 varchar2;
var3 varchar2;
var4 varchar2;
var5 varchar2;
var6 varchar2;
cur1;
BEGIN
Procedure_name(&var1,&var2,&var3);
LOOP
FETCH cur1 INTO var4,var5,var6;
EXIT WHEN cur1%NOTFOUND;
dbms_output.put_line(.................);
END LOOP;
END;


Also need to generate the separate log file of the procedure o/p

How it can be done ?

Regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2011
Added on Feb 21 2011
5 comments
4,645 views