Đang chuẩn bị liên kết để tải về tài liệu:
Oracle Built−in Packages- P80
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Oracle Built−in Packages- P80: Ah, for the good old days of Version 1.0 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 3.0, and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk Another usability issue with SET_SESSION_LONGOPS is that any values not set in the procedure call will be set to zero. Thus if you want to increment different counter columns at different times in an application for the same row in V SESSION_LONGOPS you must keep track of all counter values and pass them all in each time the procedure is called. Adding to the cumbersome nature of the long parameter list are the extremely long names of the package and procedure themselves. You really have to want or as is more likely need to call SET_SESSION_LONGOPS in order to use it These usability issues seemed to provide an opportunity to improve ease-of-use through encapsulation. I decided to build a package called longops to offer some relief. Here is the package specification for longops Filename on companion disk longops.sql CREATE OR REPLACE PACKAGE longops IS Enhances DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS by allowing individual columns to be updated without passing all parameter values. Author John Beresniewicz Savant Corp Created 09 08 97 Compilation Requirements SELECT on SYS.V_ SESSION_LONGOPS Execution Requirements returns a new V SESSION_LONGOPS row index FUNCTION new_row RETURN BINARY_INTEGER returns the last row index used FUNCTION current_row RETURN BINARY_INTEGER makes a new row the current row PROCEDURE set_current_row row_idx_IN IN BINARY_INTEGER Covers DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS PROCEDURE set_row hint_IN IN BINARY_INTEGER context_IN IN NUMBER DEFAULT 0 stepid_IN IN NUMBER DEFAULT 0 stepsofar_IN IN NUMBER DEFAULT 0 steptotal_IN IN NUMBER DEFAULT 0 sofar_IN IN NUMBER DEFAULT 0 totalwork_IN IN NUMBER DEFAULT 0 appdata1_IN IN NUMBER DEFAULT 0 appdata2_IN IN NUMBER DEFAULT 0 appdata3_IN IN NUMBER DEFAULT 0 Updates a single row in V SESSION_LONGOPS preserving values in columns corresponding to parameters passed as NULL. PROCEDURE update_row hint_IN IN BINARY_INTEGER DEFAULT current_row context_IN IN NUMBER .