The GENERATE_JOB_NAME function returns the unique name of a job.
The name is in the {prefix}N format, where N is the sequential number. If you do not specify the prefix, the following names are generated by default: JOB$_1, JOB$_2, JOB$_3, and so forth. If you specify "MYJOB" as the prefix, the following names are generated: MYJOB1, MYJOB2, and so forth.
Syntax
DBMS_SCHEDULER.GENERATE_JOB_NAME (
in_type_name IN VARCHAR2 DEFAULT 'JOB$_') RETURN VARCHAR2;
Parameters
The in_type_name parameter specifies the prefix for generated job names.
Usage notes
If you set the prefix to NULL, the name consists of only a sequential number. To use such a numeric name, you must enclose it in double quotation marks (" ") in the call to the DBMS_SCHEDULER package.
The prefix cannot exceed 18 characters in length and cannot end with a digit.
Generally, the GENERATE_JOB_NAME function does not return duplicate job names. It is also unlikely that the function returns a name already used by an object in the database.
You can call the GENERATE_JOB_NAME function without specific Scheduler privileges.