Simple question..I am running a stored procedure from SQL PLUS 
Author Message
 Simple question..I am running a stored procedure from SQL PLUS
so i do a SQL> EXEC my_sp..I have dbms_output statements in code and i
have also set serverout on ..but it doesn't print the messages what am
i missing?


Sun, 25 Jan 2004 07:47:14 GMT
 Simple question..I am running a stored procedure from SQL PLUS

Could be a couple of things but one of the most likely is that the value
you are feeding to DBMS_OUTPUT is null.  When DBMS_OUTPUT gets a null it
doesn't print anything.  Try wrapping your input to DBMS_OUTPUT with the
NVL function

i.e.

DBMS_OUTPUT.PUT_LINE(NVL(my_varchar2,'NULL VALUE'));

Hope this helps
RHC

Quote:

> so i do a SQL> EXEC my_sp..I have dbms_output statements in code and i
> have also set serverout on ..but it doesn't print the messages what am
> i missing?

--
Posted via CNET Help.com
http://www.help.com/


Mon, 26 Jan 2004 05:30:10 GMT
 Simple question..I am running a stored procedure from SQL PLUS

Quote:

> so i do a SQL> EXEC my_sp..I have dbms_output statements in code and i
> have also set serverout on ..but it doesn't print the messages what am
> i missing?

One possibility is that you are raising an exception before any of
your dbms_output statements can execute.  So add to your
declarative section something like

     errtxt   varchar2(512);

And to your exception handler something like

     when others then  ----if not already present
        errtxt := sqlerrm;
        dbms_output.put_line(errtxt);

And this possibility should be covered.

--

Oracle DBA

Go Wings!!!!!!!



Mon, 26 Jan 2004 10:41:39 GMT
 Simple question..I am running a stored procedure from SQL PLUS
I'm new to PL/SQL, but did you remember to SET SERVEROUTPUT ON?


Mon, 26 Jan 2004 21:49:26 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Simple question..I am running a stored procedure from SQL PLUS

2. SQL*Plus question (Where am I)

3. question RE. running two SQL statements in one Stored Procedure

4. Many Simple Stored Procedures VS. Few Complex Stored Procedures

5. Embarassingly simple SQL question - what am I missing?!

6. A simple sql*plus question

7. simple question about sql*plus

8. stored procedure question, plus recommendation on books

9. can call stored procedure from sql worksheet but not sql plus

10. Problem executing a SQL Server 2000 Stored Procedure from SQL*PLUS

11. How to test run a procedure at SQL plus mode

12. Oracle running Stored Procs through SQL Plus


 
Powered by phpBB® Forum Software