By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,077 Members | 2,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,077 IT Pros & Developers. It's quick & easy.

Executing a function declared in Oracle Package from Unix shell script:-

P: 1
Hi,

Can anyone tell me how to execute a function declared in Oracle Package from Unix shell script?

I created a shell script and after connecting to oracle database i am using
exec @ Db_name.Packagename.function_name('p1','P2');

and after executing the shell scripts i am getting the follwing error:-ERROR at line 13:
ORA-06550: line 13, column 2:
PLS-00221: 'function_name' is not a procedure or is undefined
ORA-06550: line 13, column 2:
PL/SQL: Statement ignored


Can anyone help me out as how to execute a function?
Your suggestion will be Highly appreciated.
Oct 17 '07 #1
Share this Question
Share on Google+
2 Replies


Motoma
Expert 2.5K+
P: 3,235
I have bumped this thread over to the Oracle forum, as I feel this is more related to the use of Oracle and it's specific tools than Unix.
Oct 18 '07 #2

amitpatel66
Expert 100+
P: 2,367
Hi,

Can anyone tell me how to execute a function declared in Oracle Package from Unix shell script?

I created a shell script and after connecting to oracle database i am using
exec @ Db_name.Packagename.function_name('p1','P2');

and after executing the shell scripts i am getting the follwing error:-ERROR at line 13:
ORA-06550: line 13, column 2:
PLS-00221: 'function_name' is not a procedure or is undefined
ORA-06550: line 13, column 2:
PL/SQL: Statement ignored


Can anyone help me out as how to execute a function?
Your suggestion will be Highly appreciated.
When executing a procedure, just say EXEC dbname.package.function_name(<parameters>);
@ is not required.

The error says function_name is not a procedure or undefined.
Could you please POST your package/package body for my reference.
It seems that the procedure/function with name function_name is not defined in a package or under db_name!!
Oct 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.