tailieunhanh - Oracle Built−in Packages- P111
Oracle Built−in Packages- P111: 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 SET_SQL_TRACE_IN_SESSION Sets SQL tracing on or off in user session No DBMS_SYSTEM does not declare any exceptions or any non-program elements. DBMS_SYSTEM Interface This section describes the programs defined in the DBMS_SYSTEM package. The procedure The READ_EV procedure is used to read trace event level settings for the current session. Here s the header for this program PROCEDURE iev BINARY_INTEGER oev OUT BINARY_INTEGER Parameters are summarized in the following table. Parameter Value iev Event number oev Event level The program does not raise any exceptions. Restrictions Note the following restrictions on calling READ_EV The READ_EV procedure should not be invoked by end users or called by PL SQL programs. Its usage is limited to Oracle internal purposes or under instruction of Oracle Technical Support. Improper use of the procedure by end users can have adverse effects on database performance. The program does not assert a purity level with the RESTRICT_REFERENCES pragma. Example The following example 1 will display event-level settings for the current session 1 Supplied by Ken Robinson of Oracle Technical Support. Filename on companion disk DECLARE event_level number BEGIN FOR i IN LOOP i event_level IF event_level 0 THEN Event TO_CHAR i set at level TO_CHAR event_level END IF END LOOP END DBMS_SYSTEM Interface 541 Appendix A What s on the Companion Disk The procedure The SET_EV procedure is used to set trace event levels in another user session. It is equivalent to having that session issue the ALTER SESSION SET EVENTS event syntax command. Since the other session may be engaged in an application setting an event may not be possible. Here s the header for this program PROCEDURE si BINARY_INTEGER se BINARY_INTEGER ev .
đang nạp các trang xem trước