tailieunhanh - Oracle Built−in Packages- P68
Oracle Built−in Packages- P68: Ah, for the good old days of Version of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms , and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk You will see output from this package only after your program completes its execution. You cannot use DBMS_OUTPUT to examine the results of a program while it is running. And if your program terminates with an unhandled exception you may not see anything at all If you try to display strings longer than 255 bytes DBMS_OUTPUT will raise a VALUE_ERROR exception. DBMS_OUTPUT is not a strong choice as a report generator because it can handle a maximum of only 1 000 000 bytes of data in a session before it raises an exception. If you use DBMS_OUTPUT in SQL Plus you may find that any leading blanks are automatically truncated. Also attempts to display blank or NULL lines are completely ignored. There are workarounds for almost every one of these drawbacks. The solution invariably requires the construction of a package that encapsulates and hides DBMS_OUTPUT. This technique is explained in the Section section. Enabling and Disabling Output The ENABLE and DISABLE procedures enable and disable output from the and PUT and PUTF procedure. The procedure The ENABLE procedure enables calls to the other DBMS_OUTPUT modules. If you do not first call ENABLE then any other calls to the package modules are ignored. The specification for the procedure is PROCEDURE buffer_size IN INTEGER DEFAULT 20000 where buffer_size is the size of the buffer that will contain the information stored by calls to PUT and PUT_LINE. The buffer size can be as large as 1 000 000 bytes. You can pass larger values to this procedure without raising an error but doing so will have no effect besides setting the buffer size to its maximum. You can call ENABLE more than once in a session. The buffer size will be set to the largest size passed in any call to ENABLE. In other words the buffer size is not necessarily set to the size specified in the last call. If you want to make sure that the .
đang nạp các trang xem trước