How to call Oracle Stored Procedure

Posted on 2008-10-16
Last Modified: 2013-12-07
How do I call an Oracle Stored Prodeure from a query window. (not using sql plus)
It has one out parameter number type. 2 in parameters both varchar type.
Question by:claghorn
  • 2
  • 2
LVL 73

Expert Comment

ID: 22733268
what tool are you using that has a query window?

toad, pl/sql developer, sql developer, etc.  will allow you to run an anonymous pl/sql block.

something like this...

    v_out number;





Open in new window


Author Comment

ID: 22733377
I'm using microsoft .net oracle development tools. Its saying the procedure name needs to be declared.

Author Comment

ID: 22733441
Also, dbms_output.put_line does not work.
ORA-00900: invalid SQL statement
So I try  set serveroutput on;
ORA-00922: missing or invalid option
LVL 73

Accepted Solution

sdstuber earned 50 total points
ID: 22733649
if your procedure is in a package you need to prefix the procedure name with the package name.
similarly, if the procedure/package is in another schema and you don't have a synonym you have to prefix it with the schema name too.

and finally, if you don't have privileges to execute the procedure, it will also return that message.

"set serveroutput on"  is a sqlplus command,  you will use dbms_output.enable

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Parametric query in oracle 6 51
Migrate database to ASM disks. 1 39
Schema creation in Oracle12c 6 39
Use of Exception to end a Loop 3 17
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now