Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL : serveroutput on inside begin..end block Possible ? Impossible??
Dear all
I would like to implement the following functionality inside the PL/SQL block. but it is not working.
--Sample image of my problem
-- implementing the serveroutput on inside pl/sql
SQL> create or replace procedure stest as
2
3 t_bstr1 varchar2(100) := 'ignoreme\namehere'; 4 t_astr1 varchar2(100);
8 t_astr1 := upper(substr(t_bstr1, 9 instr(t_bstr1, '\') + 1)); 10 DBMS_OUTPUT.PUT_LINE('String Before breaking'|| t_bstr1); 11 DBMS_OUTPUT.PUT_LINE('String Before breaking'||t_astr1); execute immediate 'ALTER SYSTEM SET SERVEROUTPUT OFF';12 end;
Procedure executed.
SQL> exec stest;
BEGIN stest; END;
*
Error in Line 1:
ORA-02065: ALTER SYSTEM -Option ignored??. ORA-06512: "test.STEST",Line7 ORA-06512: Line1
SQL>
(Above message translated from Japanese.)
What is the alternate way of writing Line 7:
I am well aware of Serveroutput on can be set on using the
glogin.sql and login.sql.
but i do not want to disturb the environment file/s.
So, i want implement inside the procedure itself
Thanks in Advance Received on Wed Jul 06 2005 - 01:47:50 CDT