tailieunhanh - Oracle Built−in Packages- P108

Oracle Built−in Packages- P108: 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 ORA-02081 Database link is not open. Restrictions Note the following restrictions on calling CLOSE_DATABASE_LINK All cursors using the database link must be closed and any transactions that reference the link for UPDATE or SELECT purposes must be ended with COMMIT or ROLLBACK . The program does not assert a purity level with the RESTRICT_REFERENCES pragma. Example To close a database link named LOOPBACK specify the following BEGIN LOOPBACK END Use of database links establishes a proxy session for the local user on the remote database and this is a relatively expensive process. This is why Oracle keeps database links open rather than closing them immediately upon completion of the remote operation. Therefore the CLOSE_DATABASE_LINK procedure probably should not be routinely called especially for database links that are likely to be referenced again in the current session. The procedure The FREE_UNUSED_USER_MEMORY procedure is used to reclaim user session memory especially when memory-intensive operations have been performed in the session. The header for this procedure follows PROCEDURE The FREE_UNUSED_USER_MEMORY procedure does not raise any exceptions and does not assert a purity level with the RESTRICT_REFERENCES pragma. Oracle Corporation recommends that this procedure be used only when memory is at a premium and the session has allocated large greater than 100 Kb amounts. This caution indicates that calling the FREE_UNUSED_USER_MEMORY procedure is itself a relatively expensive operation and should be done only when really necessary. Calling the procedure forces Oracle to deallocate any session memory previously allocated but currently unused. The following examples are the kinds of operations that can lead to large memory allocations In-memory sorts where the SORT_AREA_SIZE .