tailieunhanh - Oracle Built−in Packages- P118

Oracle Built−in Packages- P118: 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 quotes around the literal. The length of the what parameter is limited to 2000 bytes under Oracle and 4000 bytes under Oracle . These limits should be more than sufficient for all practical purposes. The value of the parameter is normally a call to a stored PL SQL program. It is best to avoid using large anonymous PL SQL blocks although these are legal values. Another good tip is to always wrap stored procedure invocations in an anonymous block as some subtle difficulties are possible otherwise. Thus instead of what my_proc parm1 it is safer to use what begin my_proc parm1 end Whenever the what parameter is modified to change the job to execute the user s current session settings are recorded and become part of the job s execution environment. This could alter the expected execution behavior of the job if the session settings were different from those in place when the job was originally submitted. It is important to be aware of this potential side effect and be sure that session settings are correct whenever the what parameter is used in a DBMS_JOB procedure call. See the Section section for more discussion of the job execution environment. Jobs that reference database links will fail if the database link is not fully qualified with the username and password. This is another subtle consequence of the execution environment of jobs. The job definition specified by the what parameter can also reference the following special job parameter values Parameter Mode job IN next_date IN OUT broken IN OUT When the job definition references these job parameters in its own parameter list their values are assigned to the parameters in the job definition when the job executes. For example suppose that a procedure called procl has the following specification PROCEDURE procl my_job_number IN INTEGER Suppose also that we submit proc1 to be executed by the job queue as follows DECLARE jobno INTEGER BEGIN jobno proc1