DBMS_OUTPUT package

Oracle DBMS_OUTPUT package

oracle_dbms_output_package

The DBMS_OUTPUT package contains several useful procedures. By far, the most widely used is PUT_LINE.You can use the DBMS_OUTPUT.PUT_LINE procedure to display the contents of a stored variable or any arbitrary text.

Before any lines of output will be displayed in SQL*Plus, you must first tell SQL*Plus to display server output by issuing this command:

SET SERVEROUTPUT ON;

Once issued, any lines of output created by DBMS_OUTPUT.PUT_LINE will be displayed. In a similar fashion, the interpreter will no longer display output once the following command is issued:

SET SERVEROUTPUT OFF;

One important note to remember is that if you plan to print many lines, it may be a good idea to resize the print buffer.

When SET SERVEROUTPUT ON is issued, then the default buffer size is 20,000 bytes.

Any content that surpasses that size will be cut off. To increase the buffer, simply set the size of buffer you'd like to use when turning the SERVEROUTPUT on.

SET SERVEROUTPUT ON SIZE 1000000;

The DBMS_OUTPUT package also has a buffer size limit. The buffer can be set from 2,000 to 1,000,000 bytes in size. The buffer can be set by passing the size to DBMS_ENABLE. If you attempt to exceed the size,then an Oracle exception will be raised.


This article is contributed by Jay. If you like dEexams.com and would like to contribute, you can also write your article here or mail your article to admin@deexams.com . See your article appearing on the dEexams.com main page and help others to learn.


Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.


Python if , elif and else

Python Conditions and If statements

  • 0
Python for beginners

Learning Python Part 1

  • 3
Struct Alignment and Padding

Struct Alignment and Padding in C++ And C

  • 0
Friend function

Friend function C++

  • 0
Pointers

C++ Pointers

  • 0
Structures

C++ Structures

  • 0
Types of Inheritance in C++

Inheritance and access specifiers C++

  • 0
Java date pattern

Java Date Pattern Syntax

  • 0
Java Date and Calendar

Java Date formats

  • 0
JAVA Data Type

Data types in Java

  • 0
Java unreachable code

Unreachable Code Error in Java

  • 0

Post Comment

Comments(0)

WEB TECHNOLOGY

Articles

×

Forgot Password

Please enter your email address below and we will send you information to change your password.