暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Why do I lose the leading spaces and blank lines when I try to format output through the dbms_output package ?

2011-01-01
620

The Oracle (tm) Users' Co-Operative FAQ

Why do I lose the leading spaces and blank lines when I try to format output through the dbms_output package ?


Author's name: Jonathan Lewis

Author's Email: jonathan@jlcomp.demon.co.uk

Date written: 28th June 2001

Oracle version(s): 8.1.7.0

The dbms_output package include new_line calls to allow you to print blank lines, but SQL*Plus seems to lose the blank lines. It also loses leasing spaces that you put in to the put_line() call..


There is a feature of the set serveroutput on command that was originally undocumented, the format wrapped option. If you issue a command like:

	set serveroutput on size 1000000 format wrapped

from SQL*Plus, you will find that your leading spaces and blank lines suddenly reappear, and your output looks a lot tidier. (Note that the limit on the dbms_output buffer is 1,000,000 bytes). As a convenience, you can put this line in your glogin.sql script, or in a local login.sql script.

This feature is automatically enabled in svrmgrl, but Oracle Corp has been telling us for some years that svrmgrl will become defunct - and finally in Oracle 9i this is now true and you actually receive an error message if you try to run it.


Further reading: The FAQ page on using the SQL*Plus glogin.sql script to set this, and other features, automatically.



最后修改时间:2020-04-16 15:13:17
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论