Oracle Built−in Packages- P32

Oracle Built−in Packages- P32: 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 RETURN BOOLEAN IS call_status INTEGER BEGIN call_status pipename_IN RETURN call_status 0 EXCEPTION WHEN cannot_use_pipe OR null_pipename THEN RETURN FALSE END closepipe END dbpipe NOTE It is good practice to remove pipes explicitly when they are no longer needed. This can sometimes be difficult since database pipes are typically shared by multiple sessions so it is hard to know when they can be removed. Empty pipes that have not been removed will eventually be aged out of the shared pool by Oracle. The procedure The procedure resets the session message buffer s internal pack and unpack indicators effectively discarding the contents of the buffer. The header for this procedure follows PROCEDURE The program does not raise any package exceptions. Example This example shows the use of RESET_BUFFER at the beginning of a program that packs a PL SQL record into a message. The pack_send_request procedure can be found in the pipesvr package discussed in the Section section. The following code has been excerpted from that example package Filename on companion disk PROCEDURE pack_send_request request_rec_IN IN request_rectype return_code_OUT OUT NUMBER IS BEGIN discard any previous unsent message items pack message in standard order request_protocol send message to request pipe nowait return_code_OUT pipename request_pipe timeout 0 END pack_send_request Oracle advises that the RESET_BUFFER procedure should not generally be needed. I make sure however to use it in the following places M anaging Pipes and the Message Buffer 146 Appendix A What s on the Companion Disk Exception handlers of programs using UNPACK_MESSAGE procedures At the .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.