Skip to content

Can we use size "unlimited" for serveroutput? #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jgebal opened this issue Jan 27, 2018 · 1 comment
Closed

Can we use size "unlimited" for serveroutput? #2

jgebal opened this issue Jan 27, 2018 · 1 comment
Assignees
Milestone

Comments

@jgebal
Copy link
Member

jgebal commented Jan 27, 2018

utPLSQL v3 supports Oracle 11.2 and above. In those oracle versions the output can be set to unlimited size.
Can we set this to unlimited by default or have a preference to set the default output size?

@PhilippSalvisberg
Copy link
Member

Actually it is possible to set UNLIMITED but unfortunately it does not have the expected effect. I've run the following code in SQL Developer:

SET SERVEROUTPUT ON SIZE UNLIMITED
BEGIN
   FOR I IN 1..100000 LOOP 
      dbms_output.put_line (i || ' this is a line');
   END LOOP;
END;
/

The output was:

(...)
50553 this is a line
50554 this is a line
50555 this is a line


Error starting at line : 2 in command -
BEGIN
   FOR I IN 1..100000 LOOP 
      dbms_output.put_line (i || ' this is a line');
   END LOOP;
END;
Error report -
ORA-20000: ORU-10027: buffer overflow, limit of 1000000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 32
ORA-06512: at "SYS.DBMS_OUTPUT", line 97
ORA-06512: at "SYS.DBMS_OUTPUT", line 112
ORA-06512: at line 3
20000. 00000 -  "%s"
*Cause:    The stored procedure 'raise_application_error'
           was called which causes this error to be generated.
*Action:   Correct the problem as described in the error message or contact
           the application administrator or DBA for more information.

This shows that SQL Developer 17.4.0 reduces the output to 1000000 bytes.

However, maybe it is still a good idea to set UNLIMITED and let the SQL Developer team know about this limitation. In that case we may expect that in a future version the buffer is in fact unlimited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants